gcc configure with gnu ld

Peter Kurpis pkurpis@keck.hawaii.edu
Wed Apr 4 13:27:00 GMT 2001


> From aoliva@redhat.com Wed Apr  4 01:36:41 2001

> I must be missing something.  Where does collect2 fit into the
> picture?  To the best of my knowledge, it just passes these flags on
> to the actual linker.

Okay, I got the explanation.  I looked at  collect.c  cursorily,
and although it seemingly parses some args, it passes most to
a fork to  ld .

The confusing thing turned out to be the behavior of GNU  ld , 
specifically with respect to the  -R  flag, which behaved like
 -rpath , although was documented (or so I thought, from the 
docs I'd seen) to do something completely different.

But I just checked  www.gnu.org/manual  for the official ld 
manual, and on ELF systems,  -R  followed by a pathname does
indeed behave like  -rpath , for compatibility.

As a sidenote, I just rebuilt  gcc  to point to the Solaris 
 as  and  ld , using your suggestion, and it only works with
 -R  now, as expected.

Just goes to show me to RTFM.  ;-)  Thanks for your help!



More information about the Gcc-help mailing list