bug-libtool
[Top][All Lists]
Advanced

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

Libtool 1.5.x bug: -z allextract on Solaris


From: abend
Subject: Libtool 1.5.x bug: -z allextract on Solaris
Date: Wed, 20 Oct 2004 10:46:08 -0700 (PDT)

Hi,

In Libtool 1.5.x (and presumably previous versions as
well), it's not possible on Solaris to build a shared
library from convenience libraries due to a problem
with how the -z allextract option is invoked in
'libtool.m4'.

I see that a potential resolution has been provided in
HEAD via revision 1.1453
(http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/libtool/libtool/ChangeLog?rev=1.1453),
 originally
submitted as this patch:
http://lists.gnu.org/archive/html/libtool-patches/2004-02/msg00138.html

However, while that patch does indeed force all objects
within the convenience lib(s) to be linked into the
shared lib, it has the unfortunate side effect of
calling ld directly to perform the linking because it
uses the ' -Qoption ld ' CC driver flag.  The result is
that for a C++ shared library, global variables will no
longer get initialized and exception handling won't
work.  For this reason, Sun advises always using the
compiler driver itself, rather than ld directly, when
building C++ shared libraries.

Therefore, the solution, as I see it, is just to call '
-z allextract ' directly when invoking CC.  It'll do
the appropriate call-through to the link-editor.  Works
for me.

I've attached a patch for Libtool 1.5.8 (the version of
stable that I'm currently using) that solves the
original problem.

Regards

Attachment: libtool-1.5.8.diff
Description: Binary data


reply via email to

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