From: Magnus Jacobsson Date: Wed, 1 Sep 2021 05:27:25 +0000 (+0200) Subject: gvpack_static: force the C++ compiler to be used also for static linking X-Git-Tag: 2.49.1~35^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=943f8145adc8d694d263ddcd005fd5ae8d685c46;p=graphviz 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)' --- 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