[Top][All Lists]

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

fix order of -L flags added for libtool dep libs

From: Alexandre Oliva
Subject: fix order of -L flags added for libtool dep libs
Date: 04 Apr 2005 15:44:03 -0300
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Consider the following scenario:

We're building a package that introduces libraries libA and libB, such
that libA links with libB, and both link with a pre-installed libtool
library /old/

A previous version of the package is already installed, providing
older, incompatible versions of libA and libB in say /old

For this build, we're installing libA and libB in a separate location,
say /new.

The problem here is that, when we relink libA for installation, we
start with tmp_libs="-lB -L/new" (it's in reverse order), and then we
add prepend -lC but *append* -L/old to tmp_libs.  Later on, when we
de-reverse it, we end up searching -L/old before -L/new, so we try to
link with the old -lB, and fail.

This patch, for the 1.5 branch, fixes the problem.  Ok to install?

The scenario above was actually made up, but an original scenario
involving staged installs actually came up at

Index: ChangeLog
from  Alexandre Oliva  <address@hidden>

        * (link mode): Add to tmp_libs paths for libtool dep
        libs in reverse order as well.

RCS file: /cvsroot/libtool/libtool/Attic/,v
retrieving revision 1.334.2.65
diff -u -p -r1.334.2.65
--- 16 Mar 2005 17:31:02 -0000 1.334.2.65
+++ 4 Apr 2005 18:32:10 -0000
@@ -2872,7 +2872,7 @@ EOF
              case " $deplibs " in
              *" $path "*) ;;
-             *) deplibs="$deplibs $path" ;;
+             *) deplibs="$path $deplibs" ;;
          fi # link_all_deplibs != no
Alexandre Oliva   
Red Hat Compiler Engineer   address@hidden,}
Free Software Evangelist  address@hidden,}

reply via email to

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