diff options
author | Sam James <sam@gentoo.org> | 2021-11-27 19:41:34 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-11-27 19:46:28 +0000 |
commit | 98e481cd2d539c32a7a094d0e5ca6de36f9a0639 (patch) | |
tree | bf8f4390dc75709030473ade8f2906eb0984458a /eclass/toolchain.eclass | |
parent | sys-devel/gcc: restrict USE=cet description for >= gcc-11.2.1 (diff) | |
download | gentoo-98e481cd2d539c32a7a094d0e5ca6de36f9a0639.tar.gz gentoo-98e481cd2d539c32a7a094d0e5ca6de36f9a0639.tar.bz2 gentoo-98e481cd2d539c32a7a094d0e5ca6de36f9a0639.zip |
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 <sam@gentoo.org>
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r-- | eclass/toolchain.eclass | 5 |
1 files changed, 5 insertions, 0 deletions
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 |