CASE 1
arm-linux-gcc -v hello.c ==> WORKS
CASE 2
arm-linux-gcc -v -L/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/staging/usr/lib hello.c ==> DOESN'T WORK
ERROR:ld.bfd: cannot find /usr/lib/libc_nonshared.a
ERROR:ld.bfd: cannot find /lib/ld-linux.so.3
CASE 3
arm-linux-gcc -v --sysroot=/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/host/usr/armeb-buildroot-linux-gnueabi/sysroot/ hello.c ==>WORKS
but says it is ignoring sysroot because it cannot find /usr/include so is like case#1 Note that buildroot-staging symlinks to buildroot-sysroot
The respective libc libraries are in:
/usr/local/xtools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sysroot/usr/lib/:/usr/local/xtools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sysroot/lib/
/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/host/usr/armeb-buildroot-linux-gnueabi/sysroot/usr/lib:/home/peter/igep2015/09Buildroot/buildroot-2016.02-TRY5/output/host/usr/armeb-buildroot-linux-gnueabi/sysroot/lib/
/arm-linux and Buildroot libraries seem identical. The cross-tool was used to build Buildroot.
The question is: why does arm-linux-gcc fail when I link to Buildroot staging libaries. This question arose because auto-tools ./configure fails with a -L to Buildroot. But I need the -L to access libSDL2, libfreetype etc in Buildroot in order to cross-compile SDL2_ttf.
Note: I am using (crosstool-NG 1.21.0) 5.1.0.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…