From 97e903b13d9742e2ffd8681b1762de5f3dc9db84 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Wed, 7 Jun 2017 14:46:55 +0200 Subject: [PATCH] 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. --- bin/Makefile.am | 3 ++- configure.ac | 6 ------ doc/org/compile.org | 6 ++++-- doc/org/g++wrap.in | 3 ++- spot/ltsmin/Makefile.am | 2 ++ tests/Makefile.am | 5 +++-- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/bin/Makefile.am b/bin/Makefile.am index 85e5ca059..d1f64ff95 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -25,7 +25,8 @@ AM_CXXFLAGS = $(WARNING_CXXFLAGS) LDADD = \ libcommon.a \ $(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 libcommon_a_SOURCES = \ diff --git a/configure.ac b/configure.ac index 9489dcf03..f4004c6c0 100644 --- a/configure.ac +++ b/configure.ac @@ -171,12 +171,6 @@ AC_CHECK_FUNCS([times kill alarm sigaction]) LT_CONFIG_LTDL_DIR([ltdl]) LT_INIT([win32-dll]) 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 diff --git a/doc/org/compile.org b/doc/org/compile.org index 17c219a8c..7f0bd04bc 100644 --- a/doc/org/compile.org +++ b/doc/org/compile.org @@ -210,8 +210,10 @@ library. This should be as simple as adding =-lbddx= after =-lspot= in the first three cases. In the fourth case where =libtool= is used to link against -=libspot.la= linking against =libbddx.la= is not necessary because -Libtool already handles such dependencies. +=libspot.la= linking against =libbddx.la= should not be necessary because +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 diff --git a/doc/org/g++wrap.in b/doc/org/g++wrap.in index 4bd319840..7a11c0d8b 100755 --- a/doc/org/g++wrap.in +++ b/doc/org/g++wrap.in @@ -3,4 +3,5 @@ # example run from the org-mode file are all linked with Spot. exec @top_builddir@/libtool link @CXX@ -std=c++11 -Wall \ -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 diff --git a/spot/ltsmin/Makefile.am b/spot/ltsmin/Makefile.am index fee392da7..3204ba4c9 100644 --- a/spot/ltsmin/Makefile.am +++ b/spot/ltsmin/Makefile.am @@ -28,9 +28,11 @@ ltsmin_HEADERS = ltsmin.hh lib_LTLIBRARIES = libspotltsmin.la libspotltsmin_la_DEPENDENCIES = \ $(top_builddir)/spot/libspot.la \ + $(top_builddir)/buddy/src/libbddx.la \ $(LTDLDEPS) libspotltsmin_la_LIBADD = \ $(top_builddir)/spot/libspot.la \ + $(top_builddir)/buddy/src/libbddx.la \ $(LIBLTDL) -lpthread libspotltsmin_la_LDFLAGS = -no-undefined $(SYMBOLIC_LDFLAGS) libspotltsmin_la_SOURCES = ltsmin.cc diff --git a/tests/Makefile.am b/tests/Makefile.am index efc77fe19..fd2d01047 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -24,7 +24,8 @@ AUTOMAKE_OPTIONS = subdir-objects AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) $(BUDDY_CPPFLAGS) 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" TEST_EXTENSIONS = @@ -377,7 +378,7 @@ if USE_LTSMIN check_PROGRAMS += ltsmin/modelcheck 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