This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
A brief bit of context:
The Debian project has a port underway which, when completed, will allow
users to run a Debian-typical userland on top of a NetBSD kernel and NetBSD
core libraries (libc & co). Debian policy expects things to compile with
GCC 3.2, and barring a few quirks, 3.2.2 compiles everything I've thrown at
it on the port, so far.
Since we don't provide the NetBSD toolchain defines, this is *not* the
'NETBSD_NATIVE' mode (which is fine). In fact, copying the various NetBSD
files in gcc/config to more appropriate names, adjusting config.gcc to use
htem, and removing the NETBSD_NATIVE sections produces a compiler that
appears to be identical to the 'fire and forget' method. (This was done
while trying to narrow down the problems described below.)
One unfortunate circumstance is that NetBSD's normal LIB_SPEC value
prevents linking against libc for shared libraries (as far as I know, doing
so is not actively harmful, but is considered redundant due to the NetBSD
linker). Since Debian generally expects to be able to tell which version of
libc was linked against (for dependancy sanity), having the NEEDED section
for libc is relatively necessary.
Any attempts to adjust LIB_SPEC, however, to include -lc when linking
shared libraries appears to cause libstdc++-v3 to start throwing SIGABRT
from (at least) basic_string operations, which makes it's test suite
light up in all sorts of ways, and blows up nicely when using most C++
applications.
The LIB_SPEC entry is reproduced below, so that folks don't have to dig
in the sources for it (the + marks the new line, and does not appear in
the actual file, of course):
#define LIB_SPEC \
"%{posix: \
%{!p: \
%{!pg:-lposix}} \
%{p:-lposix_p} \
%{pg:-lposix_p}} \
+ %{shared:-lc} \
%{!shared: \
%{!symbolic: \
%{!p: \
%{!pg:-lc}} \
%{p:-lc_p} \
%{pg:-lc_p}}}"
I have managed to narrow down one test case that consistantl fails in the
same way: libstdc++-v3/testsuite/21_strings/append.cc. I can provide GDB
output for the test, if anyone wants it; I may also be able to provide
a login on the system in question if necessary (though doing so is
non-trivial; if the test to be run isn't insanely complex, I'm happy to do
it by hand).
Thank you, in advance, for any help that anyone can provide on this.
--
Joel Baker <fenton at debian dot org>
Attachment:
pgp00000.pgp
Description: PGP signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |