Adding support for mingw-w64 and winpthread

Iain Buclaw via D.gnu d.gnu at puremagic.com
Thu Mar 24 03:12:20 PDT 2016


On 24 March 2016 at 10:52, Vincent R via D.gnu <d.gnu at puremagic.com> wrote:

> Hi,
>
> I would like to generate gdc compiler on msys2/mingw-w64 platform.
> The build system on msys2 uses archlinux build architecture and the build
> file is here:
>
> https://github.com/vrichomme/MINGW-packages/blob/newfastrelease/mingw-w64-gcc/PKGBUILD
>
> To generate it I followed the following steps:
>
> 1) Install https://msys2.github.io/
> 2)
>
> $ update-core
> $ pacman -Su
> $ git clone https://github.com/vrichomme/MINGW-packages.git
> $ cd MINGW-packages
> $ git fetch origin
> $ git checkout -b newfastrelease origin/newfastrelease
> $ cd mingw-w64-gcc
> $ export MINGW_INSTALLS=mingw64
> $ makepkg-mingw -sLf
>
> But of course I get an error because the platform is not supported:
>
>
>
How readily does Mingw support pthreads? What may be needed is simply a new
package for mingw-specific system functions (ie: core.sys.mingw.pthread).
In the meantime, you should be able to get around by passing
--enable-threads=win32 when configuring teh gcc build.


>
> But how is defined this value ? Is it based on uname function ?
> Can I trace the value of version when compiling the file ?
>
>
What versions that are internally defined depend on the target triplet
passed when configuring the build.  This directly affects what target
headers are included, which contain macros we call when initializing the
compiler.

It has been requested even in DMD to have some command-line option to print
all turned on version conditions set by the compiler.  Itself is a very
trivial addition.  In the absence of that though, in a debugger you can set
a breakpoint on VersionCondition::addPredefinedGlobalIdent.

Iain.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20160324/8ada5a83/attachment.html>


More information about the D.gnu mailing list