bug-libtool
[Top][All Lists]
Advanced

[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 
occurs:

The corresponding fragment of makefile.am is something like:

libfoo_la_SOURCES=foo.cpp
libfoo_la_LIBADD=test/libbar.la
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 
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

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




reply via email to

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