MinGW 6.0.0 libraries for DMD

kinke noone at nowhere.com
Mon Apr 15 21:54:05 UTC 2019


On Monday, 15 April 2019 at 12:02:03 UTC, Basile B. wrote:
> On Monday, 15 April 2019 at 11:22:04 UTC, Basile B. wrote:
>> This is not ready. When building DCD with build.bat with 
>> MFLAGS set to -m64 I get this linker error:
>>
>>   lld-link.exe: error: /alternatename: conflicts: 
>> fileno=_fileno
>>   Error: linker exited with status 1
>>
>> This error doesn't occur with the older libraries.

Thanks for the feedback. There are 'weak aliases' in 
https://github.com/dlang/druntime/blob/8fd52019826259dc92ab712f4b37a3f0ea4d8265/src/rt/msvc.c which collide with the ones defined in the MinGW-based libs (and those latter are likely not to be 100% correct for DMD's default VS2010 libs, as they have been derived from the VS 2015 libs for LDC).

These new libs are the same libs included by LDC since v1.13; 
it's not a problem there because almost all of these aliases in 
LDC's druntime are disabled (not needed since VS 2015).

So there are 2 ways of fixing this - either extracting the 
aliases from the VS2010 libs for DMD, or making DMD switch to the 
VS2015 libs (Universal CRT...) by default, just like LDC. I 
obviously prefer the latter, not just for consistency across DMD 
and LDC and hence reduced maintenance effort, but also because 
there have been major improvements wrt. C99 support in more 
recent MS libraries.


More information about the Digitalmars-d mailing list