diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-11-28 10:06:48 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2006-11-28 10:06:48 +0000 |
commit | 784e010f2da834b6748e5521e2948880c0cff27e (patch) | |
tree | 38cc3d443d8ed570a86eefb3b3f382c7fd86adc5 | |
parent | 085f7b3ed98d8bb7ae3efaf849e0c5a6d1d1b2f4 (diff) | |
download | buildroot-novena-784e010f2da834b6748e5521e2948880c0cff27e.tar.gz buildroot-novena-784e010f2da834b6748e5521e2948880c0cff27e.zip |
- 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
-rw-r--r-- | toolchain/dependencies/dependencies.mk | 2 | ||||
-rwxr-xr-x | toolchain/dependencies/dependencies.sh | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/toolchain/dependencies/dependencies.mk b/toolchain/dependencies/dependencies.mk index 7febc1354..b814edad5 100644 --- a/toolchain/dependencies/dependencies.mk +++ b/toolchain/dependencies/dependencies.mk @@ -6,7 +6,7 @@ ###################################################################### dependencies: host-sed - @$(TOPDIR)/toolchain/dependencies/dependencies.sh + @HOSTCC="$(firstword $(HOSTCC))" $(TOPDIR)/toolchain/dependencies/dependencies.sh dependencies-source: diff --git a/toolchain/dependencies/dependencies.sh b/toolchain/dependencies/dependencies.sh index 427440bf0..2e031b019 100755 --- a/toolchain/dependencies/dependencies.sh +++ b/toolchain/dependencies/dependencies.sh @@ -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"; |