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 62054158086 for ; Sat, 27 Nov 2021 19:47:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A842E2BC01D; Sat, 27 Nov 2021 19:47:36 +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 1B9982BC00E for ; Sat, 27 Nov 2021 19:47:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 0410D342F27 for ; Sat, 27 Nov 2021 19:47:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 762011EA for ; Sat, 27 Nov 2021 19:47:33 +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: <1638042388.98e481cd2d539c32a7a094d0e5ca6de36f9a0639.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: 98e481cd2d539c32a7a094d0e5ca6de36f9a0639 X-VCS-Branch: master Date: Sat, 27 Nov 2021 19:47:33 +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: d43e8e36-dfac-47bf-802c-ea2e49ab4785 X-Archives-Hash: 5b80574b92e3619bc730a8364f8b69f1 commit: 98e481cd2d539c32a7a094d0e5ca6de36f9a0639 Author: Sam James gentoo org> AuthorDate: Sat Nov 27 19:41:34 2021 +0000 Commit: Sam James gentoo org> CommitDate: Sat Nov 27 19:46:28 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98e481cd toolchain.eclass: enable CET by default on hardened for >= gcc 11.2.1 11.2.1 will include a patch to enable CET by default if: - USE=cet is enabled, and - USE=hardened is enabled, and - building for x86_64. See: https://github.com/gentoo/gentoo/pull/21588 Signed-off-by: Sam James gentoo.org> eclass/toolchain.eclass | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index d80873fcd2e7..f2f16b7f804e 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -626,6 +626,11 @@ make_gcc_hard() { # -z now # see *_all_extra-options.patch gcc patches. gcc_hard_flags+=" -DEXTRA_OPTIONS" + + if _tc_use_if_iuse cet && [[ ${CTARGET} == *x86_64*-linux* ]] ; then + gcc_hard_flags+=" -DEXTRA_OPTIONS_CF" + fi + # rebrand to make bug reports easier BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/Gentoo/Gentoo Hardened} fi