Hello,
In yout ltconfig script, there is the following comment concerning
building shared libs on solaris:
(this is taken at line 1335 of ltconfig, libtool version 1.3c 1.687,
2000/02/03)
# $CC -shared without GNU ld will not create a library from C++
# object files and a static libstdc++, better avoid it by now
This choice prevents me from compiling correctly with libtool on
solaris.
I have to build a c++ shared library that uses exception. Linking the
shared library with libtool prevents exceptions from working correctly.
In my experience, I do get correct results by manually using $(CC)
-shared, at least with gcc 2.95.2.
g++ calls collect2, which calls the linker. I only have the native
linker installed on my machine.
Here's a verbose transcript of what gcc 2.95.2 does when linking a
shared lib.
The setup is a c++ shared library that internally uses exceptions
(libtest.so),
with a c++ program using it (main).
Begin Transcript 2
------------------
[mproulx@soleil solaris]$ uname -a
SunOS soleil.okiok.com 5.6 Generic_105181-16 sun4m sparc
SUNW,SPARCstation-5
[mproulx@soleil solaris]$ g++ -v --shared -o .libs/libtest.so test.lo
Reading specs from
/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/specs
gcc version 2.95.2 19991024 (release)
/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/collect2 -V -G -dy
-z text -Y P,/usr/ccs/lib:/usr/lib -Qy -o .libs/libtest.so
/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/crti.o
/usr/ccs/lib/values-Xa.o
/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/crtbegin.o
-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2 -L/usr/ccs/bin
-L/usr/ccs/lib -L/usr/local/lib test.lo -lstdc++ -lm -lgcc -lgcc
/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/crtend.o
/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/crtn.o
ld: Software Generation Utilities - Solaris/ELF (3.0)
[mproulx@soleil solaris]$ ldd .libs/main
./.libs/libtest.so => ./.libs/libtest.so
libm.so.1 => /usr/lib/libm.so.1
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
[mproulx@soleil solaris]$ ldd .libs/libtest.so
libm.so.1 => /usr/lib/libm.so.1
libc.so.1 => /usr/lib/libc.so.1
libdl.so.1 => /usr/lib/libdl.so.1
----------------
End transcript 2
So maybe this requirement isn't a requirement anymore?
Can anyone with the expertise clarify the situation, please?
Thanks!
Martin
--
______________________________________________________________________________
Okiok Data ltd. | Spécialiste des solutions de sécurité
d'entreprise
Tel. : (450) 681.1681 |
http://www.okiok.com | Specializing in enterprise security solutions