From 0158739bcff3c4c3f8944e6e06932d836821cf28 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Thu, 9 Jul 2015 23:45:31 +0200 Subject: [PATCH] Use the static libgcc option only for Windows. For obvious reasons, the -static-libgcc linker option is not supported by non gcc compilers, like clang. Since we only need this option when building Windows DLL's, we can easily avoid the problem with a conditional on the mingw compiler. --- src/Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 71a4770..f106c09 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,10 +6,13 @@ 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 +if OS_WIN32 +libdivecomputer_la_LDFLAGS += -Wc,-static-libgcc +endif + libdivecomputer_la_SOURCES = \ version.c \ descriptor.c \