summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormgross <mark.gross@intel.com>2011-11-01 12:21:24 -0700
committermgross <mark.gross@intel.com>2011-11-09 13:17:41 -0800
commit0d8bfa6c38e13b9cbc1775d8a278b886a1459102 (patch)
treefd92b05d47056ab0dbf093febc20996a72ed5c5a
parent8fd056e590c2bea6cde1b5e024a5afd632c606c7 (diff)
downloadkernel-mfld-blackbay-0d8bfa6c38e13b9cbc1775d8a278b886a1459102.tar.gz
kernel-mfld-blackbay-0d8bfa6c38e13b9cbc1775d8a278b886a1459102.tar.bz2
kernel-mfld-blackbay-0d8bfa6c38e13b9cbc1775d8a278b886a1459102.zip
enable kernrel compont building using android tool chain
Change-Id: Ibe9ecdc9fab633ed49f82c9ddaca8925c998fb64 Reviewed-on: http://android.intel.com:8080/22880 Reviewed-by: Gross, Mark <mark.gross@intel.com> Tested-by: Gross, Mark <mark.gross@intel.com>
-rw-r--r--Makefile4
-rw-r--r--arch/x86/boot/Makefile3
-rw-r--r--drivers/staging/mrst/medfield/Makefile2
3 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 9f6e3cd3854..a36b53067ae 100644
--- a/Makefile
+++ b/Makefile
@@ -364,7 +364,8 @@ LINUXINCLUDE := -I$(srctree)/arch/$(hdr-arch)/include \
KBUILD_CPPFLAGS := -D__KERNEL__
-KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
+KBUILD_CFLAGS := $(ANDROID_TOOLCHAIN_FLAGS) \
+ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration \
-Wno-format-security \
@@ -392,6 +393,7 @@ export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
export KBUILD_ARFLAGS
+export ANDROID_TOOLCHAIN_FLAGS
# When compiling out-of-tree modules, put MODVERDIR in the module
# tree rather than in the kernel tree. The kernel tree might
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index f7cb086b4ad..eeebb6ddb40 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -57,7 +57,8 @@ $(obj)/cpustr.h: $(obj)/mkcpustr FORCE
# How to compile the 16-bit code. Note we always compile for -march=i386,
# that way we can complain to the user if the CPU is insufficient.
-KBUILD_CFLAGS := $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
+KBUILD_CFLAGS := $(ANDROID_TOOLCHAIN_FLAGS) \
+ $(LINUXINCLUDE) -g -Os -D_SETUP -D__KERNEL__ \
-DDISABLE_BRANCH_PROFILING \
-Wall -Wstrict-prototypes \
-march=i386 -mregparm=3 \
diff --git a/drivers/staging/mrst/medfield/Makefile b/drivers/staging/mrst/medfield/Makefile
index b93a6d57a33..f3e56c96c1e 100644
--- a/drivers/staging/mrst/medfield/Makefile
+++ b/drivers/staging/mrst/medfield/Makefile
@@ -25,7 +25,7 @@ include_dirs := \
-Iinclude/drm
ccflags-y += $(include_dirs)
-ccflags-y += -I$(INCDIR)/pvr/services4/system/intel_drm -DANDROID -D_linux_ -D__KERNEL__
+ccflags-y += $(ANDROID_TOOLCHAIN_FLAGS) -I$(INCDIR)/pvr/services4/system/intel_drm -DANDROID -D_linux_ -D__KERNEL__
ifeq ($(CONFIG_DRM_MDFLD),y)
ccflags-y += -DMEDFIELD