about summary refs log tree commit diff
path: root/sysdeps/aarch64/configure.ac
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2023-05-05 09:01:58 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2023-05-05 11:34:44 +0100
commit642f1b9b3de8d847b43af928107057116eb6e7f1 (patch)
tree06d34c3100c98c2e1a59c138b086c5d4f86e6a9e /sysdeps/aarch64/configure.ac
parentee68e9cba456ed02f080cccd0c37af671bd48108 (diff)
downloadglibc-642f1b9b3de8d847b43af928107057116eb6e7f1.tar.gz
glibc-642f1b9b3de8d847b43af928107057116eb6e7f1.tar.xz
glibc-642f1b9b3de8d847b43af928107057116eb6e7f1.zip
aarch64: More configure checks for libmvec
Check assembler and linker support too, not just SVE ACLE in the
compiler, since variant PCS requires at least binutils 2.32.1.
Diffstat (limited to 'sysdeps/aarch64/configure.ac')
-rw-r--r--sysdeps/aarch64/configure.ac25
1 files changed, 22 insertions, 3 deletions
diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac
index 76f78fcba9..27874eceb4 100644
--- a/sysdeps/aarch64/configure.ac
+++ b/sysdeps/aarch64/configure.ac
@@ -106,7 +106,7 @@ if test x"$build_mathvec" = xnotset; then
   build_mathvec=yes
 fi
 
-# Check if compiler is sufficient to build mathvec (needs SVE ACLE)
+# Check if compiler supports SVE ACLE.
 AC_CACHE_CHECK(for availability of SVE ACLE, libc_cv_aarch64_sve_acle, [dnl
   cat > conftest.c <<EOF
 #include <arm_sve.h>
@@ -117,6 +117,25 @@ EOF
     libc_cv_aarch64_sve_acle=no
   fi
   rm conftest.c])
-if test $build_mathvec = yes && test $libc_cv_aarch64_sve_acle = no; then
-  AC_MSG_ERROR([mathvec is enabled but compiler does not have SVE ACLE. Either use a compatible compiler or configure with --disable-mathvec (this results in incomplete ABI).])
+
+# Check if compiler is sufficient to build mathvec
+if test $build_mathvec = yes; then
+  fail=no
+  if test $libc_cv_aarch64_variant_pcs = no; then
+    fail=yes
+    AC_MSG_WARN([mathvec is enabled but linker does not support variant PCS.])
+  fi
+  if test $libc_cv_aarch64_sve_asm = no; then
+    fail=yes
+    AC_MSG_WARN([mathvec is enabled but assembler does not support SVE.])
+  fi
+  if test $libc_cv_aarch64_sve_acle = no; then
+    fail=yes
+    AC_MSG_WARN([mathvec is enabled but compiler does not have SVE ACLE.])
+  fi
+  if test $fail = yes; then
+    AC_MSG_ERROR([use a compatible toolchain or configure with --disable-mathvec (this results in incomplete ABI).])
+  fi
+else
+  AC_MSG_WARN([mathvec is disabled, this results in incomplete ABI.])
 fi