diff options
author | Sam James <sam@gentoo.org> | 2022-12-28 19:17:12 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-12-31 23:30:45 +0000 |
commit | 288bc9aff2e91f6a443e8c09f080ffc9f633b07e (patch) | |
tree | c58e48d1a3ede1aeaaaba4046be1588be88066b3 /eclass | |
parent | dev-db/sqlite: Stabilize 3.40.1 ppc, #889142 (diff) | |
download | gentoo-288bc9aff2e91f6a443e8c09f080ffc9f633b07e.tar.gz gentoo-288bc9aff2e91f6a443e8c09f080ffc9f633b07e.tar.bz2 gentoo-288bc9aff2e91f6a443e8c09f080ffc9f633b07e.zip |
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 <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain.eclass | 4 |
1 files changed, 4 insertions, 0 deletions
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" |