--- a/make/autoconf/toolchain.m4 Tue Apr 03 10:01:04 2018 -0700
+++ b/make/autoconf/toolchain.m4 Tue Apr 03 21:50:35 2018 +0200
@@ -597,8 +597,9 @@
# solstudio cc requires us to have an existing file to pass as argument,
# but it need not be a syntactically correct C file, so just use
- # ourself. :)
- LINKER_VERSION_STRING=`$LD -Wl,-V $TOPDIR/configure 2>&1 | $HEAD -n 1 | $SED -e 's/ld: //'`
+ # ourself. :) The intermediate 'cat' is needed to stop ld from leaving
+ # a lingering a.out (!).
+ LINKER_VERSION_STRING=`$LD -Wl,-V $TOPDIR/configure 2>&1 | $CAT | $HEAD -n 1 | $SED -e 's/ld: //'`
# Extract version number
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
$SED -e 's/.* \([0-9][0-9]*\.[0-9][0-9]*\)-\([0-9][0-9]*\.[0-9][0-9]*\)/\1.\2/'` ]