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 5A92915808B for ; Mon, 30 Sep 2024 01:52:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D8FC6E2A71; Mon, 30 Sep 2024 01:52:04 +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 BE2CBE2A71 for ; Mon, 30 Sep 2024 01:52:04 +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 CA10D3431F4 for ; Mon, 30 Sep 2024 01:52:03 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D406727F0 for ; Mon, 30 Sep 2024 01:52:01 +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: <1727661104.ea474da34fe1f904936f0f6b6e52d91364c36c95.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: ea474da34fe1f904936f0f6b6e52d91364c36c95 X-VCS-Branch: master Date: Mon, 30 Sep 2024 01:52:01 +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: 9522d06a-bf2d-4ad2-a000-ccc290bad999 X-Archives-Hash: 874444b1dd47f8eaa3950258ddccae53 commit: ea474da34fe1f904936f0f6b6e52d91364c36c95 Author: Sam James gentoo org> AuthorDate: Mon Sep 30 01:25:23 2024 +0000 Commit: Sam James gentoo org> CommitDate: Mon Sep 30 01:51:44 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea474da3 toolchain.eclass: unset _GLIBCXX_ASSERTIONS for stage1 with D bootstrap When bootstrapping D for >= GCC 12 - where we enable _GLIBCXX_ASSERTIONS by default for USE=hardened - using GCC 11, we run into trouble where an implementation detail of _GLIBCXX_ASSERTIONS changed: see PR104807, r12-7504-gd3a757af21ac33, and r12-7522-g4cb935cb69f120. Workaround this by just disabling _GLIBCXX_ASSERTIONS for the stage 1 compiler (where it's not particularly important anyway) when USE=hardened and we're building D. We could make this more conditional if needed but I don't think it's worth it. In fact, maybe we should do this unconditionally for a minor speed boost in building. Bug: https://gcc.gnu.org/PR104807 Bug: https://bugs.gentoo.org/940470 Signed-off-by: Sam James gentoo.org> eclass/toolchain.eclass | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index d6445ea3227e..b563277e90b1 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -2029,6 +2029,15 @@ gcc_do_make() { BOOT_LDFLAGS=${BOOT_LDFLAGS-"${abi_ldflags} ${LDFLAGS}"} LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" + # If we need to in future, we could really simplify this + # to just be unconditional for stage1. It doesn't really + # matter there. If we want to go in the other direction + # and make this more conditional, we could check if + # the bootstrap compiler is < GCC 12. See bug #940470. + if _tc_use_if_iuse d && use hardened ; then + STAGE1_CXXFLAGS+=" -U_GLIBCXX_ASSERTIONS" + fi + emakeargs+=( STAGE1_CFLAGS="${STAGE1_CFLAGS}" STAGE1_CXXFLAGS="${STAGE1_CXXFLAGS}"