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 3B3C215808B for ; Fri, 4 Oct 2024 11:49:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 32F9CE29E4; Fri, 4 Oct 2024 11:49:49 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 15BE1E29E4 for ; Fri, 4 Oct 2024 11:49:49 +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 F380E343051 for ; Fri, 4 Oct 2024 11:49:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 57A72F32 for ; Fri, 4 Oct 2024 11:49:46 +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: <1728042541.70a43aaf58504bb01c77faf58c96abe0b0ca856d.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: 70a43aaf58504bb01c77faf58c96abe0b0ca856d X-VCS-Branch: master Date: Fri, 4 Oct 2024 11:49:46 +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: f12f183a-d5de-4d8b-adaf-c15da1690cb4 X-Archives-Hash: 833fdd1edeaa5788931af991fd909a4b commit: 70a43aaf58504bb01c77faf58c96abe0b0ca856d Author: Sam James gentoo org> AuthorDate: Fri Oct 4 11:11:22 2024 +0000 Commit: Sam James gentoo org> CommitDate: Fri Oct 4 11:49:01 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70a43aaf toolchain.eclass: add ewarns to explain USE=-debug behaviour w/ unreleased GCC We sometimes have people surprised by the behaviour with USE=-debug for unreleased versions of GCC. For more detail on that & context, see: * 564b130fd1bc8a35ac4d673d5211654c49af3fda * 85db50a7c626a1844c8eb2d03051c8c5d320c205 * 3f9a5248fb796417d63ae1c1234b534a88f22f14 Add some ewarns to explain the situation to users so they understand their options and also don't wrongly think GCC will be slow when released. Bug: https://bugs.gentoo.org/904481 Signed-off-by: Sam James gentoo.org> eclass/toolchain.eclass | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index a2eba0a9297e..5b978f6871db 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1148,7 +1148,15 @@ toolchain_src_configure() { # unless USE=debug. Note that snapshots on stable branches don't count as "non-released" # for these purposes. if grep -q "experimental" gcc/DEV-PHASE ; then - # - USE=debug for pre-releases: yes,extra,rtl + # Tell users about the non-obvious behavior here so they don't think + # e.g. the next GCC release is super slow to compile things. + ewarn "Unreleased GCCs default to extra runtime checks even with USE=-debug," + ewarn "matching upstream default behavior. We recommend keeping these enabled." + ewarn "The checks (sometimes substantially) increase build time but provide important protection" + ewarn "from potential miscompilations (wrong code) by turning them into build-time errors." + ewarn "To override (not recommended), set: GCC_CHECKS_LIST=\"release\"." + + # - USE=debug for pre-releases: yes,extra,rtl (stornger than USE=debug for releases) # - USE=-debug for pre-releases: yes,extra (following upstream default) confgcc+=( --enable-checking="${GCC_CHECKS_LIST:-$(usex debug yes,extra,rtl yes,extra)}" ) else