Subject: Re: libtool, C++ shared libraries, and pthreads
To: None <jlam@NetBSD.org>
From: Todd Vierling <tv@duh.org>
List: tech-pkg
Date: 11/11/2004 17:02:16
On Thu, 11 Nov 2004, Johnny C. Lam wrote:
> I've attached the essential part of the changes to libtool that I wish to make
> to fix the libtool.m4 that differ from the current changes in
> manual-libtool.m4. This correctly links -lpthread to the shared library when
> I build comms/gsmlib.
However, it assumes that --host includes a version number, which is not the
case when e.g. compiling from pkgsrc. It's also NetBSD's policy not to use
[kernel] version numbers to determine system features in configuration tests
such as these.
I have a different fix based on yours which will change the command for all
ELF platforms, not just 2.0. This is OK (see below). When tested, I'll
commit it to devel/libtool*.
> One side effect of this change is that the installed libtool archive no longer
> lists any of "-lstdc++ -lpthread -lgcc_s" in the dependency_libs line,
> although the shared library dependencies are still recorded in the shared
> library. I think this is okay,
Yes, it's fine. NetBSD ELF properly supports shlib dependencies.
--
-- Todd Vierling <tv@duh.org> <tv@pobox.com>