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: Steve Ellcey <sje at cup dot hp dot com>
- To: dave at hiauly1 dot hia dot nrc dot ca
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 3 Oct 2002 15:29:39 -0700 (PDT)
- Subject: Re: HPUX PA LINK_SPEC change (HP linker & shared libs)
> 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?
I am not sure what you are trying to accomplish here. If GCC was
configured with --with-ld then it doesn't seem possible to change what
ld is used and -mhp-ld and -mgnu-ld probably won't be needed or useful.
But if gcc was configured without --with-ld then the ld found will
depend on your path (I think) and you may need -mhp-ld or -mgnu-ld to
match whichever ld it finds if that is different then the default linker
type that may have been set during configure.
I think the person building GCC will need to make sure that
--with-gnu-ld or --without-gnu-ld actually matches the ld they use in
the build, but a subsequent user of that GCC should be able to use a
different linker by having a different path set and by using the
-mgnu-ld or -mhp-ld switches if necessary.
Steve Ellcey
sje@cup.hp.com