Hi,

It seems 1.5 and head are a little bit different when it comes to
linking a binary.  It seems that for linking a binary it does the
same as in case of a conviences library, and adds all
depedency_libs to deplibs.  It should do that for conviences
libraries, but not for binaries.

I've attached a patch to make head do the same as 1.5, which is
the behaviour I want.  It just moves the code to be inside the
if.

I have no idea why they're different, couldn't find when it was
changed (in which branch), but didn't look too hard either.


Kurt

Index: ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/config/ltmain.m4sh,v
retrieving revision 1.26
diff -u -r1.26 ltmain.m4sh
--- ltmain.m4sh 18 Dec 2005 23:06:44 -0000      1.26
+++ ltmain.m4sh 29 Dec 2005 18:41:01 -0000
@@ -3425,19 +3425,19 @@
            # It is a libtool convenience library, so add in its objects.
            convenience="$convenience $ladir/$objdir/$old_library"
            old_convenience="$old_convenience $ladir/$objdir/$old_library"
+           tmp_libs=
+           for deplib in $dependency_libs; do
+             deplibs="$deplib $deplibs"
+             if $opt_duplicate_deps ; then
+               case "$tmp_libs " in
+               *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+               esac
+             fi
+             tmp_libs="$tmp_libs $deplib"
+           done
          elif test "$linkmode" != prog && test "$linkmode" != lib; then
            func_fatal_error "\`$lib' is not a convenience library"
          fi
-         tmp_libs=
-         for deplib in $dependency_libs; do
-           deplibs="$deplib $deplibs"
-           if $opt_duplicate_deps ; then
-             case "$tmp_libs " in
-             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-             esac
-           fi
-           tmp_libs="$tmp_libs $deplib"
-         done
          continue
        fi # $pass = conv
 

Reply via email to