libtool
[Top][All Lists]
Advanced

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

Re: How to use --whole-archive ld arg with libtool?


From: Ralf Wildenhues
Subject: Re: How to use --whole-archive ld arg with libtool?
Date: Sat, 5 Aug 2006 02:25:40 +0200
User-agent: Mutt/1.5.12-2006-07-14

Hi Reid,

* Reid Spencer wrote on Fri, Aug 04, 2006 at 09:32:27PM CEST:
> 
> libtool --tag=CXX --tag=disable-shared --mode=link g++ \
>   -o myprog -Wl,--whole-archive -llib1 -llib2 -Wl,--no-whole-archive \
>   -llib3 -llib4
> 
> This seems to generate a link command like:
> 
> g++ -o myprog -Wl,--whole-archive -Wl,--no-whole-archive -llib1 -llib2
> -llib3 -llib4 
> 
> which completely circumvents the point of the --whole-archive and
> --no-whole-archive options in the first place.

Yes.  Generic position-dependent linker flags are not implemented at
this point.  If you control lib1 and lib2 though (i.e., they are built
as part of your package, or as part of a dependent package you are the
author of), you could make them convenience archives, to achieve the
same effect.

> As there was no answer to Alain's message in 2002, and this still seems
> to be libtool's current behavior (version 1.5.22), I'm assuming this
> isn't something that is implemented by libtool.  I'm willing to do the
> leg work to prepare a patch, but I don't have a clue how libtool works
> under the covers (it *is* afterall nearly 8000 lines of shell
> scriptese).

Actually, a patch to implement generic position-dependent linker flags
would be very similar to my proposed per-target static flags patch which
I posted a while ago; it has been postponed to post-2.0.

Cheers,
Ralf




reply via email to

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