[oe] [RFC] Correct the .la files produced by gcc cross

Koen Kooi koen at dominion.kabel.utwente.nl
Wed Dec 13 23:07:52 UTC 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Graeme Gregory schreef:
> In my libstdc++.la file in tmp/cross/${TARGET_SYS}/lib/
> 
> The following badness occurs.
> 
> dependency_libs='
> -L/home/gg/zaurus/build-terrier-ang/tmp/work/armv5te-angstrom-linux-gnueabi/gcc-cross-4.1.1-r8/gcc-4.1.1/build.x86_64-linux.arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi/libstdc++-v3/src
> -L/home/gg/zaurus/build-terrier-ang/tmp/work/armv5te-angstrom-linux-gnueabi/gcc-cross-4.1.1-r8/gcc-4.1.1/build.x86_64-linux.arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi/libstdc++-v3/src/.libs
> -lm -lm -lm
> -L/home/gg/zaurus/build-terrier-ang/tmp/work/armv5te-angstrom-linux-gnueabi/gcc-cross-4.1.1-r8/gcc-4.1.1/build.x86_64-linux.arm-angstrom-linux-gnueabi/./gcc
> -L/home/gg/zaurus/build-terrier-ang/tmp/cross/arm-angstrom-linux-gnueabi/bin
> -L/home/gg/zaurus/build-terrier-ang/tmp/cross/arm-angstrom-linux-gnueabi/lib
> -L/home/gg/zaurus/build-terrier-ang/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.1.1
> -L/home/gg/zaurus/build-terrier-ang/tmp/cross/lib/gcc/arm-angstrom-linux-gnueabi/4.1.1/../../../../arm-angstrom-linux-gnueabi/lib
> -lgcc_s -lc -lgcc_s -lm -lgcc_s -lc -lgcc_s  '
> 
> Which you will note leads the linker to start using
> tmp/staging/${BUILD_SYS}/lib which is not a compatible architecure in
> most cases. And for me causes libtool linking to fail when it looks at
> x86_64 .so files while linking for arm executables.
> 
> I think this line should be sed magiced to something along the lines of
> 
> dependency_libs='
> -L/home/gg/zaurus/build-terrier-ang/tmp/cross/${TARGET_SYS}/lib
> -lgcc_s -lc -lm'
> 
> What are the clever peoples thoughts on this.

I'm seeing the same with powerpc:

| powerpc-angstrom-linux-g++ -mcpu=603e -shared -nostdlib
/data/build/koen/OE/build/tmp/angstrom/cross/lib/gcc/powerpc-angstrom-linux/4.1.1/../../../../powerpc-angstrom-linux/lib/crti.o
/data/build/koen/OE/build/tmp/angstrom/cross/lib/gcc/powerpc-angstrom-linux/4.1.1/crtbeginS.o
 .libs/usbpp.o  -Wl,--rpath
- -Wl,/data/build/koen/OE/build/tmp/angstrom/staging/powerpc-angstrom-linux/lib -Wl,--rpath
-
-Wl,/data/build/koen/OE/build/tmp/angstrom/cross/lib/gcc/powerpc-angstrom-linux/4.1.1/../../../../powerpc-angstrom-linux/lib
- -Wl,--rpath
-
-Wl,/data/build/koen/OE/build/tmp/angstrom/cross/lib/gcc/powerpc-angstrom-linux/4.1.1/../../../../powerpc-angstrom-linux/lib
- -L/data/build/koen/OE/build/tmp/angstrom/cross/powerpc-angstrom-linux/lib
- -L/data/build/koen/OE/build/tmp/angstrom/cross/powerpc-angstrom-linux/bin
-
-L/data/build/koen/OE/build/tmp/angstrom/work/ppc603e-angstrom-linux/gcc-cross-4.1.1-r8/gcc-4.1.1/build.i686-linux.powerpc-angstrom-linux/./gcc
- -L/data/build/koen/OE/build/tmp/angstrom/staging/i686-linux/lib
-
-L/data/build/koen/OE/build/tmp/angstrom/work/ppc603e-angstrom-linux/gcc-cross-4.1.1-r8/gcc-4.1.1/build.i686-linux.powerpc-angstrom-linux/powerpc-angstrom-linux/libstdc++-v3/src/.libs
-
-L/data/build/koen/OE/build/tmp/angstrom/work/ppc603e-angstrom-linux/gcc-cross-4.1.1-r8/gcc-4.1.1/build.i686-linux.powerpc-angstrom-linux/powerpc-angstrom-linux/libstdc++-v3/src
- -L/data/build/koen/OE/build/tmp/angstrom/staging/powerpc-angstrom-linux/lib
/data/build/koen/OE/build/tmp/angstrom/staging/powerpc-angstrom-linux/lib/libusb.so
- -L/data/build/koen/OE/build/tmp/angstrom/cross/lib/gcc/powerpc-angstrom-linux/4.1.1
-
-L/data/build/koen/OE/build/tmp/angstrom/cross/lib/gcc/powerpc-angstrom-linux/4.1.1/../../../../powerpc-angstrom-linux/lib
/data/build/koen/OE/build/tmp/angstrom/cross/lib/gcc/powerpc-angstrom-linux/4.1.1/../../../../powerpc-angstrom-linux/lib/libstdc++.so
- -lm -lc -lgcc_s
/data/build/koen/OE/build/tmp/angstrom/cross/lib/gcc/powerpc-angstrom-linux/4.1.1/crtsavres.o
/data/build/koen/OE/build/tmp/angstrom/cross/lib/gcc/powerpc-angstrom-linux/4.1.1/crtendS.o
/data/build/koen/OE/build/tmp/angstrom/cross/lib/gcc/powerpc-angstrom-linux/4.1.1/../../../../powerpc-angstrom-linux/lib/crtn.o
 -mcpu=603e -Wl,-rpath-link
- -Wl,/data/build/koen/OE/build/tmp/angstrom/staging/powerpc-angstrom-linux/lib -Wl,-O1
- -Wl,-soname -Wl,libusbpp-0.1.so.4 -o .libs/libusbpp-0.1.so.4.4.4


The sed trick sounds like a good idea.

regards,

Koen.

PS: when will we rewrite bitbake in sed?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFgIfIMkyGM64RGpERAom/AJ9XPCnlrnjCnDW+LLOdHVNjq7TcTgCdGxEv
fWa+ZfeCNLrphkozFfXBLac=
=e+iL
-----END PGP SIGNATURE-----




More information about the Openembedded-devel mailing list