Looking to make a GDC-12 mingw64 package

Preetpal preetpal.sohal at gmail.com
Tue Sep 6 17:05:23 UTC 2022


I am assuming you would like to have GDC available in the MSYS2 
[MINGW32 , MINGW64, and UCRT64 
environments](https://www.msys2.org/docs/environments/) (which is 
what I wanted). They have an open issue in the [MINGW packages 
repository](https://github.com/msys2/MINGW-packages/issues/6806) 
for adding support for GDC that demonstrates interest in making 
this happen.

I looked into fixing the 
[issue](https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104654) that 
I ran into when the configure flags set the threading model to 
posix threading and determined that I will not be able to fix the 
issue (at least with my current knowledge). At the minimum you 
would have to modify two files to add different versions of posix 
code for 
[MinGW](https://dlang.org/spec/version.html#predefined-versions) 
in the druntime:
- 
https://github.com/dlang/dmd/blob/master/druntime/src/core/sys/posix/sys/types.d
- 
https://github.com/dlang/dmd/blob/master/druntime/src/core/sys/posix/pthread.d

There are more than a dozen instances of conditional compilation 
related to posix threading for different posix-based 
environments. This problem could be worse if the three different 
MSYS2 environments need different conditional code compilation 
paths (hopefully they don't). This is also made more difficult 
since these files have been modified since the GCC version 11.3.0 
release so the changes would have to be done against the recent 
version as well as the GCC 11.3.0 version (I am assuming that the 
GCC 11.3.0 GCC Version is needed to bootstrap the GDC in version 
12+ of GCC).

Based on this 
[comment](https://github.com/dlang/druntime/pull/3684#issuecomment-1017038399) I saw when looking at the changes to the files mentioned earlier, there is a possibility of the files being auto-generated during the build process in the future. Hopefully this issue will be resolved through auto-generation.


More information about the D.gnu mailing list