gcc configure with gnu ld

Peter Kurpis pkurpis@keck.hawaii.edu
Tue Apr 3 13:18:00 GMT 2001


> From aoliva@redhat.com Mon Apr  2 18:02:34 2001
> 
> On Apr  2, 2001, pkurpis@keck.hawaii.edu (Peter Kurpis) wrote:
> 
> > I am confused:  Does  collect2  parse either option
> > (-rpath or -R) on Solaris?
> 
> Nope.
> 
> > Which ld does it use -- the one I chose with configure , or always
> > one or the other?
> 
> If you chose one using --with-ld=/path/to/ld, that's the one it uses.
> Otherwise, it searches for real-ld or ld in the `programs' directories
> listed by `gcc -print-search-dirs'.

Thanks, Alexandre, but I still don't understand why I can get 
the same (good) results (i.e. a working executable with the runtime
path to libstdc++.so hardwired) using *either*

	g++ -Wl,-rpath /usr/local/lib hello.cc

*or*

	g++ -Wl,-R /usr/local/lib hello.cc

with the *same* collect2.

If it was /usr/local/bin/ld it should use the first, if it was
/usr/ccs/bin/ld, it should use the second, but why can the same
collect2 use either syntax?



More information about the Gcc-help mailing list