Re: libtool problem with --whole-archive/--no-whole-archive

Venkatesh Vivekanandan <[email protected]>
Newsgroups gmane.comp.gnu.libtool.general
Message-ID <CANzB88Ue4tZ4uhGcqh62SuO7dpxbyNGXaTUA+pwxnHComsc5Dg@mail.gmail.com>
On 16 February 2015 at 14:38, Mike Frysinger <[email protected]> wrote:

> On 26 Nov 2014 11:20, Venkatesh Vivekanandan wrote:
> > Problem is, platform linker command doesn't have
> > --whole-archive/--no-whole-archive around the lib. Instead it comes later
> > in the command line.
>
> iirc, libtool likes to sort things for you
>
> > How to propogate the --whole-archive/--no-whole-archive all the way down
> to
> > example app linking?. Importantly, it should be around the -lmyextlib. I
> > can make changes only at platform/targetA/Makefile.am as example/* is
> > common across all other platforms.
> >
> > Note: Tried libtool's suggestion of -Wl,'-whole-archive -lfoo
> > -no-whole-archive' as mentioned in
> > lists.gnu.org/archive/html/libtool/2002-05/msg00043.html but that didn't
> > work.
>
> what do you mean by "didn't work" ?


I meant linker command line didn't come out as I expected.

Expectation:
-Wl,--whole-archive -lmyextlib -ldl  -Wl,--no-whole-archive

Output:
 -lmyextlib -ldl

As explained, atleast platform linking has --whole-archive and
--no-whole-archive, but examples didn't even had them

platform libtool link:
-lrt -lcrypto -lmyextlib -ldl  -pthread -O2 -pthread -Wl,--whole-archive
-Wl,--no-whole-archive

example libtool link:
-lrt -lcrypto -lmyextlib -ldl  -pthread -O2 -pthread




> maybe quoting is messing you up ?  you could try:
>  -Wl,--whole-archive,-lfoo,--no-whole-archive
>

I tried this and didn't get the expected result.


> -mike
>

_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.