libtool-patches
[Top][All Lists]
Advanced

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

RE: [PATCH] change order of -L options when relinking


From: Scott James Remnant
Subject: RE: [PATCH] change order of -L options when relinking
Date: Sat, 01 Nov 2003 01:55:34 +0000

On Fri, 2003-10-31 at 21:35, Howard Chu wrote:

> Surely the patch description below is in the wrong order; using
> "-L/usr/lib -L/tmp/usr/lib" is the current incorrect behavior. Yes? -L search
> paths are used left-to-right.
> 
Yes, it looks that way to the eye doesn't it ... however a bit later in
the libtool script, when it puts together the actual command, it
reverses the order of everything, which means what went in the right way
round comes out the wrong way round.  I forgot to include this minor
relevant detail in the mail, but Gary and co. should already have
figured that out, right guys? :o)

The author of the original inst_prefix patch wasn't aware of this, so he
joined the two -L arguments together in the "right" order, namely
"-L/usr/lib -L/tmp/usr/lib" which after the reversal is the wrong order.

So we instead (in this patch) place them backwards so they come out
right in the actual relink command:

gcc -shared  .libs/libtest2.o  -Wl,--rpath -Wl,/opt/test/lib
-L/tmp/opt/test/lib -L/opt/test/lib -ltest1  -Wl,-soname
-Wl,libtest2.so.0 -o .libs/libtest2.so.0.0.0

Scott
-- 
Have you ever, ever felt like this?
Had strange things happen?  Are you going round the twist?

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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