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 9C6AE158094 for ; Sun, 9 Oct 2022 20:55:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A51D0E089A; Sun, 9 Oct 2022 20:55:37 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8C9B6E089A for ; Sun, 9 Oct 2022 20:55:37 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B132033BE23 for ; Sun, 9 Oct 2022 20:55:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E2B28584 for ; Sun, 9 Oct 2022 20:55:34 +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: <1665348926.3ba93fbb30984b59eb99883292f336e6a0b1ea8b.sam@gentoo> Subject: [gentoo-commits] proj/gcc-config:master commit in: / X-VCS-Repository: proj/gcc-config X-VCS-Files: gcc-config X-VCS-Directories: / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 3ba93fbb30984b59eb99883292f336e6a0b1ea8b X-VCS-Branch: master Date: Sun, 9 Oct 2022 20:55:34 +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: 402b40bf-0f00-4a62-87cc-7ad482227b5b X-Archives-Hash: dea46a19dc3732855a8363b9fe0942ca commit: 3ba93fbb30984b59eb99883292f336e6a0b1ea8b Author: Sam James gentoo org> AuthorDate: Sun Oct 9 20:33:59 2022 +0000 Commit: Sam James gentoo org> CommitDate: Sun Oct 9 20:55:26 2022 +0000 URL: https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=3ba93fbb gcc-config: update /etc/clang/gentoo-gcc-install.cfg if exists * Set '--gcc-install-dir' for Clang to direct it to the currently active GCC installation. * Only write to /etc/clang/gentoo-gcc-install.cfg if it already exists to allow us to back out the change gracefully (by stopping installation in sys-devel/clang-common) as there's some concerns wrt sysroot compatibility. Bug: https://github.com/llvm/llvm-project/issues/57570 Bug: https://bugs.gentoo.org/868639 Signed-off-by: Sam James gentoo.org> gcc-config | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gcc-config b/gcc-config index dfc01d0..31a7f4a 100755 --- a/gcc-config +++ b/gcc-config @@ -783,6 +783,21 @@ switch_profile() { find "${pkgconfdir}"/libgcj*.pc -xtype l -delete 2>/dev/null done + # Only update the file if it already exists to allow us to + # walk it back if necessary by dropping it from clang-common. + # See bug #868639 for background. + if [[ -f "${EROOT}/etc/clang/gentoo-gcc-install.cfg" ]] ; then + local gcc_lib_path="$(get_lib_path)" + gcc_lib_path="${gcc_lib_path%%:*}" + cat > "${EROOT}/etc/clang/gentoo-gcc-install.cfg.tmp" <<-EOF + # This file is maintained by gcc-config. + # It is used to specify the selected GCC installation. + --gcc-install-dir="${gcc_lib_path}" + EOF + + mv_if_diff "${EROOT}/etc/clang/gentoo-gcc-install.cfg.tmp" "${EROOT}/etc/clang/gentoo-gcc-install.cfg" + fi + prefix_copy_gcc_libs handle_split_usr : $(( envd_changed += $? ))