This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Default linker library search paths
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Michael Morrell <morrell at alumni dot ucsd dot edu>
- Cc: binutils at sourceware dot org
- Date: Tue, 29 Sep 2009 10:12:56 +0930
- Subject: Re: Default linker library search paths
- References: <208696.14343.qm@web112615.mail.gq1.yahoo.com>
On Mon, Sep 28, 2009 at 03:34:30PM -0700, Michael Morrell wrote:
> I'm using a cross-linker and am worried that it will happily look for
> libraries on the host machine under /usr/lib even though they aren't the
> ones I want it to find and won't even be the correct architecture.
It shouldn't if binutils has been correctly configured. For example,
a ld targetting powerpc-linux but running on an i868-linux host will
only search /usr/local/powerpc-linux/lib (assuming --prefix was
/usr/local). You can also configure binutils with a sysroot, in which
case a cross ld has the same paths as a native one except that
everything is searched relative to the sysroot.
--
Alan Modra
Australia Development Lab, IBM