]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
sysdeps: arm: Fix preconfigure script for ARMv8/v9 targets [BZ #29698]
authorFelix Riemann <felix.riemann@sma.de>
Tue, 18 Oct 2022 15:20:44 +0000 (17:20 +0200)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 20 Oct 2022 14:23:05 +0000 (11:23 -0300)
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>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
sysdeps/arm/preconfigure
sysdeps/arm/preconfigure.ac

index e95c988f290b8fe5c4ad028a211364e52eb810ed..326bede5b5bcf398dbf54c5b1317e5c468feb6ae 100644 (file)
@@ -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;}
index a523b4fb4c714741ba83848ceebc754f4e23fab3..a70738526311c0b0ed21b175eec0bee90c850025 100644 (file)
@@ -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])
     ;;