This is the mail archive of the gcc-patches@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]

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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]