public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Felix Riemann <svc.sw.rte.linux@sma.de>
To: <libc-alpha@sourceware.org>
Cc: Felix Riemann <felix.riemann@sma.de>
Subject: [PATCH] sysdeps: arm: Fix preconfigure script for ARMv8/v9 targets [BZ #29698]
Date: Tue, 18 Oct 2022 17:20:44 +0200	[thread overview]
Message-ID: <20221018152044.14956-1-svc.sw.rte.linux@sma.de> (raw)

From: Felix Riemann <felix.riemann@sma.de>

The ARM preconfigure script tries to detect the capabilities of the
target platform by checking the compiler's predefined architecture
macros. However, if the compiler is tuning for AArch32 on ARMv8/v9 this
step fails:

checking for sysdeps preconfigure fragments... aarch64 alpha arc arm
WARNING: arm/preconfigure: Did not find ARM architecture type; using default

This is because preconfigure.ac doesn't escape the square brackets in
the glob for matching compilers targeting ARMv8. Adding another pair of
brackets to escape the first pair fixes this:

checking for sysdeps preconfigure fragments... aarch64 alpha arc arm
 Found compiler is configured for something newer than v7 - using v7

Signed-off-by: Felix Riemann <felix.riemann@sma.de>
---
 sysdeps/arm/preconfigure    | 2 +-
 sysdeps/arm/preconfigure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sysdeps/arm/preconfigure b/sysdeps/arm/preconfigure
index e95c988f29..326bede5b5 100644
--- a/sysdeps/arm/preconfigure
+++ b/sysdeps/arm/preconfigure
@@ -22,7 +22,7 @@ arm*)
     sed -n 's/^#define \(__ARM_ARCH_[0-9].*__\) .*$/\1/p'`
 
   case "x$archcppflag" in
-  x__ARM_ARCH_89*__)
+  x__ARM_ARCH_[89]*__)
     machine=armv7
     { $as_echo "$as_me:${as_lineno-$LINENO}: Found compiler is configured for something newer than v7 - using v7" >&5
 $as_echo "$as_me: Found compiler is configured for something newer than v7 - using v7" >&6;}
diff --git a/sysdeps/arm/preconfigure.ac b/sysdeps/arm/preconfigure.ac
index a523b4fb4c..a707385263 100644
--- a/sysdeps/arm/preconfigure.ac
+++ b/sysdeps/arm/preconfigure.ac
@@ -22,7 +22,7 @@ arm*)
     sed -n 's/^#define \(__ARM_ARCH_[0-9].*__\) .*$/\1/p'`
 
   case "x$archcppflag" in
-  x__ARM_ARCH_[89]*__)
+  x__ARM_ARCH_[[89]]*__)
     machine=armv7
     AC_MSG_NOTICE([Found compiler is configured for something newer than v7 - using v7])
     ;;
-- 
2.35.3


             reply	other threads:[~2022-10-18 15:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18 15:20 Felix Riemann [this message]
2022-10-19 17:26 ` Adhemerval Zanella Netto

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=20221018152044.14956-1-svc.sw.rte.linux@sma.de \
    --to=svc.sw.rte.linux@sma.de \
    --cc=felix.riemann@sma.de \
    --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).