bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

libtool 1.9b: fix deplibs order in lib,link pass


From: Andreas Schwab
Subject: libtool 1.9b: fix deplibs order in lib,link pass
Date: Mon, 13 Sep 2004 17:17:34 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Libtool has added a dlpreopen pass over libraries.  But this pass reverses
the order of elements in the $deplibs list.  This causes problems when the
link pass tries to find libraries when they are located in non-standard
places denoted by -L options.  Due to the reversed order these -L options
occur after the libraries that need them, and they are not found.  The
solution is to reverse the elements of $deplibs at the start of the link
pass.

Andreas.

2004-09-13  Andreas Schwab  <address@hidden>

        * config/ltmain.in: Reverse $deplibs list at start of link pass in
        lib mode.

--- config/ltmain.in    05 Sep 2004 12:03:12 +0200      1.14
+++ config/ltmain.in    05 Sep 2004 14:59:12 +0200      
@@ -3248,6 +3248,13 @@ func_mode_link ()
     esac
 
     for pass in $passes; do
+      if test "$linkmode,$pass" = "lib,link"; then
+       tmp_deplibs=
+       for deplib in $deplibs; do
+         tmp_deplibs="$deplib $tmp_deplibs"
+       done
+       deplibs=$tmp_deplibs
+      fi
       if test "$linkmode,$pass" = "lib,link" ||
         test "$linkmode,$pass" = "prog,scan"; then
        libs="$deplibs"

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]