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

Graeme Gregory dp at xora.org.uk
Wed Dec 13 15:22:59 UTC 2006


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.

Graeme





More information about the Openembedded-devel mailing list