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 86389158089 for ; Thu, 26 Oct 2023 16:48:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CA1762BC02C; Thu, 26 Oct 2023 16:48:06 +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 B65DB2BC02C for ; Thu, 26 Oct 2023 16:48:06 +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 024CF335C20 for ; Thu, 26 Oct 2023 16:48:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7749712C7 for ; Thu, 26 Oct 2023 16:48:04 +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: <1698338846.e51546df7ff0b4f452c0f4291de23fa083f3fa76.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: e51546df7ff0b4f452c0f4291de23fa083f3fa76 X-VCS-Branch: master Date: Thu, 26 Oct 2023 16:48:04 +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: ee6d383a-c2b4-4667-ad23-786344f854ba X-Archives-Hash: 8358b6d4015b35bd4e409f34492862a0 commit: e51546df7ff0b4f452c0f4291de23fa083f3fa76 Author: Sam James gentoo org> AuthorDate: Thu Oct 26 16:46:27 2023 +0000 Commit: Sam James gentoo org> CommitDate: Thu Oct 26 16:47:26 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e51546df toolchain.eclass: pass -fno-control-flow-redundancy, filter flags for older compilers too If we're *building* an older GCC, then these flags won't be supported later on during the boostrap process, so filter them out. Also, pass -fno-control-flow-redundancy given it makes the compiler unbearably slow (on a 3950x, it went from 2.5hours for pgo+lto+checking to 6+ hours) and it doesn't really benefit us there anyway. Signed-off-by: Sam James gentoo.org> eclass/toolchain.eclass | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 8df8b506b0b1..4fd884f5f0bc 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1535,6 +1535,18 @@ gcc_do_filter_flags() { fi fi + + if ver_test -lt 13.6 ; then + # These aren't supported by the just-built compiler either. + filter-flags -fharden-compares -fharden-conditional-branches \ + -fharden-control-flow-redundancy -fhardcfr-skip-leaf \ + -fhardcfr-check-exceptions -fhardcfr-check-returning-calls \ + '-fhardcfr-check-noreturn-calls=*' + fi + + # Makes things painfully slow and no real beenfit for the compiler. + append-flags $(test-flags-CC -fno-harden-control-flow-redundancy) + # Please use USE=lto instead (bug #906007). filter-lto