[Top][All Lists]

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

libtool, Solaris, Sun Studio compiler

From: Пухальский Юрий Андреевич
Subject: libtool, Solaris, Sun Studio compiler
Date: Tue, 15 Feb 2005 22:39:45 +0300

Good day!

I think I've posted this already...

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 

The corresponding fragment of makefile.am is something like:

libfoo_la_LDFLAGS= -version-info 3:0:0

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 

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

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/libldstab_ws.so -dy -G -hlibrdrsup.so.3 -z 
allextract -z defaultextract 
 -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 
 /opt/SUNWspro/prod/lib/CCrtn.o /opt/SUNWspro/prod/lib/crtn.o 

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).

reply via email to

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