From 154f5fc6de3851ff1f05da6f34ffb42752ebb75e Mon Sep 17 00:00:00 2001 From: "Heesterman, Peter J" Date: Thu, 9 Jun 2022 13:10:53 +0100 Subject: [PATCH] LIBXML_STATIC needs to be defined in ADSrc for mingw static builds. Mingw still generates multiple definitions of _Unwind_Resume. --- ADApp/ADSrc/Makefile | 5 +++++ ADApp/pluginSrc/Makefile | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ADApp/ADSrc/Makefile b/ADApp/ADSrc/Makefile index f3db58cfe..06de08494 100644 --- a/ADApp/ADSrc/Makefile +++ b/ADApp/ADSrc/Makefile @@ -11,6 +11,11 @@ ifeq (vxWorks,$(findstring vxWorks, $(T_A))) CODE_CXXFLAGS= endif +ifneq ($(SHARED_LIBRARIES), YES) + USR_CFLAGS_WIN32 += -DLIBXML_STATIC + USR_CXXFLAGS_WIN32 += -DLIBXML_STATIC +endif + # The following flag is need to compile/link NDArray.cpp on Solaris ifeq ($(GNU),NO) NDArray_CXXFLAGS_solaris += -features=tmplrefstatic diff --git a/ADApp/pluginSrc/Makefile b/ADApp/pluginSrc/Makefile index 471356d63..d5c250b19 100644 --- a/ADApp/pluginSrc/Makefile +++ b/ADApp/pluginSrc/Makefile @@ -238,6 +238,11 @@ ifeq (vxWorks,$(findstring vxWorks, $(T_A))) CODE_CXXFLAGS= endif +# Hack to allow multiple definition of _Unwind_Resume produced by MingW on Linux. +ifeq (mingw,$(findstring mingw, $(T_A))) + USR_LDFLAGS += -Wl,-allow-multiple-definition +endif + include $(TOP)/ADApp/commonLibraryMakefile include $(TOP)/configure/RULES