w32: Use -static-libgcc to avoid linking to libgcc_s_sjlj-1.dll.
authorWerner Koch <wk@gnupg.org>
Mon, 13 Apr 2015 13:35:06 +0000 (15:35 +0200)
committerWerner Koch <wk@gnupg.org>
Mon, 13 Apr 2015 13:35:06 +0000 (15:35 +0200)
commit524dacfbb6bb131f05a4ecab3d7bcd91c1b43d33
treeda0190a6d63eb3119d1b720d500e4769714e2867
parent8cfcdfe5564f87362e5ec1bfdca5c14aed9c45f0
w32: Use -static-libgcc to avoid linking to libgcc_s_sjlj-1.dll.

* src/Makefile.am (extra_ltoptions): New.
(libgpgme_la_LDFLAGS): Use it.
(libgpgme_pthread_la_LDFLAGS): Ditto.
(libgpgme_glib_la_LDFLAGS): Ditto.
--

Since gcc 4.8 there is a regression in Mingw64 in that plain C
programs may link to libgcc_s.a which has a dependency on
libgcc_s_sjlj.dll.  This is for example triggered by using long long
arithmetic on a 32 bit Windows (e.g symbol __udivdi3).

Note that we don't use this patch for the Qt version which, as C++
programs, actually requires that DLL,

Signed-off-by: Werner Koch <wk@gnupg.org>
src/Makefile.am