From bd2b132d7f3c92aa434c4d799e8cc5358bc1baef Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Mon, 1 Jun 2015 23:21:58 +0200 Subject: [PATCH] Avoid a run-time dependency on the libgcc dlls. When compiling a 32bit dll with the mingw-w64 compiler, some 64bit integer arithmetic operations are implemented using functions from libgcc (e.g. __divdi3 and __moddi3 from libgcc_s_sjlj-1.dll). This unexpected dependency is inconvenient for applications. The run-time dependency can be avoid by linking statically. --- src/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile.am b/src/Makefile.am index abbaa48..71a4770 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,6 +6,7 @@ lib_LTLIBRARIES = libdivecomputer.la libdivecomputer_la_LIBADD = $(LIBUSB_LIBS) libdivecomputer_la_LDFLAGS = \ -version-info $(DC_VERSION_LIBTOOL) \ + -Wc,-static-libgcc \ -no-undefined \ -export-symbols libdivecomputer.exp