- fix parsing the gcc version. Also look at the HOSTCC's version rather than a random gcc that may be installed.

Closes #961 and #1097
This commit is contained in:
Bernhard Reutner-Fischer 2006-11-28 10:06:48 +00:00
parent 085f7b3ed9
commit 784e010f2d
2 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@
######################################################################
dependencies: host-sed
@$(TOPDIR)/toolchain/dependencies/dependencies.sh
@HOSTCC="$(firstword $(HOSTCC))" $(TOPDIR)/toolchain/dependencies/dependencies.sh
dependencies-source:

View File

@ -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";