From 819741778f6ad75b5b104d2107a8fd9e30d4d4e5 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 30 Nov 2020 13:10:26 +0200 Subject: Canonicalize arm64 to aarch64 in target triplet, similar to config.sub --- libbutl/target-triplet.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libbutl/target-triplet.cxx') 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 -- cgit v1.1