summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2015-01-30 16:58:02 +0100
committerWerner Koch <wk@gnupg.org>2015-01-30 16:58:02 +0100
commit40a7bdf50e19faaf106470897fed72af623adc50 (patch)
treeb7ff254e6ef073baed81852ac7d537929948f1c3 /src
parent2564d204e408b296425ac0660c6bdc6270575fb6 (diff)
downloadlibgcrypt-40a7bdf50e19faaf106470897fed72af623adc50.tar.gz
w32: Use -static-libgcc to avoid linking to libgcc_s_sjlj-1.dll.
* src/Makefile.am (extra_ltoptions): New. (libgcrypt_la_LDFLAGS): Use it. -- Since gcc 4.8 there is a regression 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). As usual the gcc maintainers don't care about backward compatibility and declare that as some kind of compatibility fix and not as regression from 4.7 and all earlier versions. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index cbb08af5..cd0d354d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -81,6 +81,7 @@ SUFFIXES = .rc .lo
gcrypt_res = versioninfo.lo
no_undefined = -no-undefined
export_symbols = -export-symbols $(srcdir)/libgcrypt.def
+extra_ltoptions = -XCClinker -static-libgcc
install-def-file:
-$(INSTALL) -d $(DESTDIR)$(libdir)
@@ -97,6 +98,7 @@ gcrypt_res =
gcrypt_res_ldflag =
no_undefined =
export_symbols =
+extra_ltoptions =
install-def-file:
uninstall-def-file:
@@ -105,7 +107,7 @@ gcrypt_deps =
endif !HAVE_W32_SYSTEM
-libgcrypt_la_LDFLAGS = $(no_undefined) $(export_symbols) \
+libgcrypt_la_LDFLAGS = $(no_undefined) $(export_symbols) $(extra_ltoptions) \
$(libgcrypt_version_script_cmd) -version-info \
@LIBGCRYPT_LT_CURRENT@:@LIBGCRYPT_LT_REVISION@:@LIBGCRYPT_LT_AGE@
libgcrypt_la_DEPENDENCIES = \