This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-ss-20000612: installation failure on hppa2.0n-hp-hpux11.00
- To: gcc at gcc dot gnu dot org
- Subject: Re: gcc-ss-20000612: installation failure on hppa2.0n-hp-hpux11.00
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- Date: Sun, 25 Jun 2000 15:34:09 -0400 (EDT)
I have noted similar problems under hpux 10.20. I would recommend not
trying to build a shared version of libstdc++ until there is a shared
version of libgcc available.
There are several problems:
1) cc1plus is not generating .IMPORT's for various undefined functions
in libgcc.a as you have noted. While I haven't been able to determine
the cause of this, I believe this problem will be resolved in the
near future.
2) libstdc++ is dependent on libgcc. When libstdc++ is built, it is
linked with libgcc to resolve these dependencies. This puts a number
of global data symbols from modules in libgcc into the shared
library. There is a HP linker bug with respect to global data
symbols in shared libraries. As a results, applications end up
with two copies of these symbols and all hell breaks loose when
the application executes. This problem can be avoided by using
-E when the application is linked. The other solution is to
link libstdc++ and applications using a shared libgcc. If you
read the help documentation for ld, you will see all kinds of
warnings about combining shared and archive libraries.
3) Building shared libgcc's on all platforms which support shared
libraries is tricky because of the many different link commands
needed. You can build a shared libgcc under hpux by simply
pulling all the modules from libgcc and relinking as a shared
library since they are already in PIC format. I was working
on a Makefile hack to do this. However, the build process for
libgcc has changed substantially in the past couple of months.
When you have a shared libgcc, you also need to relink gcc, etc
with the installed shared library before they are installed.
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)