在 2021/1/11 下午11:00, Stephen Kitt 写道:
> On Mon, 11 Jan 2021 22:07:42 +0800, Liu Hao <lh_mo...@126.com> wrote:
> [...]
>> There is no special meaning about `w64` itself. `mingw32` on the other hand
>> specifies the ABI, so all `i686-*-mingw32` targets are considered
>> ABI-compatible.
> 
> Are they really though? It seems to me that the triplet has ended up somewhat
> overloaded — especially with regards to features such as the threading model
> or the exception handling. (Thinking with my Debian hat on, where we still
> need a comprehensive architecture definition if we ever want multiarch to
> work with MinGW-w64...)
> 

Indeed. Target triplets probably specify the set of machine registers, calling 
conventions, etc.
Informally, it is typically safe to link code compiled for the same target 
triplet, against the same
libgcc and CRT DLL (exactly one of MSVCRT, MSVCR{80,90,100,etc.} or UCRT), and 
ensure memory
allocated is freed within the same module, and don't propagate exceptions to 
others. Most Windows
DLLs work this way, and they can be used by mingw-w64, regardless of the thread 
or exception model
being used.


> While we’re at it, how could we reflect the target CRT (MSVCRT, UCRT, or one
> of the version-specific RTs)?
> 

Ideally they should be denoted by distinct triplets. For example, on Linux 
`*-*-linux` and
`*-*-linux-gnu` are triplets for Glibc, while targets that use musl as the C 
library may expect
`*-*-linux-musl`.

But I am unfamilar with UCRT environment. Perhaps we should ask Martin Storsjö 
for sure.


-- 
Best regards,
LH_Mouse

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to