diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2009-01-19 09:18:46 +0000 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2009-01-19 09:18:46 +0000 |
commit | bc65432230a5fd858b4a158dd7b7650e82ca374e (patch) | |
tree | 9d8086d1e9a3347fdeed53c934427e992eaf203a /package | |
parent | 4bcbf87c99589433bfc0d39ad4e1b4b28bc8a15d (diff) | |
download | buildroot-novena-bc65432230a5fd858b4a158dd7b7650e82ca374e.tar.gz buildroot-novena-bc65432230a5fd858b4a158dd7b7650e82ca374e.zip |
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 'package')
-rw-r--r-- | package/Makefile.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/package/Makefile.in b/package/Makefile.in index c430f8bf3..e9cf014f0 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -185,6 +185,10 @@ INSTALL=/usr/bin/install FLEX:=$(shell which flex || type -p flex) BISON:=$(shell which bison || type -p bison) +# hostcc version as an integer - E.G. 4.3.2 => 432 +HOSTCC_VERSION:=$(shell $(HOSTCC) --version | \ + sed -n 's/^.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[ ]*.*$$/\1\2\3/p') + HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \ -e 's/sparc.*/sparc/' \ -e 's/arm.*/arm/g' \ |