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 4073F158094 for ; Thu, 29 Sep 2022 22:36:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5DC67E0CED; Thu, 29 Sep 2022 22:36:05 +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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 49D9DE0CED for ; Thu, 29 Sep 2022 22:36:05 +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 530A0340DF2 for ; Thu, 29 Sep 2022 22:36:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CA2675EE for ; Thu, 29 Sep 2022 22:36:02 +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: <1664490957.3e49f724d090d65b739be1a67f6c40574337a2f7.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: 3e49f724d090d65b739be1a67f6c40574337a2f7 X-VCS-Branch: master Date: Thu, 29 Sep 2022 22:36:02 +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: ac65f524-7028-402e-b35b-bb09cc07ea59 X-Archives-Hash: 25661770ec5b1ddc997a17ee7f0c7e49 commit: 3e49f724d090d65b739be1a67f6c40574337a2f7 Author: Sam James gentoo org> AuthorDate: Thu Sep 29 22:12:12 2022 +0000 Commit: Sam James gentoo org> CommitDate: Thu Sep 29 22:35:57 2022 +0000 URL: https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=3e49f724 gcc-config: set CCACHE_COMPILERCHECK to major GCC version This avoids invalidating caches on every GCC snapshot bump for the same major version (e.g. 12.2.1_p*), but also for 12.1 -> 12.2. It should be fine to mix objects between such versions. If needed, we can swap this to just stripping .1_p* but that's a bit more awkward. Bug: https://bugs.gentoo.org/872971 Signed-off-by: Sam James gentoo.org> gcc-config | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gcc-config b/gcc-config index 44a3869..dfc01d0 100755 --- a/gcc-config +++ b/gcc-config @@ -747,6 +747,14 @@ switch_profile() { echo "LDPATH=\"${MY_LDPATH}\"" >> "${envd}.tmp" fi + # Avoid ccache cache invalidations where possible between + # snapshots and minor GCC versions, bug #872971. + # For GCC 10, we changed the slotting from e.g. 10.4 -> 10. + local gcc_major_version="${CC_COMP_VERSION%%.*}" + if [[ "${gcc_major_version}" -ge 10 ]] ; then + echo "CCACHE_COMPILERCHECK=\"string:gcc-${gcc_major_version}\"" >> "${envd}.tmp" + fi + # Punt old files; maybe globs too much, but oh well # 'NATIVE' and '.NATIVE' were used by gcc-wrapper before Aug 2018 # and are not used as wrapper is removed.