From bc65432230a5fd858b4a158dd7b7650e82ca374e Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Mon, 19 Jan 2009 09:18:46 +0000 Subject: 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. --- package/Makefile.in | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'package/Makefile.in') 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' \ -- cgit v1.2.3-55-g7522