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


_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to