diff options
author | 2024-06-24 02:26:18 +0100 | |
---|---|---|
committer | 2024-06-24 02:26:18 +0100 | |
commit | 8a2668b938264825869a7a0c6c7ac0799156cf96 (patch) | |
tree | 710563e331ce35dd842fc2a5913cddfd5a4fc40b /sys-libs/glibc | |
parent | dev-python/tornado: Stabilize 6.4.1 sparc, #934722 (diff) | |
download | gentoo-8a2668b938264825869a7a0c6c7ac0799156cf96.tar.gz gentoo-8a2668b938264825869a7a0c6c7ac0799156cf96.tar.bz2 gentoo-8a2668b938264825869a7a0c6c7ac0799156cf96.zip |
sys-libs/glibc: pass -fcf-protection=none based on CTARGET
Closes: https://bugs.gentoo.org/932250
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs/glibc')
-rw-r--r-- | sys-libs/glibc/glibc-2.39-r6.ebuild | 13 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.39-r7.ebuild | 13 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.39-r9.ebuild | 13 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-9999.ebuild | 13 |
4 files changed, 32 insertions, 20 deletions
diff --git a/sys-libs/glibc/glibc-2.39-r6.ebuild b/sys-libs/glibc/glibc-2.39-r6.ebuild index 6772a8cdcc8b..d4820cc75723 100644 --- a/sys-libs/glibc/glibc-2.39-r6.ebuild +++ b/sys-libs/glibc/glibc-2.39-r6.ebuild @@ -522,11 +522,14 @@ setup_flags() { # dealing with CET in ld.so. So if CET is supposed to be # disabled for glibc, be explicit about it. if ! use cet; then - if use amd64 || use x86; then - append-flags '-fcf-protection=none' - elif use arm64; then - append-flags '-mbranch-protection=none' - fi + case ${ABI}-${CTARGET} in + amd64-x86_64-*|x32-x86_64-*-*-gnux32) + append-flags '-fcf-protection=none' + ;; + arm64-aarch64*) + append-flags '-mbranch-protection=none' + ;; + esac fi } diff --git a/sys-libs/glibc/glibc-2.39-r7.ebuild b/sys-libs/glibc/glibc-2.39-r7.ebuild index ceafcc6e5084..90f211bebf68 100644 --- a/sys-libs/glibc/glibc-2.39-r7.ebuild +++ b/sys-libs/glibc/glibc-2.39-r7.ebuild @@ -522,11 +522,14 @@ setup_flags() { # dealing with CET in ld.so. So if CET is supposed to be # disabled for glibc, be explicit about it. if ! use cet; then - if use amd64 || use x86; then - append-flags '-fcf-protection=none' - elif use arm64; then - append-flags '-mbranch-protection=none' - fi + case ${ABI}-${CTARGET} in + amd64-x86_64-*|x32-x86_64-*-*-gnux32) + append-flags '-fcf-protection=none' + ;; + arm64-aarch64*) + append-flags '-mbranch-protection=none' + ;; + esac fi } diff --git a/sys-libs/glibc/glibc-2.39-r9.ebuild b/sys-libs/glibc/glibc-2.39-r9.ebuild index e6650fa8057d..da579ed2837b 100644 --- a/sys-libs/glibc/glibc-2.39-r9.ebuild +++ b/sys-libs/glibc/glibc-2.39-r9.ebuild @@ -515,11 +515,14 @@ setup_flags() { # dealing with CET in ld.so. So if CET is supposed to be # disabled for glibc, be explicit about it. if ! use cet; then - if use amd64 || use x86; then - append-flags '-fcf-protection=none' - elif use arm64; then - append-flags '-mbranch-protection=none' - fi + case ${ABI}-${CTARGET} in + amd64-x86_64-*|x32-x86_64-*-*-gnux32) + append-flags '-fcf-protection=none' + ;; + arm64-aarch64*) + append-flags '-mbranch-protection=none' + ;; + esac fi } diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index 270b0a868557..a1512de95b17 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -515,11 +515,14 @@ setup_flags() { # dealing with CET in ld.so. So if CET is supposed to be # disabled for glibc, be explicit about it. if ! use cet; then - if use amd64 || use x86; then - append-flags '-fcf-protection=none' - elif use arm64; then - append-flags '-mbranch-protection=none' - fi + case ${ABI}-${CTARGET} in + amd64-x86_64-*|x32-x86_64-*-*-gnux32) + append-flags '-fcf-protection=none' + ;; + arm64-aarch64*) + append-flags '-mbranch-protection=none' + ;; + esac fi } |