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 180DB158020 for ; Tue, 29 Nov 2022 00:00:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 51D4EE085A; Tue, 29 Nov 2022 00:00:24 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 39C7FE085A for ; Tue, 29 Nov 2022 00:00:24 +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 699C6335D04 for ; Tue, 29 Nov 2022 00:00:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D21AC766 for ; Tue, 29 Nov 2022 00:00:21 +0000 (UTC) From: "Andreas K. Hüttel" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas K. Hüttel" Message-ID: <1669680008.718448f923ae9302df1290f46ffea4d9198edd73.dilfridge@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: dilfridge X-VCS-Committer-Name: Andreas K. Hüttel X-VCS-Revision: 718448f923ae9302df1290f46ffea4d9198edd73 X-VCS-Branch: master Date: Tue, 29 Nov 2022 00:00:21 +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: 59487453-7572-4d63-902a-e1b47982da08 X-Archives-Hash: e7ca82ea305e112e4a60c4dc35d4c840 commit: 718448f923ae9302df1290f46ffea4d9198edd73 Author: Andreas K. Hüttel gentoo org> AuthorDate: Mon Nov 28 23:57:10 2022 +0000 Commit: Andreas K. Hüttel gentoo org> CommitDate: Tue Nov 29 00:00:08 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=718448f9 toolchain.eclass: Split -z now and -fstack-clash-protection out for gcc13 Signed-off-by: Andreas K. Hüttel gentoo.org> eclass/toolchain.eclass | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 2bed15110ece..f5230821cfde 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -277,6 +277,8 @@ if [[ ${PN} != kgcc64 && ${PN} != gcc-* ]] ; then tc_version_is_at_least 10 && IUSE+=" zstd" TC_FEATURES+=( zstd ) tc_version_is_at_least 11 && IUSE+=" valgrind" TC_FEATURES+=( valgrind ) tc_version_is_at_least 11 && IUSE+=" custom-cflags" + tc_version_is_at_least 12.99 && IUSE+=" default-znow" + tc_version_is_at_least 12.99 && IUSE+=" default-stack-clash-protection" fi if tc_version_is_at_least 10; then @@ -798,8 +800,18 @@ make_gcc_hard() { if _tc_use_if_iuse ssp ; then einfo "Updating gcc to use automatic SSP building ..." fi + if _tc_use_if_iuse default-stack-clash-protection ; then + # The define DEF_GENTOO_SCP is checked in 24_all_DEF_GENTOO_SCP-fstack-clash-protection.patch + einfo "Updating gcc to use automatic stack clash protection ..." + gcc_hard_flags+=" -DDEF_GENTOO_SCP" + fi + if _tc_use_if_iuse default-znow ; then + # The define DEF_GENTOO_NZOW is checked in 23_all_DEF_GENTOO_ZNOW-z-now.patch + einfo "Updating gcc to request symbol resolution at start (-z now) ..." + gcc_hard_flags+=" -DDEF_GENTOO_ZNOW" + fi if _tc_use_if_iuse hardened ; then - # Will add some hardened options as default, like: + # Will add some hardened options as default, e.g. for gcc-12 # * -fstack-clash-protection # * -z now # See gcc *_all_extra-options.patch patches.