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 9D1B9158094 for ; Thu, 23 Jun 2022 00:41:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B22A7E0AC8; Thu, 23 Jun 2022 00:41:15 +0000 (UTC) Received: from smtp.gentoo.org (mail.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 9A978E0AC8 for ; Thu, 23 Jun 2022 00:41:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 7CB91341004 for ; Thu, 23 Jun 2022 00:41:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D384E448 for ; Thu, 23 Jun 2022 00:41:12 +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: <1655944867.cac0e35d84c5c8460b2c11ef4aa36ff3004d234c.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/compiler-rt/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/compiler-rt/compiler-rt-14.0.4.ebuild sys-libs/compiler-rt/compiler-rt-14.0.5.ebuild sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild X-VCS-Directories: sys-libs/compiler-rt/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: cac0e35d84c5c8460b2c11ef4aa36ff3004d234c X-VCS-Branch: master Date: Thu, 23 Jun 2022 00:41:12 +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: 2eeae136-77fa-4ec1-97e2-ac78be96d4ca X-Archives-Hash: 5c7423d2ad4af6064aded0c93b05a962 commit: cac0e35d84c5c8460b2c11ef4aa36ff3004d234c Author: Sam James gentoo org> AuthorDate: Thu Jun 23 00:39:16 2022 +0000 Commit: Sam James gentoo org> CommitDate: Thu Jun 23 00:41:07 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cac0e35d sys-libs/compiler-rt: only override compiler for USE=clang if not using Clang When USE=clang, we used to force CC=${CHOST}-clang, CXX=${CHOST}-clang++, but this prevents overriding with a certain version of Clang. In my case, a world upgrade went awry where Clang got upgraded from 13->14, but compiler-rt hadn't yet been upgraded to the new slot, so my system Clang was broken. CC=clang-13 CXX=clang++-13 emerge -v1 ... sorted out the issue. So, don't override CC & CXX to be Clang if we know it's already Clang. That said, we probably still need to tweak the logic for when the compiler fails (for which we already have checks in the ebuild). Signed-off-by: Sam James gentoo.org> sys-libs/compiler-rt/compiler-rt-14.0.4.ebuild | 9 +++++++-- sys-libs/compiler-rt/compiler-rt-14.0.5.ebuild | 8 ++++++-- sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild | 8 ++++++-- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/sys-libs/compiler-rt/compiler-rt-14.0.4.ebuild b/sys-libs/compiler-rt/compiler-rt-14.0.4.ebuild index ff1e80b30fff..9a03b0678000 100644 --- a/sys-libs/compiler-rt/compiler-rt-14.0.4.ebuild +++ b/sys-libs/compiler-rt/compiler-rt-14.0.4.ebuild @@ -72,8 +72,13 @@ src_configure() { local nolib_flags=( -nodefaultlibs -lc ) if use clang; then - local -x CC=${CHOST}-clang - local -x CXX=${CHOST}-clang++ + # Only do this conditionally to allow overriding with + # e.g. CC=clang-13 in case of breakage + if ! tc-is-clang ; then + local -x CC=${CHOST}-clang + local -x CXX=${CHOST}-clang++ + fi + strip-unsupported-flags # ensure we can use clang before installing compiler-rt local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" diff --git a/sys-libs/compiler-rt/compiler-rt-14.0.5.ebuild b/sys-libs/compiler-rt/compiler-rt-14.0.5.ebuild index dcbada06ccf0..e5c0203110f9 100644 --- a/sys-libs/compiler-rt/compiler-rt-14.0.5.ebuild +++ b/sys-libs/compiler-rt/compiler-rt-14.0.5.ebuild @@ -72,8 +72,12 @@ src_configure() { local nolib_flags=( -nodefaultlibs -lc ) if use clang; then - local -x CC=${CHOST}-clang - local -x CXX=${CHOST}-clang++ + # Only do this conditionally to allow overriding with + # e.g. CC=clang-13 in case of breakage + if ! tc-is-clang ; then + local -x CC=${CHOST}-clang + local -x CXX=${CHOST}-clang++ + fi strip-unsupported-flags # ensure we can use clang before installing compiler-rt local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" diff --git a/sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild index 1a7cc5f2b724..c6913b149fa4 100644 --- a/sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild +++ b/sys-libs/compiler-rt/compiler-rt-15.0.0.9999.ebuild @@ -72,8 +72,12 @@ src_configure() { local nolib_flags=( -nodefaultlibs -lc ) if use clang; then - local -x CC=${CHOST}-clang - local -x CXX=${CHOST}-clang++ + # Only do this conditionally to allow overriding with + # e.g. CC=clang-13 in case of breakage + if ! tc-is-clang ; then + local -x CC=${CHOST}-clang + local -x CXX=${CHOST}-clang++ + fi strip-unsupported-flags # ensure we can use clang before installing compiler-rt local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}"