From: Tony T. <ton...@gm...> - 2013-08-15 12:51:16
|
On 15/08/2013, at 10:03 PM, Earnie Boyd <ea...@us...> wrote: > On Thu, Aug 15, 2013 at 3:40 AM, Tony Theodore wrote: >> >> Version 2.9.1 introduced an autostatic[1] feature that removed the need to call pthread_win32_process_attach_np() >> and pthread_win32_process_detach_np() explicitly in most cases. The next release[2] should complete this so it's no longer required at all. >> >> >> [1] http://sourceware.org/ml/pthreads-win32/2010/msg00006.html >> [2] http://www.sourceware.org/pthreads-win32/news.html >> > > So when 2.10 becomes available we can distribute the static library. > It is most definitely good news for those who prefer to use static. > In the meantime it appears possible to use a static library but you > must follow a few oddities to work around issues. However the > delivered package from MinGW.org does not contain the static version > so you must build it yourself. In mxe, we patch it[1] to define "PTW32_STATIC_LIB" (since CFLAGS seem to be ignored) and build it with "make GC-static". This creates "libpthreadGC2.a" which is installed as "libpthread.a". Hope that helps anyone wishing to build a static version themselves. Tony [1] https://github.com/mxe/mxe/blob/master/src/pthreads-w32-1-fixes.patch |