bug-libtool
[Top][All Lists]
Advanced

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

Re: libtool, Solaris, Sun Studio compiler


From: Ralf Wildenhues
Subject: Re: libtool, Solaris, Sun Studio compiler
Date: Tue, 8 Mar 2005 18:02:32 +0100
User-agent: Mutt/1.4.1i

Hi there,

Sorry for the late response.

* Пухальский Юрий Андреевич wrote on Tue, Feb 15, 2005 at 08:39:45PM CET:
> Good day!
> 
> I think I've posted this already...

I cannot find any reference to it.

> As of libtool 1.5.10 (and 1.5.14, i've tried today) on Solaris with
> C++ compiler from Sun Studio versions at least 5.5 to 5.6 the
> following problem occurs:
> 
*snip*
> libtool is invoked like this:
> 
> /bin/bash ../../../libtool --tag=CXX --mode=link /opt/SUNWspro/bin/CC -o 
> librdrsup.la -rpath /opt/CPROcsp/lib -version-info 3:0:0    foo.lo 
> test/libbar.la
> 
> Which results in the following invocation of CC:
> 
> /opt/SUNWspro/bin/CC -G -nolib -hlibfoo.so.3 -o .libs/libfoo.so.3.0.0   
> .libs/foo.o -Qoption ld -z -Qoption ld allextract test/.libs/libbar.a 
> -Qoption ld -z -Qoption ld defaultextract

This looks reasonable (I think).

> Which in turn produces the following ld input:
> 
> /usr/ccs/bin/ld -zld32=-S/opt/SUNWspro/prod/lib/libCCexcept.so.1 
> -zld64=-S/opt/SUNWspro/prod/lib/v9/libCCexcept.so.1 
> -zld32=-S/opt/SUNWspro/prod/lib/libldstab_ws.so 
> -zld64=-S/opt/SUNWspro/prod/lib/v9/libldstab_ws.so -dy -G -hlibrdrsup.so.3 -z 
> allextract -z defaultextract 
> -R/opt/SUNWspro/lib/rw7:/opt/SUNWspro/lib/v8plus:/opt/SUNWspro/lib:/usr/ccs/lib:/lib:/usr/lib
>  -o .libs/librdrsup.so.3.0.0 /opt/SUNWspro/prod/lib/crti.o 
> /opt/SUNWspro/prod/lib/CCrti.o .libs/foo.o test/.libs/libbar.a -Y 
> P,/opt/SUNWspro/lib/rw7:/opt/SUNWspro/lib/v8plus:/opt/SUNWspro/prod/lib/rw7:/opt/SUNWspro/prod/lib/v8plus:/opt/SUNWspro/lib:/opt/SUNWspro/prod/lib:/usr/ccs/lib:/lib:/usr/lib
>  /opt/SUNWspro/prod/lib/CCrtn.o /opt/SUNWspro/prod/lib/crtn.o 
> >&/tmp/ld.21189.0.err
> 
> We see, that "-z blablaextract" options are being gathered adjacently,
> and thus losing its meaning... And therefore in the resulting shared
> library we don't get symbols from libbar unless they are being
> referenced in libfoo (or probably in the symfile).

This looks like the compiler frontend reorders the options, not libtool.
Is there an option we can pass to /opt/SUNWspro/bin/CC to keep it from
reordering?

Glancing at online compiler docs did not reveal anything, so I suspect
this to be a bug within the compiler driver.  (Docs for Sun Studio 10
are at http://docs.sun.com/app/docs/doc/819-0496, I did not find the
ones matching your version.)

I don't know what else we could do (but I know little about Solaris).

Regards,
Ralf




reply via email to

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