mirror of git://sourceware.org/git/glibc.git
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>
This commit is contained in:
parent
2367bf468c
commit
73c26018ed
|
@ -325,9 +325,10 @@ then :
|
||||||
printf %s "(cached) " >&6
|
printf %s "(cached) " >&6
|
||||||
else $as_nop
|
else $as_nop
|
||||||
cat > conftest.s <<\EOF
|
cat > conftest.s <<\EOF
|
||||||
ptrue p0.b
|
.arch armv8.2-a+sve
|
||||||
|
ptrue p0.b
|
||||||
EOF
|
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 echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
||||||
(eval $ac_try) 2>&5
|
(eval $ac_try) 2>&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
|
|
|
@ -90,9 +90,10 @@ LIBC_CONFIG_VAR([aarch64-variant-pcs], [$libc_cv_aarch64_variant_pcs])
|
||||||
# Check if asm support armv8.2-a+sve
|
# Check if asm support armv8.2-a+sve
|
||||||
AC_CACHE_CHECK([for SVE support in assembler], [libc_cv_aarch64_sve_asm], [dnl
|
AC_CACHE_CHECK([for SVE support in assembler], [libc_cv_aarch64_sve_asm], [dnl
|
||||||
cat > conftest.s <<\EOF
|
cat > conftest.s <<\EOF
|
||||||
ptrue p0.b
|
.arch armv8.2-a+sve
|
||||||
|
ptrue p0.b
|
||||||
EOF
|
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
|
libc_cv_aarch64_sve_asm=yes
|
||||||
else
|
else
|
||||||
libc_cv_aarch64_sve_asm=no
|
libc_cv_aarch64_sve_asm=no
|
||||||
|
|
Loading…
Reference in New Issue