aboutsummaryrefslogtreecommitdiff
path: root/libbutl/target-triplet.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbutl/target-triplet.cxx')
-rw-r--r--libbutl/target-triplet.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/libbutl/target-triplet.cxx b/libbutl/target-triplet.cxx
index 209f75e..e28f119 100644
--- a/libbutl/target-triplet.cxx
+++ b/libbutl/target-triplet.cxx
@@ -88,6 +88,13 @@ namespace butl
if (system.front () == '-' || system.back () == '-')
bad ("invalid os/kernel/abi");
+ // Canonicalize SYSTEM.
+ //
+ if (system == "linux")
+ system = "linux-gnu"; // Per config.sub.
+ else if (system == "windows-gnu" && vendor == "w64") // Clang's innovation.
+ system = "mingw32";
+
// Extract VERSION for some recognized systems.
//
string::size_type v (0);