commit:     2aa4020e09554055db2d6a6f65c55370565a440e
Author:     Andrei Horodniceanu <a.horodniceanu <AT> proton <DOT> me>
AuthorDate: Wed Nov 13 09:31:00 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov 13 19:22:10 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2aa4020e

toolchain.eclass: unconditionally pass --disable-cet on x86

d6cb7a61dad7e9672a8448597835dbbf9b9e0ccf removed the check that passed
--enable-cet or --disable-cet to configure making the script fallback to
automagic. The goal was to prevent passing --enable-cet on x86 gnu
triples as that would lead to gcc failing to build under crossdev. Note
that this specific crossdev cet issue has been solved in crossdev by
package.use.mask'ing the cet USE flag for gcc on x86 but targets
configured before that can still have the cet USE flag enabled.

Bug: https://bugs.gentoo.org/943332
Signed-off-by: Andrei Horodniceanu <a.horodniceanu <AT> proton.me>
Closes: https://github.com/gentoo/gentoo/pull/39300
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/toolchain.eclass | 1 +
 1 file changed, 1 insertion(+)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 1f043de0b548..99db7916c91d 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1588,6 +1588,7 @@ toolchain_src_configure() {
 
                enable_cet_for 'x86_64' 'gnu' 'cet'
                enable_cet_for 'aarch64' 'gnu' 'standard-branch-protection'
+               [[ ${CTARGET} == i[34567]86-* ]] && confgcc+=( --disable-cet )
        fi
 
        if in_iuse systemtap ; then

Reply via email to