]> granicus.if.org Git - graphviz/commitdiff
ortho: autotools: set also GVC_EXPORTS
authorMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Sun, 22 Aug 2021 06:40:28 +0000 (08:40 +0200)
committerMagnus Jacobsson <Magnus.Jacobsson@berotec.se>
Tue, 28 Sep 2021 16:17:16 +0000 (18:17 +0200)
The immediate reason for this change is to correct the
Microsoft-specfic storage-class attributes in autotools builds with
Cygwin.

The object modules from the static ortho lib is statically linked into
the gvc shared lib which means that its symbols should be exported
from gvc instead of imported.

This is the second and final step in fixing these errors in autotools
builds with Cygwin:

/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: ../../lib/dotgen/.libs/libdotgen_C.a(dotsplines.o): in function `_dot_splines':
/home/magja/graphviz/lib/dotgen/dotsplines.c:334: undefined reference to `__imp_orthoEdges'
/usr/lib/gcc/x86_64-pc-cygwin/10/../../../../x86_64-pc-cygwin/bin/ld: /home/magja/graphviz/lib/dotgen/dotsplines.c:337: undefined reference to `__imp_orthoEdges'

The _BLD_gvc symbol is used for basically the same purpose as
GVC_EXPORTS. Using both is a temporary measure until an upcoming
commit series towards
https://gitlab.com/graphviz/graphviz/-/issues/2058#note_678679545
cleans up the control of the Windows specific storage-class attributes

lib/ortho/Makefile.am

index e06794174cbed86705d4d71492d8c8df88f8bf31..b624bf9a043b28e1b667384be51017d746acf98a 100644 (file)
@@ -10,7 +10,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/lib/cdt
 
 if WITH_ORTHO
-AM_CFLAGS = -D_BLD_gvc=1
+AM_CFLAGS = -D_BLD_gvc=1 -DGVC_EXPORTS
 endif
 
 noinst_HEADERS = fPQ.h ortho.h maze.h partition.h rawgraph.h sgraph.h structures.h trap.h