This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-64 20021111 broken on HP-UX 11.00
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: h dot m dot brand at hccnet dot nl (H.Merijn Brand)
- Cc: law at redhat dot com, gcc at gcc dot gnu dot org
- Date: Wed, 13 Nov 2002 10:59:57 -0500 (EST)
- Subject: Re: gcc-64 20021111 broken on HP-UX 11.00
> 2002-11-11 is broken for 64bit on HP-UX. 2002-11-04 still worked ...
> FWIW 32bit version worked perfect
Sigh, I know. I am testing a "fix". However, the problem is really
GNU ld is broken. Using HP ld should work fine.
I tried to fix the fact that constructors are not being collected
from dependent shared libraries. Unfortunately, I missed testing
with GNU ld as I was mainly concerned about assembler issues.
This is what ld reports for any executable (not shared libraries)
bash-2.05a$ ldd cc1
ldd: "cc1" is not a shared executable.
I must admit that I first noted a problem using ldd to find
dependencies when I tried a bootstrap with the HP linker and a shared
libgcc. The problem is LD_LIBRARY_PATH needs to be set correctly
for it to work and this is problematic when building packages
with shared libraries.
Basically, we have to back out from trying to search dependencies
for global constructors until GNU ld is fixed. This leaves using
shared libraries with constructors broken (various v3, g++ and objc
testsuite fails are caused by this).
I tested an alternative approach using the +init/+fini switches
with the HP linker. This works fine and I was sucessful building
gcc with a shared libgcc with no regressions. However, with
the GNU linker, we hit another bug. The init and fini routines are
not called although DT_INIT and DT_FINI look ok. The result of this
is worse than not doing the dependency search, so we are in dammed
if we do and dammed if we don't situation.
Anyhow, either use the HP linker or "--disable-shared" for the moment.
I will install a patch later today to restore the previous behavior.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)