summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/diffstat
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-08-23 18:31:20 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-30 12:34:15 +0100
commit9701f9551940814623ed58ef13e4c5bb29934ed6 (patch)
tree5c77623db9a7a721566d03e26542ce74d919928e /meta/recipes-devtools/diffstat
parent5a514163bc805e7f59405c0074cb577cf72b9f39 (diff)
downloadopenembedded-core-9701f9551940814623ed58ef13e4c5bb29934ed6.tar.gz
openembedded-core-9701f9551940814623ed58ef13e4c5bb29934ed6.tar.bz2
openembedded-core-9701f9551940814623ed58ef13e4c5bb29934ed6.zip
diffstat: Add TOOLCHAIN_OPTIONS to Linker calls
configure in this case does a novel thing where it drops all additional compiler options from CC variable into CFLAGS which in OE's case include the options added by TOOLCHAIN_OPTIONS and then it does exactly same for LD as well, the problem starts when we miss the --sysroot options and ABI options which are part of CC variables usually in OE, in the end it assigns LD = CC but doesnt add newly separated CFLAGS to LDFLAGS hence the compile still works since all those needed options are getting into compiler cmdline but link step fails especially when using gold, since it does not find --sysroot option on cmdline it starts to complain about missing libraries and paths This shows up with clang more so because clang does not have implicit sysroot that it silently passes down to linker like gcc does when confgured with sysroot We see errors like arm-angstrom-linux-gnueabi-clang -c -I. -I/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/diffstat/1.60-r0/diffstat-1.60 -DHAVE_CONFIG_H -D__extern_always_inline=inline -D_GNU_SOURCE -O2 -pipe -g -feliminate-unused-debug-types -march=armv7-a -mthumb -mfloat-abi=hard -mfpu=neon -no-integrated-as --sysroot=/mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/raspberrypi2 /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/work/armv7at2hf-vfp-neon-angstrom-linux-gnueabi/diffstat/1.60-r0/diffstat-1.60/diffstat.c NOTE: make -j 16 arm-angstrom-linux-gnueabi-clang -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o diffstat diffstat.o /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-ld: error: cannot open crt1.o: No such file or directory /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-ld: error: cannot open crti.o: No such file or directory /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-ld: error: cannot open crtbegin.o: No such file or directory /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-ld: error: cannot open crtend.o: No such file or directory /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-ld: error: cannot open crtn.o: No such file or directory /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-ld: error: cannot find -lgcc /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-ld: error: cannot find -lgcc /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-ld: error: cannot find -lgcc /mnt/home/kraj/work/angstrom/build/tmp-angstrom-glibc/sysroots/x86_64-linux/usr/bin/arm-angstrom-linux-gnueabi/arm-angstrom-linux-gnueabi-ld: error: cannot find -lgcc (From OE-Core rev: ebee06dbf195b74791feb63c23a637324c1656e8) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/diffstat')
-rw-r--r--meta/recipes-devtools/diffstat/diffstat_1.60.bb2
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/recipes-devtools/diffstat/diffstat_1.60.bb b/meta/recipes-devtools/diffstat/diffstat_1.60.bb
index 29c32a8754..25ba4dac4b 100644
--- a/meta/recipes-devtools/diffstat/diffstat_1.60.bb
+++ b/meta/recipes-devtools/diffstat/diffstat_1.60.bb
@@ -18,6 +18,8 @@ S = "${WORKDIR}/diffstat-${PV}"
inherit autotools gettext ptest
+LDFLAGS += "${TOOLCHAIN_OPTIONS}"
+
do_configure () {
if [ ! -e ${S}/acinclude.m4 ]; then
mv ${S}/aclocal.m4 ${S}/acinclude.m4