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.
This commit is contained in:
Jef Driesen 2015-06-01 23:21:58 +02:00
parent ab92043dc3
commit bd2b132d7f

View File

@ -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