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 EE163158089 for ; Mon, 25 Sep 2023 02:07:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3E0BB2BC028; Mon, 25 Sep 2023 02:07:10 +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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 26B452BC028 for ; Mon, 25 Sep 2023 02:07:10 +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 5DA48335CA3 for ; Mon, 25 Sep 2023 02:07:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id ED3C21188 for ; Mon, 25 Sep 2023 02:07:07 +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: <1695607611.6302dd47e23ee32cfcb446355704ba8bc61b668e.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/toolchain.eclass X-VCS-Directories: eclass/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 6302dd47e23ee32cfcb446355704ba8bc61b668e X-VCS-Branch: master Date: Mon, 25 Sep 2023 02:07:07 +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: f01f0a5d-b00f-4f57-be2a-0b3b494efb11 X-Archives-Hash: f6785d92fd9649ff4a2707d755f307ec commit: 6302dd47e23ee32cfcb446355704ba8bc61b668e Author: Sam James gentoo org> AuthorDate: Mon Sep 25 00:05:20 2023 +0000 Commit: Sam James gentoo org> CommitDate: Mon Sep 25 02:06:51 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6302dd47 toolchain.eclass: fix should_we_gcc_config for major-version slotting Reported by the-horo on IRC. For example, with slot as major version: ``` $ gcc-config -c x86_64-pc-linux-gnu x86_64-pc-linux-gnu-13 $ gcc-config -S x86_64-pc-linux-gnu-13 x86_64-pc-linux-gnu 13 ``` so we're indeed comparing 13 with 13.2 and hence we decide to run gcc-config unnecessarily because we think it's a major version change. Fix that by taking into account tc_use_major_version_only and comparing based on GCCMAJOR for that case. Bug: https://bugs.gentoo.org/865835 Bug: https://bugs.gentoo.org/873505 Reported-by: the-horo Closes: https://github.com/gentoo/gentoo/pull/33042 Signed-off-by: Sam James gentoo.org> eclass/toolchain.eclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 6a88676b750d..d93068619cf9 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -2244,7 +2244,9 @@ should_we_gcc_config() { local curr_branch_ver=$(ver_cut 1-2 ${curr_config_ver}) - if [[ ${curr_branch_ver} == ${GCC_BRANCH_VER} ]] ; then + if tc_use_major_version_only && [[ ${curr_config_ver} == ${GCCMAJOR} ]] ; then + return 0 + elif ! tc_use_major_version_only && [[ ${curr_branch_ver} == ${GCC_BRANCH_VER} ]] ; then return 0 else # If we're installing a genuinely different compiler version,