summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-06-24 02:26:18 +0100
committerSam James <sam@gentoo.org>2024-06-24 02:26:18 +0100
commit8a2668b938264825869a7a0c6c7ac0799156cf96 (patch)
tree710563e331ce35dd842fc2a5913cddfd5a4fc40b /sys-libs/glibc
parentdev-python/tornado: Stabilize 6.4.1 sparc, #934722 (diff)
downloadgentoo-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.ebuild13
-rw-r--r--sys-libs/glibc/glibc-2.39-r7.ebuild13
-rw-r--r--sys-libs/glibc/glibc-2.39-r9.ebuild13
-rw-r--r--sys-libs/glibc/glibc-9999.ebuild13
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
}