gcc configure with gnu ld
Peter Kurpis
pkurpis@keck.hawaii.edu
Mon Apr 2 12:27:00 GMT 2001
I built gcc 2.95.2 on Solaris 7, with configure
option --with-gnu-ld (among others).
In an email earlier today, I implied that to get
a working executable, I had to compile (for example)
like this:
g++ -Wl,-rpath /usr/local/lib hello.cc
because just
g++ hello.cc
would not hardwire the a.out with the path to
/usr/local/lib/libstdc++.so.2.10.0 .
I just noticed that
g++ -Wl,-R/usr/local/lib hello.cc
works just as well (i.e. using the Solaris ld syntax
instead of the GNU ld syntax).
I am confused: Does collect2 parse either option
(-rpath or -R) on Solaris? Which ld does it
use -- the one I chose with configure , or always one
or the other?
More information about the Gcc-help
mailing list