This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: building shared libraries on a.out variants of NetBSD
- To: Alexandre Oliva <aoliva at redhat dot com>
- Subject: Re: building shared libraries on a.out variants of NetBSD
- From: Todd Vierling <tv at pobox dot com>
- Date: Sat, 23 Dec 2000 15:53:23 -0500 (Eastern Standard Time)
- cc: <rearnsha at arm dot com>, <gcc-patches at gcc dot gnu dot org>, <thorpej at zembu dot com>
On 23 Dec 2000, Alexandre Oliva wrote:
: I'm not aware of the existing problems in NetBSD, though. Maybe
: there's just no way of creating C++ shared libraries with GCC on older
: versions, in which case we'd disable shared libraries on those
: platforms, not silently break them.
Here's the rundown:
NetBSD a.out prior to NetBSD 1.4:
Must use "ld -Bshareable" and explicitly add /usr/lib/c++rt0.o as the
first objectfile in the list (which won't hurt C libraries, but is only
compiled one of -fpic and -fPIC, which is a PITA for things like sparc)
NetBSD a.out in and after NetBSD 1.4:
Can now use "[g]cc -shared", but c++rt0.o is still not automatically
included; "ld -Bshareable" method still works
(could probably be detected from inspection of a -dumpspecs output,
rather than a NetBSD [kernel] version number; not currently detected in
libtool)
NetBSD a.out, post-gcc-current (Richard's patches):
Can now use "[g]cc -shared" with automatic inclusion of C++ machinery
(could probably be detected from inspection of a -dumpspecs output,
rather than a NetBSD [kernel] version number; not currently detected in
libtool)
NetBSD ELF, all versions:
Should use "[g]cc -shared" ("ld -Bshareable" can work, but you need
crtbeginS/crtendS and friends, and gcc is already smart enough on these
platforms to do that much for you)
--
-- Todd Vierling (tv@pobox.com)