bug-libtool
[Top][All Lists]
Advanced

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

Re: libtool 1.5.20, Solaris, linking in static libraries into the shared


From: Ralf Wildenhues
Subject: Re: libtool 1.5.20, Solaris, linking in static libraries into the shared libraries
Date: Mon, 31 Oct 2005 22:17:16 +0100
User-agent: Mutt/1.5.9i

Hi Yuri,

* Pooh wrote on Mon, Oct 31, 2005 at 03:38:52PM CET:
> Ralf Wildenhues wrote:
> >
> >>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
> >
> >There is a partly related bugfix pending:
> >http://lists.gnu.org/archive/html/libtool-patches/2005-10/msg00111.html

I forgot to say that above bugfix was C, not C++.

> >Does
> > CC -G -hlibcon2.so.0 -o .libs/libcon2.so.0.0.0  -z \
> >   allextract ./.libs/libcon.a -z defaultextract  -lCstd -lCrun -lc
> >
> >work as well?  For which compiler/Solaris versions (print `CC -V')?
> >(I assume not, that's probably why you added the dummy.lo in the first
> >place, right?)
> >
> Yes, dummy.lo is about this matter, somewhere someday in my projects it 
> didn't work... But when i try your line now, it works on CC v5.5 and v5.6.
> 
> >What I haven't understood yet is why we use `-Qoption' at all.  There
> >must be some combination where `-z' doesn't work as expected.  (Haven't
> >checked the archives for this yet..)
> >
> On CC v5.3  if we write
> CC ... -z allextract libfoo.a -z defaultextract ...,
> It becomes
> ld ... -z allextract -z defaultextract....
> While
> CC ... -Qoption ld -z,allextract,.libfoo.a -Qoption ld -z,defaultextract
> Becomes
> ld ... -z allextract libfoo.a -z defaultextract
> I wrote about it to bug-libtool in march (about 08.03). For 5.3 it was 
> ok, but now -Qoption ld seems deprecated, and first approach works on my 
> 5.5 (patched and not) and 5.6.

Thank you for checking.  Could I ask another favor?  Could you try the
same thing for the C compiler driver, and maybe also for the Fortran
ones (again including versions and stuff)?  Thank you very much.

> >By the way, another question (since you seem to have access to a number
> >of compiler/system version):  Does the addition of `-lCstd -lCrun' cause
> >the C++ library symbols to be copied into the created library, or are
> >they linked dynamically?
*snip*
> The answer to your question: on all four platforms it is being linked 
> dynamically.

Great!

Cheers,
Ralf




reply via email to

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