From: Antti Kantee Date: Fri, 26 Feb 2016 18:28:32 +0000 (+0000) Subject: build-rr: throw an explicit error if cc/ld version check fails X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=e943c5786b8de35dec307aee53af6a35ef71861d;p=osstest%2Frumprun.git build-rr: throw an explicit error if cc/ld version check fails --- diff --git a/build-rr.sh b/build-rr.sh index 52b896e..b65b6ed 100755 --- a/build-rr.sh +++ b/build-rr.sh @@ -312,7 +312,8 @@ checktools () vers=$(${CC:-cc} -E -dM - < /dev/null | awk ' /__GNUC__/ {version += 100*$3} /__GNUC_MINOR__/ {version += $3} - END { print version; if (version) exit 0; exit 1; }') + END { print version; if (version) exit 0; exit 1; }') \ + || unable to probe cc version if [ ${vers} -lt 406 ]; then die gcc is too old, need 4.6 or later. ${CC:+(\$CC: $CC)} elif [ ${vers} -lt 408 ]; then @@ -327,7 +328,8 @@ checktools () # check that ld is modern enough vers=$(${CC:-cc} -Wl,--version 2>&1 | awk ' /GNU ld.*Binutils/{version += 100*$NF} - END { print version; if (version) exit 0; exit 1; }') + END { print version; if (version) exit 0; exit 1; }') \ + || die unable to probe ld version if [ ${vers} -lt 222 ]; then die ld is too old, need 2.22 or later. probed version: ${vers} elif [ ${vers} -lt 225 ]; then