- fix parsing the gcc version. Also look at the HOSTCC's version rather than a random...
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Tue, 28 Nov 2006 10:06:48 +0000 (10:06 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Tue, 28 Nov 2006 10:06:48 +0000 (10:06 -0000)
  Closes #961 and #1097

toolchain/dependencies/dependencies.mk
toolchain/dependencies/dependencies.sh

index 7febc1354a6988eeca55e1440c87b8be913af4d3..b814edad5ce96905299fc027641581fa74eb20a5 100644 (file)
@@ -6,7 +6,7 @@
 ######################################################################
 
 dependencies: host-sed
-       @$(TOPDIR)/toolchain/dependencies/dependencies.sh
+       @HOSTCC="$(firstword $(HOSTCC))" $(TOPDIR)/toolchain/dependencies/dependencies.sh
 
 dependencies-source:
 
index 427440bf060d8ea9f3dba9e9ce3ccdf29a65b2b7..2e031b0192c0656807fab8a374922c8228d8ec8a 100755 (executable)
@@ -61,7 +61,7 @@ echo "GNU make version '$MAKE_VERSION':           Ok"
 # check build system 'gcc'
 #
 #############################################################
-COMPILER=$(which gcc)
+COMPILER=$(which $HOSTCC)
 if [ -z "$COMPILER" ] ; then
        COMPILER=$(which cc)
        if [ -z "$COMPILER" ] ; then
@@ -70,7 +70,7 @@ if [ -z "$COMPILER" ] ; then
                exit 1;
        fi;
 fi;
-COMPILER_VERSION=$($COMPILER --version 2>&1 | head -n1 | $XSED -e 's/^.* \([0-9\.]\)/\1/g' -e "s/[-\ ].*//g")
+COMPILER_VERSION=$($COMPILER --version 2>&1 | head -n1 | $XSED -e 's/^.*(.CC) \([0-9\.]\)/\1/g' -e "s/[-\ ].*//g")
 if [ -z "$COMPILER_VERSION" ] ; then
        echo "gcc installed:                FALSE"
        echo -e "\n\nYou must install 'gcc' on your build machine\n";