forked from rpms/glibc
b88a2e4886
Upstream commit: 31da30f23cddd36db29d5b6a1c7619361b271fb4
- iconv: ISO-2022-CN-EXT: fix out-of-bound writes when writing escape sequence (CVE-2024-2961)
Resolves: RHEL-31801
- x86_64: Exclude SSE, AVX and FMA4 variants in libm multiarch
- Apply the Makefile sorting fix
- powerpc: Fix ld.so address determination for PCREL mode (bug 31640)
- x86-64: Simplify minimum ISA check ifdef conditional with if
- x86-64: Don't use SSE resolvers for ISA level 3 or above
- AArch64: Check kernel version for SVE ifuncs
- aarch64: fix check for SVE support in assembler
- aarch64/fpu: Sync libmvec routines from 2.39 and before with AOR
- i386: Use generic memrchr in libc (bug 31316)
Related: RHEL-35602
Fedora 40 commit: 1bea1361dc
55 lines
2.0 KiB
Diff
55 lines
2.0 KiB
Diff
commit 395a89f61e19fa916ae4cc93fc10d81a28ce3039
|
|
Author: Szabolcs Nagy <szabolcs.nagy@arm.com>
|
|
Date: Wed Mar 13 14:34:14 2024 +0000
|
|
|
|
aarch64: fix check for SVE support in assembler
|
|
|
|
Due to GCC bug 110901 -mcpu can override -march setting when compiling
|
|
asm code and thus a compiler targetting a specific cpu can fail the
|
|
configure check even when binutils gas supports SVE.
|
|
|
|
The workaround is that explicit .arch directive overrides both -mcpu
|
|
and -march, and since that's what the actual SVE memcpy uses the
|
|
configure check should use that too even if the GCC issue is fixed
|
|
independently.
|
|
|
|
Reviewed-by: Florian Weimer <fweimer@redhat.com>
|
|
(cherry picked from commit 73c26018ed0ecd9c807bb363cc2c2ab4aca66a82)
|
|
|
|
diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure
|
|
old mode 100644
|
|
new mode 100755
|
|
index ca57edce472e4507..9606137e8ddae545
|
|
--- a/sysdeps/aarch64/configure
|
|
+++ b/sysdeps/aarch64/configure
|
|
@@ -325,9 +325,10 @@ then :
|
|
printf %s "(cached) " >&6
|
|
else $as_nop
|
|
cat > conftest.s <<\EOF
|
|
- ptrue p0.b
|
|
+ .arch armv8.2-a+sve
|
|
+ ptrue p0.b
|
|
EOF
|
|
-if { ac_try='${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&5'
|
|
+if { ac_try='${CC-cc} -c conftest.s 1>&5'
|
|
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
|
(eval $ac_try) 2>&5
|
|
ac_status=$?
|
|
diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac
|
|
index 27874eceb44911e4..56d12d661d726892 100644
|
|
--- a/sysdeps/aarch64/configure.ac
|
|
+++ b/sysdeps/aarch64/configure.ac
|
|
@@ -90,9 +90,10 @@ LIBC_CONFIG_VAR([aarch64-variant-pcs], [$libc_cv_aarch64_variant_pcs])
|
|
# Check if asm support armv8.2-a+sve
|
|
AC_CACHE_CHECK([for SVE support in assembler], [libc_cv_aarch64_sve_asm], [dnl
|
|
cat > conftest.s <<\EOF
|
|
- ptrue p0.b
|
|
+ .arch armv8.2-a+sve
|
|
+ ptrue p0.b
|
|
EOF
|
|
-if AC_TRY_COMMAND(${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&AS_MESSAGE_LOG_FD); then
|
|
+if AC_TRY_COMMAND(${CC-cc} -c conftest.s 1>&AS_MESSAGE_LOG_FD); then
|
|
libc_cv_aarch64_sve_asm=yes
|
|
else
|
|
libc_cv_aarch64_sve_asm=no
|