summaryrefslogtreecommitdiff
path: root/toolchain/dependencies
diff options
context:
space:
mode:
authorHamish Moffatt <hamish@cloud.net.au>2008-09-04 02:30:56 +0000
committerHamish Moffatt <hamish@cloud.net.au>2008-09-04 02:30:56 +0000
commitea8e74bcbee337c2034ac6aa78908caa9129a908 (patch)
tree82910643503ae567bb6b70a1d07c301f9b642718 /toolchain/dependencies
parentd74a92e00cc8d52b3de04444d8b687352a64bcb2 (diff)
Applied change from Ben Nizette and Hans-Christian Egtvedt to
correctly detect version of gcc on recent distros. Supplied patch was against git and didn't apply cleanly to svn, so applied by hand.
Diffstat (limited to 'toolchain/dependencies')
-rwxr-xr-xtoolchain/dependencies/dependencies.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/toolchain/dependencies/dependencies.sh b/toolchain/dependencies/dependencies.sh
index 170f43728..0e88d6967 100755
--- a/toolchain/dependencies/dependencies.sh
+++ b/toolchain/dependencies/dependencies.sh
@@ -188,7 +188,8 @@ if [ -z "$COMPILER" ] ; then
exit 1;
fi;
-COMPILER_VERSION=$($COMPILER --version 2>&1 | $XSED -e 's/^.*(.CC) \([0-9\.]\)/\1/g' -e "s/[-\ ].*//g" -e '1q')
+COMPILER_VERSION=$($COMPILER -v 2>&1 | $XSED -n '/^gcc version/p' |
+ $XSED -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q')
if [ -z "$COMPILER_VERSION" ] ; then
echo "gcc installed: FALSE"
/bin/echo -e "\n\nYou must install 'gcc' on your build machine\n";
@@ -215,7 +216,8 @@ if [ -z "$CXXCOMPILER" ] ; then
#exit 1
fi
if [ ! -z "$CXXCOMPILER" ] ; then
- CXXCOMPILER_VERSION=$($CXXCOMPILER --version 2>&1 | $XSED -e 's/^.*(.CC) \([0-9\.]\)/\1/g' -e "s/[-\ ].*//g" -e '1q')
+ CXXCOMPILER_VERSION=$($CXXCOMPILER -v 2>&1 | $XSED -n '/^gcc version/p' |
+ $XSED -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q')
if [ -z "$CXXCOMPILER_VERSION" ] ; then
echo "c++ installed: FALSE"
/bin/echo -e "\nYou may have to install 'g++' on your build machine\n"