]> granicus.if.org Git - graphviz/commitdiff
gvpack_static: force the C++ compiler to be used also for static linking
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Wed, 1 Sep 2021 05:27:25 +0000 (07:27 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Wed, 8 Sep 2021 19:15:26 +0000 (21:15 +0200)
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

index 89e8352d207a691edca8ed7548af78fb89132a35..966bb86f5f8cb84c2a97ccc387ccf653ef414684 100644 (file)
@@ -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