about summary refs log tree commit diff
path: root/sysdeps/aarch64
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2023-05-04 09:48:03 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2023-05-04 10:19:11 +0100
commit1a62d7e5c396aa755f10d283dc3a6bc0eb496be4 (patch)
tree48a65dee613e452c09e9114030c36157c342f9f0 /sysdeps/aarch64
parentcd94326a1326c4e3f1ee7a8d0a161cc0bdcaf07e (diff)
downloadglibc-1a62d7e5c396aa755f10d283dc3a6bc0eb496be4.tar.gz
glibc-1a62d7e5c396aa755f10d283dc3a6bc0eb496be4.tar.xz
glibc-1a62d7e5c396aa755f10d283dc3a6bc0eb496be4.zip
aarch64: fix SVE ACLE check for bootstrap glibc builds
arm_sve.h depends on stdint.h but that relies on libc headers unless
compiled in freestanding mode.  Without this change a bootstrap glibc
build (that uses a compiler without installed libc headers) failed with

checking for availability of SVE ACLE... In file included from [...]/arm_sve.h:28,
                 from conftest.c:1:
[...]/stdint.h:9:16: fatal error: stdint.h: No such file or directory
    9 | # include_next <stdint.h>
      |                ^~~~~~~~~~
compilation terminated.
configure: error: mathvec is enabled but compiler does not have SVE ACLE. [...]
Diffstat (limited to 'sysdeps/aarch64')
-rw-r--r--sysdeps/aarch64/configure2
-rw-r--r--sysdeps/aarch64/configure.ac2
2 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/aarch64/configure b/sysdeps/aarch64/configure
index 22ed9d38d2..d0d78d69f1 100644
--- a/sysdeps/aarch64/configure
+++ b/sysdeps/aarch64/configure
@@ -342,7 +342,7 @@ else
     cat > conftest.c <<EOF
 #include <arm_sve.h>
 EOF
-    if ! ${CC-cc} conftest.c -fsyntax-only; then
+    if ! ${CC-cc} conftest.c -fsyntax-only -ffreestanding; then
       as_fn_error 1 "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)."
     fi
     rm conftest.c
diff --git a/sysdeps/aarch64/configure.ac b/sysdeps/aarch64/configure.ac
index ba519c9053..259edc3de8 100644
--- a/sysdeps/aarch64/configure.ac
+++ b/sysdeps/aarch64/configure.ac
@@ -112,7 +112,7 @@ AC_CACHE_CHECK(for availability of SVE ACLE, libc_cv_has_sve_acle, [dnl
     cat > conftest.c <<EOF
 #include <arm_sve.h>
 EOF
-    if ! ${CC-cc} conftest.c -fsyntax-only; then
+    if ! ${CC-cc} conftest.c -fsyntax-only -ffreestanding; then
       as_fn_error 1 "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)."
     fi
     rm conftest.c