diff options
author | 2010-08-15 01:39:31 -0400 | |
---|---|---|
committer | 2010-08-15 01:39:31 -0400 | |
commit | 95aaa83ba6df1a2eaba4e1d42d39b1e1c438c063 (patch) | |
tree | 854a16310851be64db0730eb88aaf0e47ae46611 | |
parent | update autotool files (diff) | |
download | sandbox-95aaa83ba6df1a2eaba4e1d42d39b1e1c438c063.tar.gz sandbox-95aaa83ba6df1a2eaba4e1d42d39b1e1c438c063.tar.bz2 sandbox-95aaa83ba6df1a2eaba4e1d42d39b1e1c438c063.zip |
tweak gnu linker check for gold
URL: http://bugs.gentoo.org/291103
Reported-by: Franz Fellner <fellner@gmx.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r-- | configure.ac | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index 86b2c3f..5a2a0c8 100644 --- a/configure.ac +++ b/configure.ac @@ -304,14 +304,14 @@ try_link() { exit ${ret} ) 1>&AS_MESSAGE_LOG_FD } -LIBC_PATH=$( -if try_link -Wl,--verbose ; then - $AWK '/attempt to open/ { if (($4 ~ /\/libc\.so/) && ($5 == "succeeded")) LIBC = $4; }; END {print LIBC}' libctest.log -elif try_link -Wl,-m ; then - set -- `$EGREP -o '/[[^ ]]*/libc.so' libctest.log` - echo $1 -fi -) +LIBC_PATH=$(AS_IF( + dnl GNU linker (bfd & gold) + [try_link -Wl,--verbose], + [$AWK '/ttempt to open/ { if (($(NF-1) ~ /\/libc\.so/) && ($NF == "succeeded")) LIBC = $(NF-1); }; END {print LIBC}' libctest.log], + dnl Solaris linker + [try_link -Wl,-m], + [set -- `$EGREP -o '/[[^ ]]*/libc.so' libctest.log`; echo $1] +)) rm -f libctest* if test x"$LIBC_PATH" = x || ! test -r "$LIBC_PATH" ; then AC_MSG_ERROR([Unable to determine LIBC PATH ($LIBC_PATH)]) |