mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-11-23 23:27:12 -08:00
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>
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user