On Sun, Dec 04, 2005 at 05:10:47PM +0100, Kurt Roeckx wrote:
> On Sun, Dec 04, 2005 at 04:59:12PM +0100, Aurelien Jarno wrote:
> > Package: libtool
> > Version: 1.5.20-2
> > Severity: wishlist
> > Tags: patch
> > 
> > Hi,
> > 
> > The patch you added to libtool to prune unused libs from the linker line
> > is a very nice thing and will probably ease the next transitions.
> > 
> > However, it is currently only enabled on GNU/Linux. Could you please
> > also enable it on GNU/kFreeBSD? The attached patch does that.
> 
> I think this patch is still missing a part.  If you look at the
> current patch, it sets it to no in 2 cases, both being only for
> Linux.
> 
> Can you please verify that in the generated libtool all
> link_all_deplibs are set to no (instead of unknown)?
> 

Oops, you're right. Please find attached a fixed patch. Note that I
had to separate kfreebsd*-gnu from freebsd* for the second part.

Thanks,
Aurelien

-- 
  .''`.  Aurelien Jarno             | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [EMAIL PROTECTED]         | [EMAIL PROTECTED]
   `-    people.debian.org/~aurel32 | www.aurel32.net
diff -u libtool-1.5.20/debian/patches/link_all_deplibs.dpatch 
libtool-1.5.20/debian/patches/link_all_deplibs.dpatch
--- libtool-1.5.20/debian/patches/link_all_deplibs.dpatch
+++ libtool-1.5.20/debian/patches/link_all_deplibs.dpatch
@@ -11,17 +11,20 @@
 diff -urNad --exclude=CVS --exclude=.svn ./libtool.m4 
/tmp/dpep-work.DH3vrV/libtool-1.5.20/libtool.m4
 --- ./libtool.m4       2005-09-14 20:50:48.404325960 +0200
 +++ /tmp/dpep-work.DH3vrV/libtool-1.5.20/libtool.m4    2005-09-14 
20:50:48.488313192 +0200
-@@ -5216,6 +5216,9 @@
+@@ -5216,6 +5216,12 @@
    cygwin* | mingw*)
      _LT_AC_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'
    ;;
++  kfreebsd*-gnu)
++    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
++  ;;
 +  linux*)
 +    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
 +  ;;
    *)
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | 
$global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
    ;;
-@@ -5393,6 +5396,7 @@
+@@ -5393,6 +5399,7 @@
    $echo "local: *; };" >> $output_objdir/$libname.ver~
          $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags 
${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver 
-o $lib'
        fi
@@ -29,6 +32,29 @@
        else
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
        fi
+@@ -5701,12 +5708,21 @@
+       ;;
+ 
+     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+-    freebsd* | kfreebsd*-gnu | dragonfly*)
++    freebsd* | dragonfly*)
+       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs 
$compiler_flags'
+       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+       ;;
++      
++    # GNU/kFreeBSD uses gcc -shared to do shared libraries.
++    kfreebsd*-gnu)
++      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs 
$compiler_flags'
++      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
++      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
++      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
++      _LT_AC_TAGVAR(link_all_deplibs, $1)=no
++      ;;
+ 
+     hpux9*)
+       if test "$GCC" = yes; then
 diff -urNad --exclude=CVS --exclude=.svn ./ltmain.in 
/tmp/dpep-work.DH3vrV/libtool-1.5.20/ltmain.in
 --- ./ltmain.in        2005-09-14 20:38:50.000000000 +0200
 +++ /tmp/dpep-work.DH3vrV/libtool-1.5.20/ltmain.in     2005-09-14 
20:50:48.490312888 +0200

Reply via email to