Fix linking issue for new mxe and pthread
authorMiodrag Milanovic <mmicko@gmail.com>
Wed, 31 Jul 2019 16:02:27 +0000 (18:02 +0200)
committerMiodrag Milanovic <mmicko@gmail.com>
Thu, 1 Aug 2019 15:30:02 +0000 (17:30 +0200)
Makefile

index 1560d6de6de1eaa3c99b624f007c934e0dd616a6..a697e984470285733f17fa5658985b74348ac4b5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -261,7 +261,8 @@ CXXFLAGS := $(filter-out -fPIC,$(CXXFLAGS))
 LDFLAGS := $(filter-out -rdynamic,$(LDFLAGS)) -s
 LDLIBS := $(filter-out -lrt,$(LDLIBS))
 ABCMKARGS += ARCHFLAGS="-DWIN32_NO_DLL -DHAVE_STRUCT_TIMESPEC -fpermissive -w"
-ABCMKARGS += LIBS="lib/x86/pthreadVC2.lib -s" ABC_USE_NO_READLINE=1 CC="/usr/local/src/mxe/usr/bin/i686-w64-mingw32.static-gcc"
+# TODO: Try to solve pthread linking issue in more appropriate way
+ABCMKARGS += LIBS="lib/x86/pthreadVC2.lib -s" LDFLAGS="-Wl,--allow-multiple-definition" ABC_USE_NO_READLINE=1 CC="/usr/local/src/mxe/usr/bin/i686-w64-mingw32.static-gcc"
 EXE = .exe
 
 else ifeq ($(CONFIG),msys2)