You are not logged in.
Please read from the fourth message.
OLD MESSAGE:
Today I needed to cross compile and ld could not get libc.co.6 because it looks it with the absolute path /usr/lib/libc.so.6 ignoring -L options,
I tried fixing using --sysroot, but ld was not compiled with its support.
So I was wondering, it should not be better to compile with --with-sysroot ?
Last edited by ezzetabi (2010-01-08 10:11:51)
Offline
Post a feature request for this, so you can be sure that at least one dev will look at it.
Offline
I can easily make a cross compiler for a variety of architectures and have not run into that issue and the are a few already in [community]. Looks like you are doing it wrong...
Offline
I am trying to compile the doom3 SDK: so it is a cross compiling from x86_64 to i386.
After downloading the SDK and unpacking it with --tar xf, since the package uses scons I had to modify the file SConstruct line BASELINKFLAGS: I put BASELINKFLAGS = [ "-m32", "-L/opt/lib32/lib", "-L/opt/lib32/usr/lib", ]
but the linking fails with
`/usr/bin/ld: skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6'
On the other hand if I use
BASELINKFLAGS = [ "-m32", "--sysroot=/opt/lib32", ]
ld fails anyway with... :S
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.2/../../../crti.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.2/crtbeginS.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.2/crtendS.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.2/../../../crtn.o' is incompatible with i386 output
It is not really important, but I find annoying that I cannot compile it :S
Last edited by ezzetabi (2010-01-08 09:48:59)
Offline