public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Szabolcs Nagy <szabolcs.nagy@arm.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: Joe Ramsay <Joe.Ramsay@arm.com>, <libc-alpha@sourceware.org>
Subject: [COMMITTED] aarch64: fix SVE ACLE check for bootstrap glibc builds
Date: Thu, 4 May 2023 10:41:45 +0100	[thread overview]
Message-ID: <ZFN92WpGo0rGmhCa@arm.com> (raw)
In-Reply-To: <59eac67e-2ad2-c583-624e-bb1086a32081@codesourcery.com>

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. [...]
---
 sysdeps/aarch64/configure    | 2 +-
 sysdeps/aarch64/configure.ac | 2 +-
 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
-- 
2.25.1

      reply	other threads:[~2023-05-04  9:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-12 13:37 [PATCH v5 2/2] Enable libmvec support for AArch64 Joe Ramsay
2023-05-03 10:36 ` Szabolcs Nagy
2023-05-03 16:50   ` Joseph Myers
2023-05-04  9:41     ` Szabolcs Nagy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZFN92WpGo0rGmhCa@arm.com \
    --to=szabolcs.nagy@arm.com \
    --cc=Joe.Ramsay@arm.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).