GNOME Bugzilla – Bug 792297
win32: Make the static build work with MinGW when posix threads are used
Last modified: 2018-05-24 20:07:42 UTC
Created attachment 366450 [details] [review] win32: Make the static build work with MinGW when posix threads are used MinGW does not support the use of DllMain() for static builds, but that is currently always used on Windows, partly because it is needed for handling win32 threads and because there are problems with MSVC optimizing constructors away (see 7a29771a743a8b5337). To make the static build at least work in case mingw+posix threads are used, switch to using constructors for that. The g_clock_win32_init() call is moved into glib_init(), so it's also called in that case. If mingw+static+win32 threads are used abort the build early and print an error message. ---- A similar patch is currently used in msys2 [0], but the one here limits the change to mingw + static + posix threads. [0] https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-glib2/0004-glib-prefer-constructors-over-DllMain.patch
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/1322.