On Friday, 25 March 2016 at 10:11:46 UTC, Johannes Pfau wrote:
Am Fri, 25 Mar 2016 09:15:06 +0000
schrieb Vincent R <l...@dlang.org>:
> So the main question is: can we simply ditch gcc.gthreads
> and inline the code into rt.monitor?
Thanks for all this information and it seems your knowledge is
far beyond mine so I cannot answer your last question but from
what you explain maybe it could be a better option.
What I can tel you for now is your patch works and allowed me
to
generate a gdc compilier.
Now I let you decide what is the best option.
Great! We've simply removed gthreads now:
https://github.com/D-Programming-GDC/GDC/commit/096991b5817ac21ff6c81ea3759ad4a253deff59
It might take a few days till this is merged into the gdc-X
branches though.
BTW: When I tested MinGW I found a serious garbage collector
bug: TLS variables are currently not scanned correctly. This
means if you have GC objects only referenced from thread local
memory these might get collected.
I know how to fix this but it's not simple so it will take some
time. If you run into this bug you could use DMD or LDC instead
(IIRC you ran into an optlink bug when using DMD, but you could
probably use the -mscoff32 or m64 options to avoid optlink).
I have some linker errors when I try to use the gdc compiler :
Start a mingw64 shell, remove wxwidgets3 if installed, generate
wxwidgets28 and installs it:
$ pacman -R wxwidgets
$ export MINGW_INSTALLS=mingw64
$ git clone https://github.com/vrichomme/MINGW-packages.git
$ cd mingw-w64-wxwidgets28
$ makepkg-mingw -sLf
$ pacman -U mingw-w64-x86_64-wxWidgets-2.8.12-1-any.pkg.tar.xz
$ git clone https://github.com/vrichomme/wxd.git
$ cd src
$ make
$ $ cd Samples/
$ make
make -C Controls
make[1]: Entering directory
'/home/19013692/tmp/wxd/src/Samples/Controls'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory
'/home/19013692/tmp/wxd/src/Samples/Controls'
make -C Dialogs
make[1]: Entering directory
'/home/19013692/tmp/wxd/src/Samples/Dialogs'
gdc -o ../../bin/Dialogs Dialogs.o -L../.. -lwxd -lwxc
`wx-config --libs` -lstdc++ -lws2_32 -lwsock32
C:/DEV/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/5.3.0/libgphobos2.a(socket.o):
In function `_D3std6socket8Protocol17getProtocolByNameMFxAaZb':
C:\DEV\msys64\home\19013692\tmp2\MINGW-packages\mingw-w64-gcc\src\build-x86_64-w64-mingw32\x86_64-w64-mingw32\libphobos\src/../../../../gcc-5.3.0/libphobos/src/std/socket.d:461:
undefined reference to `getprotobyname'
C:/DEV/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/5.3.0/libgphobos2.a(socket.o):
In function
`_D3std6socket8Protocol17getProtocolByTypeMFE3std6socket12ProtocolTypeZb':
C:\DEV\msys64\home\19013692\tmp2\MINGW-packages\mingw-w64-gcc\src\build-x86_64-w64-mingw32\x86_64-w64-mingw32\libphobos\src/../../../../gcc-5.3.0/libphobos/src/std/socket.d:474:
undefined reference to `getprotobynumber'
...
As you can see all the missing symbols are from the socket
library and that's why I have added locally -lws2_32 -lwsock32 to
the config.gcc but it doesn't solve the problem...