]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
ltdl: fix a long standing duplicate `-ldl' bug in the link line.
authorGary V. Vaughan <gary@gnu.org>
Wed, 26 Nov 2014 19:36:47 +0000 (19:36 +0000)
committerGary V. Vaughan <gary@gnu.org>
Wed, 26 Nov 2014 19:47:43 +0000 (19:47 +0000)
* m4/ltdl.m4 (LT_LIB_DLLOAD): Save contents of LIBS before
calling AC_SEARCH_LIBS, which prepends to LIBS by default, and
restore afterwards.  We set LIBADD_DLOPEN and LIBADD_SHL_LOAD
so that dynamic loader libraries can be added selectively only
where they are needed.
* NEWS: Update.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
NEWS
m4/ltdl.m4

diff --git a/NEWS b/NEWS
index 75da6ea0b4c44de6284aa6abdd803d835301dddb..2782511ccf265a37dfa76778427d7fae900f57ff 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,10 +12,21 @@ NEWS - list of user-visible changes between releases of GNU Libtool
 
   - Installation of 'libtoolize' once again obeys '--program-prefix',
     '--program-suffix' and '--program-transform-name' configure options.
+
   - `libtoolize` doesn't remove any files that it can't reinstall,
     including old versions of the snippet directory, and gnulib's
     version of the argz module and supporting files.
 
+** Important incompatible changes:
+
+  - LT_LIB_DLLOAD no longer prepends -ldl or -ldld to LIBS, causing
+    duplicate occurrences in libltdl link lines.  If you need to
+    add a library for dlopen() or shl_load() in your Makefile, then
+    use $(LIBADD_DLOPEN) or $(LIBADD_SHL_LOAD) respectively.  If you
+    are using libltdl, this all happens automatically, and the only
+    difference you'll see is no more duplicated library names in the
+    verbose link line.
+
 ** Changes in supported systems or compilers:
 
   - Preliminary support for tcc on linux*.  Although it already worked
index eeb37ac4b16fe9a222cbfd88196411ce753ddce8..41198441675c5a00e0fb4844503260c33249d396 100644 (file)
@@ -651,6 +651,7 @@ LT_DLLOADERS=
 AC_SUBST([LT_DLLOADERS])
 
 AC_LANG_PUSH([C])
+lt_dlload_save_LIBS=$LIBS
 
 LIBADD_DLOPEN=
 AC_SEARCH_LIBS([dlopen], [dl],
@@ -734,6 +735,7 @@ dnl This isn't used anymore, but set it for backwards compatibility
 LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
 AC_SUBST([LIBADD_DL])
 
+LIBS=$lt_dlload_save_LIBS
 AC_LANG_POP
 ])# LT_LIB_DLLOAD