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

Re: gcc option re choice of ld?



> 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 )?


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