[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] config.sub: Normalize arm64-* to aarch64-*

From: John Ericson
Subject: Re: [PATCH] config.sub: Normalize arm64-* to aarch64-*
Date: Thu, 9 Jul 2020 14:07:42 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

I'll second that this is a good idea; Apple's "aarm64" has caused much trouble and is wholly unnecessary as Keno says.

Also, If we apply this first, the previous email with the macOS aarch64 config.guess support can be made more minimal.

On 7/9/20 2:02 AM, Keno Fischer wrote:
Apple tools use arm64-* in their triples to indicate an aarch64 CPU.
E.g. macOS 11.0 on aarch64 is `arm64-apple-darwin20.0.0`. That said,
these tools do accept the `aarch64-*` just fine as well (LLVM
normalizes internally). For config.sub, I think it makes sense to
normalize arm64-* to aarch64-*, since the latter is the established
way to refer to this architecture and likely what various configure
scripts, etc. are checking for. I tried this change on a few
autotools-based projects with `--build=arm64-apple-darwin` and
the builds seemed to go through well.
  ChangeLog                 | 4 ++++
  config.sub                | 3 +++
  testsuite/ | 2 ++
  3 files changed, 9 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index c787ce9..f995b31 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2020-07-09  Keno Fischer  <>
+       * config.sub: Normalize arm64-* to aarch64-*
  2020-06-28  John Ericson  <>
* config.sub: Properly parse the KERNEL-OS case.
diff --git a/config.sub b/config.sub
index ce89d5c..0634942 100755
--- a/config.sub
+++ b/config.sub
@@ -1104,6 +1104,9 @@ case $cpu-$vendor in
        xscale-* | xscalee[bl]-*)
                cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
+       arm64-*)
+               cpu=aarch64
+               ;;
# Recognize the canonical CPU Types that limit and/or modify the
        # company names they are paired with.
diff --git a/testsuite/ b/testsuite/
index d9639bc..197fffc 100644
--- a/testsuite/
+++ b/testsuite/
@@ -103,6 +103,8 @@ armv8a                                              
  armv8b-linux-gnueabi                          armv8b-unknown-linux-gnueabi
  armv8m                                                armv8m-unknown-none
  armv8r                                                armv8r-unknown-none
+arm64-apple-darwin20.0.0                       aarch64-apple-darwin20.0.0
+arm64-apple-ios                                        aarch64-apple-ios
  aros                                          i386-pc-aros
  asmjs                                         asmjs-unknown-none
  asmjs-emscripten                              asmjs-unknown-emscripten

reply via email to

[Prev in Thread] Current Thread [Next in Thread]