summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2009-01-19 09:18:46 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2009-01-19 09:18:46 +0000
commitbc65432230a5fd858b4a158dd7b7650e82ca374e (patch)
tree9d8086d1e9a3347fdeed53c934427e992eaf203a /toolchain
parent4bcbf87c99589433bfc0d39ad4e1b4b28bc8a15d (diff)
toolchain: introduce HOSTCC_VERSION and fix gcc-4.3.x build with old host CCs
gcc < 4.2.0 doesn't support -Wno-overlength-stings, but gcc-4.3.x configure fails to detect that, breaking the build. Work around it by detecting the host gcc version (and store in HOSTCC_VERSION) and set the proper configure variables for gcc < 4.2.0.
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/gcc/gcc-uclibc-4.x.mk11
1 files changed, 9 insertions, 2 deletions
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index 2bc25583f..fdc2fa4a3 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -145,6 +145,13 @@ ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y)
GCC_DECIMAL_FLOAT:=--disable-decimal-float
endif
+# gcc version < 4.2.0 don't have -Wno-overlength-strings and the configure
+# script has problems detecting it, so help it
+ifeq ($(shell test $(HOSTCC_VERSION) -lt 420 && echo OLD),OLD)
+GCC_CONF_ENV:=acx_cv_prog_cc_pedantic__Wno_long_long__Wno_variadic_macros_____________Wno_overlength_strings=no \
+ acx_cv_prog_cc_warning__Wno_overlength_strings=no
+endif
+
HOST_SOURCE+=gcc-source
$(DL_DIR)/$(GCC_SOURCE):
@@ -227,7 +234,7 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched
$(GCC_BUILD_DIR1)/.compiled: $(GCC_BUILD_DIR1)/.configured
# gcc >= 4.3.0 have to also build all-target-libgcc
ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y)
- $(MAKE) -C $(GCC_BUILD_DIR1) all-gcc all-target-libgcc
+ $(GCC_CONF_ENV) $(MAKE) -C $(GCC_BUILD_DIR1) all-gcc all-target-libgcc
else
$(MAKE) -C $(GCC_BUILD_DIR1) all-gcc
endif
@@ -301,7 +308,7 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_SRC_DIR)/.patched $(GCC_STAGING_PREREQ)
touch $@
$(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured
- $(MAKE) -C $(GCC_BUILD_DIR2) all
+ $(GCC_CONF_ENV) $(MAKE) -C $(GCC_BUILD_DIR2) all
touch $@
$(GCC_BUILD_DIR2)/.installed: $(GCC_BUILD_DIR2)/.compiled