Zhongteng Gui <[email protected]> wrote:
> On 2026/08/30 15:44, Pali Rohár wrote:
>> On Sunday 30 August 2026 03:24:26 Kirill Makurin wrote:
>>> We also had briefly discussed an idea to move contents of libmingwex.a
>>> directly into import libraries (e.g. libucrt.a). The interaction between
>>> libmingwex.a and import libraries sometimes causes linker errors, e.g. when
>>> LTO is involved and import library references symbol from libmingwex.a or
>>> vice versa. If we did this, we would have to similarly make libmingwex.a
>>> empty so that older gcc/clang versions continue to work.
>>
>> I like this idea. But I'm still not sure if this would not cause other
>> issues.
>>
>> What I know is that there is still one problem that some symbols are
>> duplicated in libmingwex.a and in individual CRT DLL import libs. I have
>> tried to clean it up, but as I have figured out few days ago I found new
>> such symbols (e.g. _Exit).
>
> I think this is a good idea. Currently every libraries (mingw32, mingwex,
> msvcrt, etc.) are linked twice to solve circular dependencies in GCC
> (implicit)
> and Clang (explicit). If we finished this in the future maybe we could remove
> the duplicate linking from newer GCC and Clang.
>From looking at mingw-w64-crt/Makefile.am, one way I see how we can do this is
>rename src_libmingwex_{arch} variables and add these source files to each
>import library; it seems like src_msvcrt_common_add_{arch} variables can be
>used for this. And then, simply use an empty file as sources for libmingwex.a.
- Kirill Makurin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public