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 6966315852A for ; Fri, 16 Aug 2024 17:21:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6CDD92BC05E; Fri, 16 Aug 2024 17:21:50 +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 4ADE42BC05E for ; Fri, 16 Aug 2024 17:21:50 +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 66A66342FA6 for ; Fri, 16 Aug 2024 17:21:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AC5351EFA for ; Fri, 16 Aug 2024 17:21:46 +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: <1723828882.83344561685a21cf36b2349b94f3a579537a506d.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/toolchain-funcs.eclass X-VCS-Directories: eclass/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 83344561685a21cf36b2349b94f3a579537a506d X-VCS-Branch: master Date: Fri, 16 Aug 2024 17:21:46 +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: 2707f601-ff23-4db2-bb40-b785daad47f4 X-Archives-Hash: 34e0d1556a6d61b0ec7cdb65a4d3b373 commit: 83344561685a21cf36b2349b94f3a579537a506d Author: Sam James gentoo org> AuthorDate: Fri Aug 16 16:42:19 2024 +0000 Commit: Sam James gentoo org> CommitDate: Fri Aug 16 17:21:22 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83344561 toolchain-funcs.eclass: tc-ld-force-bfd: mangle CFLAGS, CXXFLAGS too This is kind of related to what Ionen mentioned at https://github.com/gentoo/gentoo/pull/28355#discussion_r1033001927 but a bit different. Makefile rules are inconsistent, as are users, and -fuse-ld= might appear in C{,XX}FLAGS, not just LDFLAGS. Append -fuse-ld=bfd there too if asked to force bfd. This might cause problems with Clang because the argument is unused. See the mess in ddba1d149e82dba88b72f992729ad4158f640e32. Not having flag-o-matic here makes things a bit awkward. Let's try the naive approach first because it seemed OK for me with Clang with a quick test. Signed-off-by: Sam James gentoo.org> eclass/toolchain-funcs.eclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 5c15f4fb93a1..bc1fb064fc45 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -615,6 +615,8 @@ tc-ld-force-bfd() { # Set up LDFLAGS to select bfd based on the gcc / clang version. if tc-is-gcc || tc-is-clang ; then + export CFLAGS="${CFLAGS} -fuse-ld=bfd" + export CXXFLAGS="${CXXFLAGS} -fuse-ld=bfd" export LDFLAGS="${LDFLAGS} -fuse-ld=bfd" fi }