libtool: surrender to Debian's castrated libtool

The libtool version distributed by Debian is patched to *not* propagate
dependencies (i.e., if libA depends on libB, then linking against libA
will not automatically link against libB, it has to be explicit),
contrary to what the Libtool manual document.  So now we explicitly
link against both libA and libB in such case.

* configure.ac: Remove the workaround that does not work for
MinGW.
* doc/org/compile.org: Mention the issue.
* bin/Makefile.am, tests/Makefile.am, spot/ltsmin/Makefile.am,
doc/org/g++wrap.in: Make the dependencies explicit.
This commit is contained in:
Alexandre Duret-Lutz 2017-06-07 14:46:55 +02:00
parent 440380c5ca
commit 97e903b13d
6 changed files with 13 additions and 12 deletions

View file

@ -25,7 +25,8 @@ AM_CXXFLAGS = $(WARNING_CXXFLAGS)
LDADD = \ LDADD = \
libcommon.a \ libcommon.a \
$(top_builddir)/lib/libgnu.la \ $(top_builddir)/lib/libgnu.la \
$(top_builddir)/spot/libspot.la $(top_builddir)/spot/libspot.la \
$(top_builddir)/buddy/src/libbddx.la
noinst_LIBRARIES = libcommon.a noinst_LIBRARIES = libcommon.a
libcommon_a_SOURCES = \ libcommon_a_SOURCES = \

View file

@ -171,12 +171,6 @@ AC_CHECK_FUNCS([times kill alarm sigaction])
LT_CONFIG_LTDL_DIR([ltdl]) LT_CONFIG_LTDL_DIR([ltdl])
LT_INIT([win32-dll]) LT_INIT([win32-dll])
LTDL_INIT([subproject convenience]) LTDL_INIT([subproject convenience])
# Debian resets this to no, but this break both Spot and the libtool
# test suite itself. Instead of requiring developer to install a
# non-patched version of Libtool on any Debian they use, we just
# cancel the effect of Debian's patch here.
link_all_deplibs=yes
link_all_deplibs_CXX=yes
AX_BSYMBOLIC AX_BSYMBOLIC

View file

@ -210,8 +210,10 @@ library. This should be as simple as adding =-lbddx= after =-lspot=
in the first three cases. in the first three cases.
In the fourth case where =libtool= is used to link against In the fourth case where =libtool= is used to link against
=libspot.la= linking against =libbddx.la= is not necessary because =libspot.la= linking against =libbddx.la= should not be necessary because
Libtool already handles such dependencies. Libtool already handles such dependencies. However the version of =libtool=
distributed with Debian is patched to ignore those dependencies, so in this
case you 2
* Additional suggestions * Additional suggestions

View file

@ -3,4 +3,5 @@
# example run from the org-mode file are all linked with Spot. # example run from the org-mode file are all linked with Spot.
exec @top_builddir@/libtool link @CXX@ -std=c++11 -Wall \ exec @top_builddir@/libtool link @CXX@ -std=c++11 -Wall \
-I@abs_top_builddir@ -I@abs_top_srcdir@ -I@abs_top_srcdir@/buddy/src \ -I@abs_top_builddir@ -I@abs_top_srcdir@ -I@abs_top_srcdir@/buddy/src \
"$@" @abs_top_builddir@/spot/libspot.la "$@" @abs_top_builddir@/spot/libspot.la \
@abs_top_builddir@/buddy/src/libbddx.la

View file

@ -28,9 +28,11 @@ ltsmin_HEADERS = ltsmin.hh
lib_LTLIBRARIES = libspotltsmin.la lib_LTLIBRARIES = libspotltsmin.la
libspotltsmin_la_DEPENDENCIES = \ libspotltsmin_la_DEPENDENCIES = \
$(top_builddir)/spot/libspot.la \ $(top_builddir)/spot/libspot.la \
$(top_builddir)/buddy/src/libbddx.la \
$(LTDLDEPS) $(LTDLDEPS)
libspotltsmin_la_LIBADD = \ libspotltsmin_la_LIBADD = \
$(top_builddir)/spot/libspot.la \ $(top_builddir)/spot/libspot.la \
$(top_builddir)/buddy/src/libbddx.la \
$(LIBLTDL) -lpthread $(LIBLTDL) -lpthread
libspotltsmin_la_LDFLAGS = -no-undefined $(SYMBOLIC_LDFLAGS) libspotltsmin_la_LDFLAGS = -no-undefined $(SYMBOLIC_LDFLAGS)
libspotltsmin_la_SOURCES = ltsmin.cc libspotltsmin_la_SOURCES = ltsmin.cc

View file

@ -24,7 +24,8 @@
AUTOMAKE_OPTIONS = subdir-objects AUTOMAKE_OPTIONS = subdir-objects
AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) $(BUDDY_CPPFLAGS) AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) $(BUDDY_CPPFLAGS)
AM_CXXFLAGS = $(WARNING_CXXFLAGS) AM_CXXFLAGS = $(WARNING_CXXFLAGS)
LDADD = $(top_builddir)/spot/libspot.la LDADD = $(top_builddir)/spot/libspot.la $(top_builddir)/buddy/src/libbddx.la
# Explicitely set it to avoid default value ".test" # Explicitely set it to avoid default value ".test"
TEST_EXTENSIONS = TEST_EXTENSIONS =
@ -377,7 +378,7 @@ if USE_LTSMIN
check_PROGRAMS += ltsmin/modelcheck check_PROGRAMS += ltsmin/modelcheck
ltsmin_modelcheck_SOURCES = ltsmin/modelcheck.cc ltsmin_modelcheck_SOURCES = ltsmin/modelcheck.cc
ltsmin_modelcheck_LDADD = $(top_builddir)/spot/ltsmin/libspotltsmin.la ltsmin_modelcheck_LDADD = $(top_builddir)/spot/ltsmin/libspotltsmin.la $(LDADD)
check_SCRIPTS += ltsmin/defs check_SCRIPTS += ltsmin/defs