Changeset 9408


Ignore:
Timestamp:
2007-10-23T08:23:23+02:00 (10 years ago)
Author:
nbd
Message:

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@…>

Location:
trunk/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/kernel-defaults.mk

    r9062 r9408  
    4141        CONFIG_SHELL="$(BASH)" 
    4242 
     43ifneq (,$(KERNEL_CC)) 
     44  KERNEL_MAKEOPTS += CC="$(KERNEL_CC)" 
     45endif 
     46 
    4347# defined in quilt.mk 
    4448Kernel/Patch:=$(Kernel/Patch/Default) 
     
    5155define Kernel/Configure/2.4 
    5256        $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile 
    53         $(MAKE) $(KERNEL_MAKEOPTS) CC="$(KERNEL_CC)" oldconfig include/linux/compile.h include/linux/version.h 
     57        $(MAKE) $(KERNEL_MAKEOPTS) oldconfig include/linux/compile.h include/linux/version.h 
    5458        $(MAKE) $(KERNEL_MAKEOPTS) dep 
    5559endef 
    5660define Kernel/Configure/2.6 
    57         -$(MAKE) $(KERNEL_MAKEOPTS) CC="$(KERNEL_CC)" oldconfig prepare scripts 
     61        -$(MAKE) $(KERNEL_MAKEOPTS) oldconfig prepare scripts 
    5862endef 
    5963define Kernel/Configure/Default 
     
    6771define Kernel/CompileModules/Default 
    6872        rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map 
    69         $(MAKE) $(KERNEL_MAKEOPTS) CC="$(KERNEL_CC)" modules 
     73        $(MAKE) $(KERNEL_MAKEOPTS) modules 
    7074endef 
    7175 
     
    9094define Kernel/CompileImage/Default 
    9195        $(call Kernel/SetInitramfs) 
    92         $(MAKE) $(KERNEL_MAKEOPTS) CC="$(KERNEL_CC)" $(KERNELNAME) 
     96        $(MAKE) $(KERNEL_MAKEOPTS) $(KERNELNAME) 
    9397        $(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $(LINUX_DIR)/vmlinux $(LINUX_KERNEL) 
    9498        $(KERNEL_CROSS)objcopy -R .reginfo -R .note -R .comment -R .mdebug -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux.elf 
  • trunk/include/kernel.mk

    r9405 r9408  
    2424 
    2525  ifneq (,$(findstring uml,$(BOARD))) 
    26     KERNEL_CC:=$(HOSTCC) 
    27     KERNEL_CROSS:= 
     26    KERNEL_CC?=$(HOSTCC) 
     27    KERNEL_CROSS?= 
    2828  else 
    29     KERNEL_CC:=$(TARGET_CC) 
    30     KERNEL_CROSS:=$(TARGET_CROSS) 
     29    KERNEL_CC?=$(TARGET_CC) 
     30    KERNEL_CROSS?=$(TARGET_CROSS) 
    3131  endif 
    3232 
Note: See TracChangeset for help on using the changeset viewer.