[Buildroot] [PATCH 8/9] RFC: Remove HOSTCFLAGS from kernel compile

Grant Likely grant.likely at secretlab.ca
Thu Oct 16 20:32:56 UTC 2008


From: Grant Likely <grant.likely at secretlab.ca>

Setting HOSTCFLAGS when calling make for the kernel compile messes up
the tools that the kernel builds for itself.  Specifically, the
building of the device tree compiler (dtc) in arch/powerpc adds some
required flags to HOSTCFLAGS.  However, if HOSTCFLAGS= is specified
when calling make, then the local flags are never added and the kernel
compile fails.

This patch removes the HOSTCFLAGS= from $(LINUX26_MAKE_FLAGS).  I've
marked this patch as an RFC because I don't know what is really required
here.  Removing it works for me (of course), but it may break other users.
I just don't know if there is a better way to set HOSTCFLAGS so that it
doesn't override the settings that the kernel uses itself.
---

 target/linux/Makefile.in.advanced |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/target/linux/Makefile.in.advanced b/target/linux/Makefile.in.advanced
index 42384f1..9c6df1f 100644
--- a/target/linux/Makefile.in.advanced
+++ b/target/linux/Makefile.in.advanced
@@ -186,7 +186,7 @@ LINUX_KERNEL:=$(LINUX26_KERNEL)
 LINUX26_BZCAT:=$(BZCAT)
 
 __LINUX26_NO_PIC=-fPIC -fpic -DPIC -fwrapv -ftrapv
-LINUX26_MAKE_FLAGS = HOSTCC="$(HOSTCC)" HOSTCFLAGS="$(HOSTCFLAGS)" \
+LINUX26_MAKE_FLAGS = HOSTCC="$(HOSTCC)" \
 	ARCH=$(KERNEL_ARCH) \
 	CFLAGS_KERNEL="$(filter-out $(__LINUX26_NO_PIC),$(TARGET_CFLAGS))" \
 	INSTALL_MOD_PATH=$(TARGET_DIR) \




More information about the buildroot mailing list