bug-libtool
[Top][All Lists]
Advanced

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

libtool 1.5.20, Solaris, linking in static libraries into the shared lib


From: Pooh
Subject: libtool 1.5.20, Solaris, linking in static libraries into the shared libraries
Date: Mon, 31 Oct 2005 13:31:24 +0300
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Good day!

There is a following problem using CC v5.5 (v5.6 from Studio 10 does show the same behaviour).
I compile the sources (attached).
test1 prints the message, while test2 doesn't.

That is because when we compile static library into the shared, using the string:
libtool --mode=link CC -rpath /tmp -o libcon2.la dummy.lo libcon.la
It becomes:
CC -G -hlibcon2.so.0 -o .libs/libcon2.so.0.0.0 .libs/dummy.o -Qoption ld -z -Qoption ld allextract,./.libs/libcon.a -Qoption ld -z -Qoption ld defaultextract -lCstd -lCrun -lc
Which is considered wrong, the string must look like:
CC -G -hlibcon2.so.0 -o .libs/libcon2.so.0.0.0 .libs/dummy.o -z allextract ./.libs/libcon.a -z defaultextract -lCstd -lCrun -lc
As stated here: http://forum.sun.com/thread.jspa?threadID=27249&tstart=0

PS. *giggle* I remember that some time ago this has been changed into the current form because of a problem with CC5.3 on Solaris 8. On 5.3 it still doesn't work in any form. But on 5.5 and 5.6 it helps. So the idea "wl=-z" looks better and better:)






reply via email to

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