Adding support for mingw-w64 and winpthread
Vincent R via D.gnu
d.gnu at puremagic.com
Thu Mar 24 02:52:34 PDT 2016
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:
/home/Vincent/tmp/MINGW-packages/mingw-w64-gcc/src/build-x86_64-w64-mingw32/./gcc/gdc -B/home/Vincent/tmp/MINGW-packages/mingw-w64-gcc/src/build-x86_64-w64-mingw32/./gcc/ -L/mingw64/x86_64-w64-mingw32/lib -L/mingw64/lib -isystem /mingw64/x86_64-w64-mingw32/include -isystem /mingw64/include -B/mingw64/x86_64-w64-mingw32/bin/ -B/mingw64/x86_64-w64-mingw32/lib/ -isystem /mingw64/x86_64-w64-mingw32/include -isystem /mingw64/x86_64-w64-mingw32/sys-include -o gcc/gthreads/posix.o -Wall -g -frelease -O2 -nostdinc -pipe -Wno-deprecated -I ../../../../gcc-5.3.0/libphobos/libdruntime -I ./x86_64-w64-mingw32 -I . -c ../../../../gcc-5.3.0/libphobos/libdruntime/gcc/gthreads/posix.d
../../../../gcc-5.3.0/libphobos/libdruntime/gcc/gthreads/posix.d:29:1: error: undefined identifier pthread_key_t, did you mean alias gthread_key_t?
alias gthread_key_t = pthread_key_t;
^
../../../../gcc-5.3.0/libphobos/libdruntime/gcc/gthreads/posix.d:30:1: error: undefined identifier pthread_once_t, did you mean alias gthread_once_t?
alias gthread_once_t = pthread_once_t;
^
../../../../gcc-5.3.0/libphobos/libdruntime/gcc/gthreads/posix.d:31:1: error: undefined identifier pthread_mutex_t, did you mean alias gthread_mutex_t?
alias gthread_mutex_t = pthread_mutex_t;
^
../../../../gcc-5.3.0/libphobos/libdruntime/gcc/gthreads/posix.d:32:1: error: undefined identifier pthread_mutex_t, did you mean alias gthread_mutex_t?
alias gthread_recursive_mutex_t = pthread_mutex_t;
^
../../../../gcc-5.3.0/libphobos/libdruntime/gcc/gthreads/posix.d:34:27: error: undefined identifier PTHREAD_MUTEX_INITIALIZER
enum GTHREAD_MUTEX_INIT = PTHREAD_MUTEX_INITIALIZER;
^
../../../../gcc-5.3.0/libphobos/libdruntime/gcc/gthreads/posix.d:35:27: error: undefined identifier PTHREAD_ONCE_INIT, did you mean variable GTHREAD_ONCE_INIT?
enum GTHREAD_ONCE_INIT = PTHREAD_ONCE_INIT;
^
../../../../gcc-5.3.0/libphobos/libdruntime/gcc/gthreads/posix.d:36:37: error: undefined identifier PTHREAD_MUTEX_INITIALIZER
enum GTHREAD_RECURSIVE_MUTEX_INIT = PTHREAD_MUTEX_INITIALIZER;
My question is how does Version is defined when compiling
core.sys.posix.pthread ?
Because I can see some block corresponding to each platform :
version( linux )
{
...
}
else version( OSX )
{
...
}
But how is defined this value ? Is it based on uname function ?
Can I trace the value of version when compiling the file ?
Thanks
More information about the D.gnu
mailing list