From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 172063856172; Thu, 20 Oct 2022 14:37:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 172063856172 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666276668; bh=mONKTQbDZBikvQLFg8qFph2J6hfPt74duQzZrAHdoB0=; h=From:To:Subject:Date:From; b=hH3Siby7HC+oiLo3rd7WZqSipU01Z3jA69U2lkRtS1CRVtrnPb1dEGN1qgIJ9T2Mu kz5k6uP/QZq3EkFkLYzLl1sWvmEJk5nLpgSWVRN2z6ythDuLoJjoQQEr3RXFh4lLjn Ot7iC5kEKMKqDgOfTU49FiydRLGuqCk07qwqg4Ns= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc] sysdeps: arm: Fix preconfigure script for ARMv8/v9 targets [BZ #29698] X-Act-Checkin: glibc X-Git-Author: Felix Riemann X-Git-Refname: refs/heads/master X-Git-Oldrev: 0ff92021c045ee53b91bd42fa3fbbb923a6ffb17 X-Git-Newrev: a885fc2d6897d3baa438e2594a92f0125f1258a9 Message-Id: <20221020143748.172063856172@sourceware.org> Date: Thu, 20 Oct 2022 14:37:48 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a885fc2d6897d3baa438e2594a92f0125f1258a9 commit a885fc2d6897d3baa438e2594a92f0125f1258a9 Author: Felix Riemann Date: Tue Oct 18 17:20:44 2022 +0200 sysdeps: arm: Fix preconfigure script for ARMv8/v9 targets [BZ #29698] 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 Reviewed-by: Adhemerval Zanella Diff: --- 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]) ;;