building cross picks up wrong libc

Rob Taylor
Mon Nov 5 02:32:00 GMT 2001

I'm building a i686-pc-linux-gnu to powerpc--linux-gnu cross compiler with
using --prefix=/opt/powerpc for both binutils and gcc
binutil had built sucessfully
I've copied the libs and includes over from my target platform into

i've configured gcc with
--target=powerpc--linux-gnu --prefix=/opt/powerpc \
--enable-languages=c,c++ --enable-threads=posix

when the make of the cross compiler gets up to using xgcc to link,
it picks up my systems /lib/ and understandably fails.

Has anyone any idea why it would be picking up this libc rather than
/opt/powerpc/powerpc--linux-gnu/lib/ ?

alternatively, does anyone know what the decision logic is for where xgcc looks
for libraries, and where this happens in the source, then I at least have a
fighting chance of fixing this myself :)

Rob Taylor

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list