This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: v3 testsuite failures under hpux--setlocale dependency on libdld.sl
- To: ro at TechFak dot Uni-Bielefeld dot DE (Rainer Orth)
- Subject: Re: v3 testsuite failures under hpux--setlocale dependency on libdld.sl
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Mon, 21 May 2001 14:38:30 -0400 (EDT)
- Cc: libstdc++ at gcc dot gnu dot org
> > I am experiencing many v3 testsuite failures with `-static'. I believe
> > that this is due to the dependency of setlocale on libdld.sl (shl_load,
> > etc).
>
> > I think this probably has to follow `-lc'. I need a suggestion on how
> > to implement this in the testsuite.
The `+n' HP linker option causes the linker to scan objects in libraries
in an left to right order, and then rescan again until all dependencies
are resolved. Thus, the suggested linking option doesn't have to
"follow" `-lc'. I justed tacked it on to cxx_final in libstdc++-v3-dg.exp
and it seemed to work ok. On the other hand, removing `-static' also
worked. This of course results in the shared version of libstdc++ being
used instead. You can see the results from a testsuite run without
`-static' here: <http://gcc.gnu.org/ml/gcc-testresults/2001-05/msg00429.html>.
Trying to put it after `-lc' could get tricky, particularly if you
want to support running the v3 testsuite with `-threads'. A different
library is used in this case.
The one issue that I am worried about is constructors. There seems to be
a problem with collect2 finding constructors in shared libraries under
hpux. You can see that there are still a large number of objc testsuite
failures in the above. This occurs only with a shared libobjc. I started
researching this and I am 95% certain that the problem is collect2 isn't
finding the constructors to initialize the classes Object and NXConstantString.
These constructors reside in libobjc and are only referenced internally
by another module in the shared library. I don't understand how collect2
works but I dont't see how it can work out this dependency just from the
output of nm.
The `+n' option changes the library list in a way collect2 may not
understand. I don't know if this matters but it might.
There are also some other subtle isses with the link string. The `-E'
option exports all symbols defined by a program to shared libraries.
This makes programs larger. The `-l:libdld.sl' allows the linker to search
for the library with the dynamic loader ignoring the current state of
the -a option. There is no archive library with the dynamic loader.
Thus, you just can't tack on -ldld when using `-static'.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)