[Top][All Lists]

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


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

I see that a potential resolution has been provided in
HEAD via revision 1.1453
submitted as this patch:

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.


Attachment: libtool-1.5.8.diff
Description: Binary data

reply via email to

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