This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc option re choice of ld?
- To: gcc-help at gcc dot gnu dot org
- Subject: Re: gcc option re choice of ld?
- From: pkurpis at keck dot hawaii dot edu (Peter Kurpis)
- Date: Fri, 10 Aug 2001 11:25:14 -1000 (HST)
> From aoliva@redhat.com Fri Aug 10 10:42:48 2001
Thanks, Alexandre! A couple of questions...
> On Aug 8, 2001, pkurpis@keck.hawaii.edu (Peter Kurpis) wrote:
>
> > gcc --use-different-ld=/usr/ccs/bin/ld
>
> Nope, and that's, in part, because GCC passes different options to the
> linker depending on whether it is the bundled linker or GNU ld.
>
> IIRC, this is hopefully not the case on Solaris,
I think you're right here: I think on Solaris, the usual Solaris options
are used (e.g. -R instead of -rpath). They are in my case, anyway.
> so here's a work around:
>
> % mkdir /tmp/use-different-ld
> % ln -s /usr/ccs/bin/ld /tmp/use-bundled-ld/real-ld
> % gcc -B/tmp/usr-bundled-ld/ ...
>
> Note the trailing slash: ^
Two questions, though:
(1) collect2 simply runs ld , correct? (What special purpose does it serve?
Why not simply run ld from gcc without the intervening collect2 ?)
(2) As the only name-space collisions between the subprograms called by gcc and
the programs in /usr/ccs/bin are as and ld , could I skip the first
two steps of your general solution, and just
gcc -B/usr/ccs/bin/ ...
? Or are the source formats for the two assemblers incompatible (i.e. if gcc
was configured for the GNU as )?