On 16 February 2015 at 14:38, Mike Frysinger <vap...@gentoo.org> 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