This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: HPUX PA LINK_SPEC change (HP linker & shared libs)
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: sje at cup dot hp dot com (Steve Ellcey)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 3 Oct 2002 17:35:34 -0400 (EDT)
- Subject: Re: HPUX PA LINK_SPEC change (HP linker & shared libs)
> + @item -mgnu-ld
> + @opindex gnu-ld
> + Use GNU ld specific options. This passes @option{-shared} to ld when
> + building a shared library. It is the default when GCC is configured,
> + explicitly or implicitly, with the GNU linker.
> + @end table
> +
> + @item -mhp-ld
> + @opindex hp-ld
> + Use GNU ld specific options. This passes @option{-b} to ld when
> + building a shared library and passes @option{+Accept TypeMismatch}
> + to ld on all links. It is the default when GCC is configured,
> + explicitly or implicitly, with the HP linker.
> @end table
I have been pondering the mechanics of switching linkers. If GCC is
configured say for GNU ld, the -mhp-ld option isn't useful unless
you can actually get collect2 to run HP ld.
When GCC is configured with "--with-ld", configure defines DEFAULT_LINKER
and this hardcodes into collect2. When "--with-ld", collect2 searches for
ld. At the moment, we don't have a good way to select linkers. I
suppose that a user could specify a linker select script and select linkers
based on "+Accept TypeMismatch".
Thoughts?
Dave
--
J. David Anglin dave.anglin@nrc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6605)