aboutsummaryrefslogtreecommitdiff
path: root/libbutl/target-triplet.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-11-30 13:10:26 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-11-30 13:10:26 +0200
commit819741778f6ad75b5b104d2107a8fd9e30d4d4e5 (patch)
treeb739eae356940f3a2de4826bc6ff080a29c686c6 /libbutl/target-triplet.cxx
parentb8b1c49215be6d042bb27e934597251e21d26951 (diff)
Canonicalize arm64 to aarch64 in target triplet, similar to config.sub
Diffstat (limited to 'libbutl/target-triplet.cxx')
-rw-r--r--libbutl/target-triplet.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/libbutl/target-triplet.cxx b/libbutl/target-triplet.cxx
index 17337b3..db71e3c 100644
--- a/libbutl/target-triplet.cxx
+++ b/libbutl/target-triplet.cxx
@@ -48,7 +48,12 @@ namespace butl
if (f == 0 || f == string::npos)
bad ("missing cpu");
- cpu.assign (s, 0, f);
+ // Canonicalize CPU.
+ //
+ if (s.compare (0, f, "arm64") == 0)
+ cpu = "aarch64";
+ else
+ cpu.assign (s, 0, f);
// If we have something in between, then the first component after CPU is
// VENDOR. Unless it is a first component of two-component system, as in