commit:     d56d8f8e35fa4f7b8d65dbd6cd535ad6ac69cc9c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 19 22:55:44 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep 19 22:57:19 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d56d8f8e

toolchain.eclass: disable automagic CET for x86

It's not supported on 32-bit kernels anyway.

This got lost in b6bf005b843e3d6ee10aa1f088d93c4f89055cc6 when wiring
up arm64.

Bug: https://bugs.gentoo.org/916381
Closes: https://bugs.gentoo.org/939874
Fixes: b6bf005b843e3d6ee10aa1f088d93c4f89055cc6
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/toolchain.eclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index a545f730ada7..0557db974035 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1310,7 +1310,9 @@ toolchain_src_configure() {
        fi
 
        if in_iuse cet ; then
-               [[ ${CTARGET} == x86_64-*-gnu* ]] && confgcc+=( $(use_enable 
cet) )
+               if [[ ${CTARGET} == i[[34567]]86-*-linux* || ${CTARGET} == 
x86_64-*-gnu* ]] ; then
+                       confgcc+=( $(use_enable cet) )
+               fi
                [[ ${CTARGET} == aarch64-*-gnu* ]] && confgcc+=( $(use_enable 
cet standard-branch-protection) )
        fi
 

Reply via email to