From 943f8145adc8d694d263ddcd005fd5ae8d685c46 Mon Sep 17 00:00:00 2001 From: Magnus Jacobsson Date: Wed, 1 Sep 2021 07:27:25 +0200 Subject: [PATCH] gvpack_static: force the C++ compiler to be used also for static linking The trick to force the C++ compiler to be used for linking was applied only for gvpack, not for gvpack_static. Fixes many errors like this: /usr/bin/ld: ../../lib/vpsc/.libs/libvpsc_C.a(csolve_VPSC.o): in function `newVariable': csolve_VPSC.cpp:(.text+0x20): undefined reference to `operator new(unsigned long)' --- cmd/tools/Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/tools/Makefile.am b/cmd/tools/Makefile.am index 89e8352d2..966bb86f5 100644 --- a/cmd/tools/Makefile.am +++ b/cmd/tools/Makefile.am @@ -265,6 +265,10 @@ gvpack_static_LDADD = \ $(top_builddir)/lib/cgraph/libcgraph_C.la \ $(top_builddir)/lib/cdt/libcdt_C.la \ $(EXPAT_LIBS) $(Z_LIBS) $(GTS_LIBS) $(SOCKET_LIBS) $(IPSEPCOLA_LIBS) $(MATH_LIBS) + +# add a non-existent C++ source to force the C++ compiler to be used for +# linking, so the C++ standard library is included for our C++ dependencies +nodist_EXTRA_gvpack_static_SOURCES = fake.cxx endif if ENABLE_MAN_PDFS -- 2.40.0