mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-17 22:51:53 +02:00
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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9408 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
d274551d10
commit
2e05912189
@ -40,6 +40,10 @@ KERNEL_MAKEOPTS := -C $(LINUX_DIR) \
|
|||||||
ARCH="$(LINUX_KARCH)" \
|
ARCH="$(LINUX_KARCH)" \
|
||||||
CONFIG_SHELL="$(BASH)"
|
CONFIG_SHELL="$(BASH)"
|
||||||
|
|
||||||
|
ifneq (,$(KERNEL_CC))
|
||||||
|
KERNEL_MAKEOPTS += CC="$(KERNEL_CC)"
|
||||||
|
endif
|
||||||
|
|
||||||
# defined in quilt.mk
|
# defined in quilt.mk
|
||||||
Kernel/Patch:=$(Kernel/Patch/Default)
|
Kernel/Patch:=$(Kernel/Patch/Default)
|
||||||
define Kernel/Prepare/Default
|
define Kernel/Prepare/Default
|
||||||
@ -50,11 +54,11 @@ endef
|
|||||||
|
|
||||||
define Kernel/Configure/2.4
|
define Kernel/Configure/2.4
|
||||||
$(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile
|
$(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
|
$(MAKE) $(KERNEL_MAKEOPTS) dep
|
||||||
endef
|
endef
|
||||||
define Kernel/Configure/2.6
|
define Kernel/Configure/2.6
|
||||||
-$(MAKE) $(KERNEL_MAKEOPTS) CC="$(KERNEL_CC)" oldconfig prepare scripts
|
-$(MAKE) $(KERNEL_MAKEOPTS) oldconfig prepare scripts
|
||||||
endef
|
endef
|
||||||
define Kernel/Configure/Default
|
define Kernel/Configure/Default
|
||||||
$(LINUX_CONFCMD) > $(LINUX_DIR)/.config.target
|
$(LINUX_CONFCMD) > $(LINUX_DIR)/.config.target
|
||||||
@ -66,7 +70,7 @@ endef
|
|||||||
|
|
||||||
define Kernel/CompileModules/Default
|
define Kernel/CompileModules/Default
|
||||||
rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map
|
rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map
|
||||||
$(MAKE) $(KERNEL_MAKEOPTS) CC="$(KERNEL_CC)" modules
|
$(MAKE) $(KERNEL_MAKEOPTS) modules
|
||||||
endef
|
endef
|
||||||
|
|
||||||
ifeq ($(KERNEL),2.6)
|
ifeq ($(KERNEL),2.6)
|
||||||
@ -89,7 +93,7 @@ ifeq ($(KERNEL),2.6)
|
|||||||
endif
|
endif
|
||||||
define Kernel/CompileImage/Default
|
define Kernel/CompileImage/Default
|
||||||
$(call Kernel/SetInitramfs)
|
$(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 -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
|
$(KERNEL_CROSS)objcopy -R .reginfo -R .note -R .comment -R .mdebug -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux.elf
|
||||||
endef
|
endef
|
||||||
|
@ -23,11 +23,11 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(findstring uml,$(BOARD)))
|
ifneq (,$(findstring uml,$(BOARD)))
|
||||||
KERNEL_CC:=$(HOSTCC)
|
KERNEL_CC?=$(HOSTCC)
|
||||||
KERNEL_CROSS:=
|
KERNEL_CROSS?=
|
||||||
else
|
else
|
||||||
KERNEL_CC:=$(TARGET_CC)
|
KERNEL_CC?=$(TARGET_CC)
|
||||||
KERNEL_CROSS:=$(TARGET_CROSS)
|
KERNEL_CROSS?=$(TARGET_CROSS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
PATCH_DIR ?= ./patches$(shell [ -d "./patches-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
|
PATCH_DIR ?= ./patches$(shell [ -d "./patches-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
|
||||||
|
Loading…
Reference in New Issue
Block a user