From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B0B5F158003 for ; Thu, 16 Feb 2023 22:59:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 089FAE0931; Thu, 16 Feb 2023 22:59:13 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E0AB2E0931 for ; Thu, 16 Feb 2023 22:59:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 09038341123 for ; Thu, 16 Feb 2023 22:59:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9B32E21 for ; Thu, 16 Feb 2023 22:59:10 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1676588343.190300def3160ca39bd8590d1bbc7305ae07cc5b.sam@gentoo> Subject: [gentoo-commits] proj/sandbox:master commit in: / X-VCS-Repository: proj/sandbox X-VCS-Files: configure.ac X-VCS-Directories: / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 190300def3160ca39bd8590d1bbc7305ae07cc5b X-VCS-Branch: master Date: Thu, 16 Feb 2023 22:59:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 0c075ae8-b041-4aef-99a6-63348d519ff2 X-Archives-Hash: 88a70904e62ea872ce02324e9b77624e commit: 190300def3160ca39bd8590d1bbc7305ae07cc5b Author: James Le Cuirot gentoo org> AuthorDate: Sat Jan 21 16:36:05 2023 +0000 Commit: Sam James gentoo org> CommitDate: Thu Feb 16 22:59:03 2023 +0000 URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=190300de build: Fix libc path configure test for mold bfd, gold, lld, and mold all support `-Wl,--trace`, which has cleaner output than `-Wl,--verbose`. mold doesn't output anything with the latter, so the test didn't support that until now. The only difference between them now is that mold prefixes its output with `trace: ` whereas the others do not. I checked the Solaris linker, but that does not support `-Wl,--trace`. Bug: https://bugs.gentoo.org/830463 Signed-off-by: James Le Cuirot gentoo.org> Closes: https://github.com/gentoo/sandbox/pull/5 Signed-off-by: Sam James gentoo.org> configure.ac | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 698051f..a2a0355 100644 --- a/configure.ac +++ b/configure.ac @@ -352,16 +352,11 @@ try_link() { ) 1>&AS_MESSAGE_LOG_FD } LIBC_PATH=$(AS_IF( - dnl GNU linker (bfd & gold) searching for - 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 '[[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" - [try_link -Wl,--verbose], + dnl GNU linkers (bfd, gold), LLVM lld, mold - searching for latest entry of: + dnl "/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/../../../../lib64/libc.so" + dnl "/lib64/libc.so.6" + dnl Note that mold prefixes output with "trace: " whereas others do not. + [try_link -Wl,--trace], [$EGREP -o '/[[^ ]]*/libc.so.*' libctest.log | tail -n1], dnl Solaris linker [try_link -Wl,-m],