aboutsummaryrefslogtreecommitdiffstats
path: root/include/kernel-defaults.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-10-23 06:23:23 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-10-23 06:23:23 +0000
commit4bb2c88f4ea2048f732d6d156ba3c564bd4eeb48 (patch)
tree66ea5614e14c12ef41714cb2add3cd6da0f3396d /include/kernel-defaults.mk
parent19a6b0fa95f3b38e9019d2151ad77e6affb07947 (diff)
downloadupstream-4bb2c88f4ea2048f732d6d156ba3c564bd4eeb48.tar.gz
upstream-4bb2c88f4ea2048f732d6d156ba3c564bd4eeb48.tar.bz2
upstream-4bb2c88f4ea2048f732d6d156ba3c564bd4eeb48.zip
don't specify "CC=<nothing>" on kernel build command line
If KERNEL_CC isn't set, we end up with a "CC=" on the kernel build command-line. We don't always need CC, as the CROSS_COMPILE flag does the job instead. In fact, specifying CC messes up the build when we're using a biarch compiler. This change doesn't specify CC= if the KERNEL_CC variable is empty. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> SVN-Revision: 9408
Diffstat (limited to 'include/kernel-defaults.mk')
-rw-r--r--include/kernel-defaults.mk12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index fd5bb1ca06..9779921330 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -40,6 +40,10 @@ KERNEL_MAKEOPTS := -C $(LINUX_DIR) \
ARCH="$(LINUX_KARCH)" \
CONFIG_SHELL="$(BASH)"
+ifneq (,$(KERNEL_CC))
+ KERNEL_MAKEOPTS += CC="$(KERNEL_CC)"
+endif
+
# defined in quilt.mk
Kernel/Patch:=$(Kernel/Patch/Default)
define Kernel/Prepare/Default
@@ -50,11 +54,11 @@ endef
define Kernel/Configure/2.4
$(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile
- $(MAKE) $(KERNEL_MAKEOPTS) CC="$(KERNEL_CC)" oldconfig include/linux/compile.h include/linux/version.h
+ $(MAKE) $(KERNEL_MAKEOPTS) oldconfig include/linux/compile.h include/linux/version.h
$(MAKE) $(KERNEL_MAKEOPTS) dep
endef
define Kernel/Configure/2.6
- -$(MAKE) $(KERNEL_MAKEOPTS) CC="$(KERNEL_CC)" oldconfig prepare scripts
+ -$(MAKE) $(KERNEL_MAKEOPTS) oldconfig prepare scripts
endef
define Kernel/Configure/Default
$(LINUX_CONFCMD) > $(LINUX_DIR)/.config.target
@@ -66,7 +70,7 @@ endef
define Kernel/CompileModules/Default
rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map
- $(MAKE) $(KERNEL_MAKEOPTS) CC="$(KERNEL_CC)" modules
+ $(MAKE) $(KERNEL_MAKEOPTS) modules
endef
ifeq ($(KERNEL),2.6)
@@ -89,7 +93,7 @@ ifeq ($(KERNEL),2.6)
endif
define Kernel/CompileImage/Default
$(call Kernel/SetInitramfs)
- $(MAKE) $(KERNEL_MAKEOPTS) CC="$(KERNEL_CC)" $(KERNELNAME)
+ $(MAKE) $(KERNEL_MAKEOPTS) $(KERNELNAME)
$(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $(LINUX_DIR)/vmlinux $(LINUX_KERNEL)
$(KERNEL_CROSS)objcopy -R .reginfo -R .note -R .comment -R .mdebug -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux.elf
endef