yet more cleanup (make sure to honor TARGET_CC and not just TARGET_CROSS)
authorMike Baker <mbm@openwrt.org>
Fri, 4 Aug 2006 06:23:47 +0000 (06:23 +0000)
committerMike Baker <mbm@openwrt.org>
Fri, 4 Aug 2006 06:23:47 +0000 (06:23 +0000)
SVN-Revision: 4433

openwrt/include/kernel-build.mk
openwrt/package/madwifi/Makefile
openwrt/target/image/generic/lzma-loader/Makefile

index e3f2d5daedbea9145d028303ed319d143e0a1d62..0f29a306bf7b8e3c5aa15747fa805e69eed626b0 100644 (file)
@@ -33,11 +33,8 @@ $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE)
 
 ifeq ($(KERNEL),2.4)
 $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
-       $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" \
-         $(LINUX_DIR)/Makefile  \
-         $(LINUX_DIR)/arch/*/Makefile
        $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) oldconfig include/linux/compile.h include/linux/version.h
+       PATH="$(TARGET_PATH)" $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) oldconfig include/linux/compile.h include/linux/version.h
        touch $@
 
 $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured
@@ -47,7 +44,7 @@ $(LINUX_DIR)/.depend_done: $(LINUX_DIR)/.configured
 $(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.depend_done
 else
 $(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
-       $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) oldconfig prepare scripts
+       PATH="$(TARGET_PATH)" $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) oldconfig prepare scripts
        touch $@
 endif
 
@@ -66,16 +63,16 @@ else
 endif
 
 $(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.linux-compile pkg-install ramdisk-config
-       $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)"
+       PATH="$(TARGET_PATH)" $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH)
 
 $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux
-       $(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@
+       PATH="$(TARGET_PATH)" $(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@
        touch -c $(LINUX_KERNEL)
 
 $(LINUX_DIR)/.modules_done:
        rm -rf $(KERNEL_BUILD_DIR)/modules
-       $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" modules
-       $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" ARCH=$(LINUX_KARCH) PATH="$(TARGET_PATH)" DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install
+       PATH="$(TARGET_PATH)" $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) modules
+       PATH="$(TARGET_PATH)" $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(TARGET_CC)" ARCH=$(LINUX_KARCH) DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install
        touch $(LINUX_DIR)/.modules_done
 
 modules: $(LINUX_DIR)/.modules_done
index 07e2c4539966278fc145f401ac52de06b3a2e4bf..96ca1baf36021b2bfdb3b9c4b3c2b71312797102 100644 (file)
@@ -53,6 +53,7 @@ MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \
                PATH="$(TARGET_PATH)" \
                ARCH="$(LINUX_KARCH)" \
                CROSS_COMPILE="$(TARGET_CROSS)" \
+               CC="$(TARGET_CC)" \
                TARGET="$(HAL_TARGET)" \
                TOOLPREFIX="$(KERNEL_CROSS)" \
                TOOLPATH="$(KERNEL_CROSS)" \
index f9beef4b8e9f66cf7f52f7665e84d61351096353..5bd01eefb66179b698429345e55a1f8b4feffe55 100644 (file)
@@ -19,8 +19,8 @@ $(PKG_BUILD_DIR)/.prepared:
        touch $@
 
 $(PKG_BUILD_DIR)/lzma.elf: $(PKG_BUILD_DIR)/.prepared $(PKG_BUILD_DIR)/vmlinux.lzma
-       $(MAKE) -C $(PKG_BUILD_DIR) CC="$(TARGET_CC)" \
-               LD="$(TARGET_CROSS)ld" CROSS_COMPILE="$(TARGET_CROSS)" \
+       PATH="$(TARGET_PATH)" $(MAKE) -C $(PKG_BUILD_DIR) \
+               CC="$(TARGET_CC)" CROSS_COMPILE="$(TARGET_CROSS)" \
                RAMSIZE=$(RAMSIZE) \
                LOADADDR=$(LOADADDR) \
                KERNEL_ENTRY=$(KERNEL_ENTRY) \