config.sub: Accept LLVM-style $cpu-$vendor-windows-{gnu,msvc}

In older times, MinGW (GCC toolchain with modified windows headers) was
the only free software toolchain for Windows.  But now, LLVM has support
both for MinGW ABI and Microsoft's own.  The distinction matters for C++
more than C.

LLVM[1], Rust[2], and other projects have taken to differentiating these
two as `...windows-gnu` vs `...windows-msvc`.  I think that makes a lot
of sense, as it correctly identifiers both their commonalities and their
differences.

A lot of MinGW-supporting software, most notably GCC itself, will
presumably continue to use configs like x86_64-pc-mingw32 and
i686-pc-mingw32.  That's fine; this patch doesn't normalize them away
(like LLVM does) or remove them!  If and when that software wants to
support the MSVC ABI without requiring MSVC itself, they can switch to
these newer configurations.

[1]: a18266473b/llvm/unittests/TargetParser/TripleTest.cpp (L1907-L1951)
[2]: 36fb58e433/compiler/rustc_target/src/spec/mod.rs (L1255-L1271)
This commit is contained in:
John Ericson
2023-06-26 19:56:57 -04:00
committed by Dmitry V. Levin
parent 4ad4bb7c30
commit 91f6a7f616
3 changed files with 13 additions and 4 deletions

View File

@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.48.5.
.TH CONFIG.SUB "1" "June 2023" "GNU config.sub (2023-06-23)" "User Commands"
.TH CONFIG.SUB "1" "July 2023" "GNU config.sub (2023-06-26)" "User Commands"
.SH NAME
config.sub \- validate and canonicalize a configuration triplet
.SH SYNOPSIS