From: Mike Baker Date: Fri, 4 Aug 2006 06:23:47 +0000 (+0000) Subject: yet more cleanup (make sure to honor TARGET_CC and not just TARGET_CROSS) X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ad24256f8fd117695b1cb69f8afab9118157d5d0;p=openwrt%2Fstaging%2Fansuel.git yet more cleanup (make sure to honor TARGET_CC and not just TARGET_CROSS) SVN-Revision: 4433 --- diff --git a/openwrt/include/kernel-build.mk b/openwrt/include/kernel-build.mk index e3f2d5daed..0f29a306bf 100644 --- a/openwrt/include/kernel-build.mk +++ b/openwrt/include/kernel-build.mk @@ -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 diff --git a/openwrt/package/madwifi/Makefile b/openwrt/package/madwifi/Makefile index 07e2c45399..96ca1baf36 100644 --- a/openwrt/package/madwifi/Makefile +++ b/openwrt/package/madwifi/Makefile @@ -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)" \ diff --git a/openwrt/target/image/generic/lzma-loader/Makefile b/openwrt/target/image/generic/lzma-loader/Makefile index f9beef4b8e..5bd01eefb6 100644 --- a/openwrt/target/image/generic/lzma-loader/Makefile +++ b/openwrt/target/image/generic/lzma-loader/Makefile @@ -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) \