Re: [PATCH] bfd: recognize *-*-windows* Windows targets
Jan Beulich <[email protected]>
| Newsgroups | gmane.comp.gnu.binutils |
|---|---|
| Message-ID | <[email protected]> |
On 14.07.2026 01:15, Pedro Alves wrote: > Clang's default target on Windows uses the "windows-msvc" OS in its > triplet, e.g. x86_64-pc-windows-msvc, i686-pc-windows-msvc, and > aarch64-pc-windows-msvc. This is different from MinGW triplets -- it > means that the compiler produces binaries following the Windows/MSVC > ABI, not the GNU ABI. Doesn't this mean that ... > config.sub already canonicalizes these, but > config.bfd doesn't map them to a BFD target vector, so configuring for > one of these targets fails to select a default vector. > > Fix this by extending the i386, x86_64 and aarch64 PE entries to also > match "*-windows*", so that Windows targets spelled with the "windows" > OS select the same PE vectors as their mingw counterparts. ... this and ... > Note: even though config.sub does not support "windows-gnu" today, > Clang and Rust support it, as an alias for MinGW. Clang also accepts > plain "windows", treating it as MSVC. That's why the patch matches > "windows*". Also, this is what is already used in bfd, anyhow: ... this is wrong, in meaning "GNU ABI" in all cases? Further, while in the follow-on mail you say this aiming at gdb, what about in particular ld? If ld is deliberately not covered, wouldn't top-level configury then want to gain a noconfigdirs adjustment, such that ld (and perhaps also other components) won't even be tried to be configured? Jan