Package: libtool
Version: 2.2.6b-2
Severity: important
Tags: patch
User: [email protected]
Usertags: hurd
Hi,
the Debian patch link_all_deplibs.patch sets link_all_deplibs for Linux and
kFreeBSD but not for Hurd as well. Given that the toolchain is mostly the
same, link_all_deplibs should be disabled for Hurd as well.
This fixes the test #68 of the test suite (two others are still failing,
though), and avoid extra dependencies being added to libraries; for example:
$ curl-config --libs
-lcurl -lidn -lssh2 -lssl -lcrypto -llber -lldap -lssl -lcrypto -lz
while it should just return '-lcurl'.
Attached there is an uptodate version of link_all_deplibs.patch.
Thanks,
--
Pino
## Do not link against deplibs. This is not needed for shared libs
## on atleast ELF systems since those already know which libs they
## need themself. This seems to break a few things and will be fixed
## in a better way in a future upstream version.
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -4591,7 +4591,10 @@
case $pass in
dlopen) libs="$dlfiles" ;;
dlpreopen) libs="$dlprefiles" ;;
- link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+ link)
+ libs="$deplibs %DEPLIBS%"
+ test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
+ ;;
esac
fi
if test "$linkmode,$pass" = "lib,dlpreopen"; then
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -4182,6 +4182,9 @@
cygwin* | mingw* | cegcc*)
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience |
$global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1
DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[
]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
;;
+ linux* | k*bsd*-gnu | gnu*)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
*)
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience |
$global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
;;
@@ -4246,6 +4249,9 @@
openbsd*)
with_gnu_ld=no
;;
+ linux* | k*bsd*-gnu | gnu*)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
esac
_LT_TAGVAR(ld_shlibs, $1)=yes
@@ -4603,6 +4609,7 @@
if test "$aix_use_runtimelinking" = yes; then
shared_flag="$shared_flag "'${wl}-G'
fi
+ _LT_TAGVAR(link_all_deplibs, $1)=no
else
# not using gcc
if test "$host_cpu" = ia64; then