hopefully fix occasional uClibc/gcc build failures
authorFelix Fietkau <nbd@openwrt.org>
Thu, 13 Dec 2007 01:17:26 +0000 (01:17 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 13 Dec 2007 01:17:26 +0000 (01:17 +0000)
SVN-Revision: 9717

rules.mk
toolchain/uClibc/Makefile

index d36c99495310c2558f8c32b5ac5dbff65e53780a..b7257d73cb50bb99b7fed271ce8913d3737f6b46 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -30,7 +30,7 @@ BUILD_SUFFIX:=$(call qstrip,$(CONFIG_BUILD_SUFFIX))
 GCCV:=$(call qstrip,$(CONFIG_GCC_VERSION))
 SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
 
-OPTIMIZE_FOR_CPU:=$(ARCH)
+OPTIMIZE_FOR_CPU=$(ARCH)
 
 DL_DIR:=$(if $(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(call qstrip,$(CONFIG_DOWNLOAD_FOLDER)),$(TOPDIR)/dl)
 BIN_DIR:=$(TOPDIR)/bin
@@ -53,7 +53,7 @@ ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
   -include $(TOOLCHAIN_DIR)/info.mk
   REAL_GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux-uclibc
   GNU_TARGET_NAME=$(OPTIMIZE_FOR_CPU)-linux
-  TARGET_CROSS?=$(OPTIMIZE_FOR_CPU)-linux-uclibc-
+  TARGET_CROSS:=$(if $(TARGET_CROSS),$(TARGET_CROSS),$(OPTIMIZE_FOR_CPU)-linux-uclibc-)
 endif
 
 TARGET_PATH:=$(TOOLCHAIN_DIR)/bin:$(STAGING_DIR_HOST)/bin:$(STAGING_DIR)/usr/bin:$(PATH)
index 66e94eab25e68113ffdab61cb8faa58cd8d4f709..08f267001be7c3096a8e33c237acbd38a09f0e7b 100644 (file)
@@ -64,10 +64,11 @@ define Build/Configure
 endef
 
 UCLIBC_MAKE := PATH=$(TARGET_PATH) $(MAKE) -C $(PKG_BUILD_DIR) \
-               DEVEL_PREFIX=/ \
-               RUNTIME_PREFIX=/ \
-               HOSTCC="$(HOSTCC)" \
-               CPU_CFLAGS="$(TARGET_CFLAGS)"
+       $(TARGET_CONFIGURE_OPTS) \
+       DEVEL_PREFIX=/ \
+       RUNTIME_PREFIX=/ \
+       HOSTCC="$(HOSTCC)" \
+       CPU_CFLAGS="$(TARGET_CFLAGS)"
 
 define Build/Compile
        $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(PKG_BUILD_DIR)/Rules.mak