4 Dec
2025
4 Dec
'25
11:51 a.m.
On Thu Dec 4 02:34:21 2025 +0000, Yuxuan Shui wrote:
errmm, why is this a problem? mingw ld has a linker script that merges the .CRT sections so this is not needed. It is the same problem as with other `#ifdef`s. The way the comment pragma works is that it embeds the string into the object file for the linker to interpret. While that is fine for LLD, even in mingw mode, binutils understands only some of it. If you try to link this object file from a Clang Wine build using GCC, you will get a warning like:
Warning: corrupt .drectve at end of def file
In winegcc, we know whether the target is mingw or MSVC, and we can just pass it via the command line there. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9265#note_124682