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 AB4CC15800D for ; Sat, 31 Dec 2022 23:49:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EDE4CE07E1; Sat, 31 Dec 2022 23:49:40 +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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CEC35E07EA for ; Sat, 31 Dec 2022 23:49:40 +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 C7C64340DE7 for ; Sat, 31 Dec 2022 23:49:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D99ED76A for ; Sat, 31 Dec 2022 23:49:37 +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: <1672529445.288bc9aff2e91f6a443e8c09f080ffc9f633b07e.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: 288bc9aff2e91f6a443e8c09f080ffc9f633b07e X-VCS-Branch: master Date: Sat, 31 Dec 2022 23:49:37 +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: 2334b0a4-acc8-421f-acf8-c6f17321e2ca X-Archives-Hash: 41849c78db83a53d6cb5ce63f3c742a8 commit: 288bc9aff2e91f6a443e8c09f080ffc9f633b07e Author: Sam James gentoo org> AuthorDate: Wed Dec 28 19:17:12 2022 +0000 Commit: Sam James gentoo org> CommitDate: Sat Dec 31 23:30:45 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=288bc9af toolchain.eclass: prepare for USE=hardened => FORTIFY_SOURCE=3, assertions USE=hardened will now imply: - default -D_FORTIFY_SOURCE=3 (instead of 2 for normal profiles) - default -D_GLIBCXX_ASSERTIONS Bug: https://bugs.gentoo.org/876895 Bug: https://bugs.gentoo.org/884417 Bug: https://bugs.gentoo.org/847148 Bug: https://bugs.gentoo.org/876893 Signed-off-by: Sam James gentoo.org> eclass/toolchain.eclass | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 021db270828c..0dd23d93e383 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -820,6 +820,10 @@ make_gcc_hard() { # * -z now # See gcc *_all_extra-options.patch patches. gcc_hard_flags+=" -DEXTRA_OPTIONS" + # Default to -D_FORTIFY_SOURCE=3 instead of -D_FORTIFY_SOURCE=2 + gcc_hard_flags+=" -DGENTOO_FORTIFY_SOURCE_LEVEL=3" + # Add -D_GLIBCXX_ASSERTIONS + gcc_hard_flags+=" -DDEF_GENTOO_GLIBCXX_ASSERTIONS" if _tc_use_if_iuse cet && [[ ${CTARGET} == *x86_64*-linux* ]] ; then gcc_hard_flags+=" -DEXTRA_OPTIONS_CF"