aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2019-03-11 21:27:08 +0000
committerAndreas K. Hüttel <dilfridge@gentoo.org>2019-03-13 10:56:33 +0100
commit18b1979734f57726c0a601ade0505c2e4615947d (patch)
treec4d2fa4447b30c9bdee61d84b047e5d730f27cc9
parentBump to 2.16 (diff)
downloadsandbox-18b19797.tar.gz
sandbox-18b19797.tar.bz2
sandbox-18b19797.zip
configure.ac: fix libc.so.6 detection on ld.gold
As reported by Mike Lothian below failed as: $ ./configure LDFLAGS=-fuse-ld=gold > checking libc path... configure: error: Unable to determine LIBC PATH (/lib64/libc.so.6") The regression happened in 3c0010366 ("configure.ac: add lld detection support") where "attempt" keyword in verbose linker log was used as a hint to use bfd or gold output parser. Unfortunately ld.gold uses "Attempt" spelling. The change is to use the "[Aa]ttempt" substring matcher. Tweak the parser to also match on "[Aa]ttempt" explicitly. Tested on bfd, gold and lld. Reported-by: Mike Lothian Bug: https://bugs.gentoo.org/680034 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org> Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
-rw-r--r--configure.ac7
1 files changed, 4 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 8269b37..ca59928 100644
--- a/configure.ac
+++ b/configure.ac
@@ -345,10 +345,11 @@ try_link() {
}
LIBC_PATH=$(AS_IF(
dnl GNU linker (bfd & gold) searching for
- dnl "attempt to open /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../lib64/libc.so succeeded"
+ dnl (bfd) "attempt to open /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../lib64/libc.so succeeded"
+ dnl (gold) "/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: Attempt to open /lib64/libc.so.6 succeeded"
dnl if log does not contain "attempt" word then it's not a GNU linker
- [try_link -Wl,--verbose && grep -q attempt libctest.log],
- [$AWK '/ttempt to open/ { if (($(NF-1) ~ /\/libc\.so/) && ($NF == "succeeded")) LIBC = $(NF-1); }; END {print LIBC}' libctest.log],
+ [try_link -Wl,--verbose && grep -q '[[Aa]]ttempt' libctest.log],
+ [$AWK '/[[Aa]]ttempt to open/ { if (($(NF-1) ~ /\/libc\.so/) && ($NF == "succeeded")) LIBC = $(NF-1); }; END {print LIBC}' libctest.log],
dnl LLVM lld searching for latest (successful) entry of
dnl "ld.lld: /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../lib64/libc.so"
dnl "ld.lld: /lib64/libc.so.6"