bug-libtool
[Top][All Lists]
Advanced

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

Re: Possible flaw in `libtool's argument shuffle ?? --


From: Ralf Wildenhues
Subject: Re: Possible flaw in `libtool's argument shuffle ?? --
Date: Fri, 4 Feb 2005 10:41:38 +0100
User-agent: Mutt/1.4.1i

Hi Paul,

* Paul Townsend wrote on Fri, Feb 04, 2005 at 10:01:29AM CET:
> =====
> The Solaris link editor options, "-Bstatic" and "-Bdynamic", are
> position dependent in the command line.  I modified the "wget" configure
> file so that the command line substring "-Bstatic -lssl -lcrypto
> -Bdynamic" should have been used.  `libtool', however, shuffled the
> options such that the effective substring "-Bstatic -Bdynamic -lssl
> -lcrypto" was used.  I upgraded the "libtool.m4" and "ltmain.sh" to the
> latest revision I could find.

Yes.  This is a known bug.  It's not an easy one to solve, though.

> FWIW, the "-Bstatic" option doesn't necessarily cause the Solaris link
> editor to build a static image.  The "-dn" option should probably be
> used instead.

Hmm.  Libtool's -all-static is supposed to build a static image, not
-static.

*snip*
> Crude patch for the generated `libtool' that corrects the problem.
> Sorry, didn't have time to play with "libtool.m4"/"ltmain.sh".  The
> patch also contains a replacement of "$host" for "$host_os" as
> "$host_os" is not defined within `libtool'.  It should be noted that
> the additional code attempts to restrict itself the "Forte" compiler.
> I suppose "-Wl,-Bstatic", etc., could be used instead.

The $host problem is already fixed in CVS Libtool.
Your patch is ugly in that ltmain.in code should contain as little
system-dependent stuff as possible (that should all be wrapped in
libtool.m4).

Furthermore, it breaks some stuff and so cannot be applied as is.
(The options would need to be stored in .la files for subsequent
libraries to use; but there exist Libtool versions which cannot cope
with these arguments in `deplibs', so they would choke when subsequently
trying to link against this library.)

This is definitely on the TODO list.  Not as 1.5 bugfix though, if you
ask me, since the solution is somewhat involved.
We do accept well-formed patches, though.  :)

Regards,
Ralf




reply via email to

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