[OE-core] dylan: meta-toolchain and u-boot : "cannot find -lgcc"

Eric Bénard eric at eukrea.com
Fri Apr 26 15:11:03 UTC 2013


Hi Mark,

Le Fri, 26 Apr 2013 09:46:20 -0500,
Mark Hatle <mark.hatle at windriver.com> a écrit :
> I see, it's using ld instead of gcc for linking.  AFAIK though, you really 
> shouldn't be using -lgcc in either uboot or linux for any platform.  That seems 
> suspicious to me.
> 
u-boot is using libgcc in its makefile (Linux doesn't).

I've found the problem root cause in the u-boot's Makefile :
PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
(but CC and CFLAGS are set in the Makefiles thus the ones of the
environment are not used

$ arm-oe-linux-gnueabi-gcc  -print-libgcc-file-name
libgcc.a
but :
$ arm-oe-linux-gnueabi-gcc --sysroot=/path_to/oecore-x86_64/sysroots/armv5te-oe-linux-gnueabi -print-libgcc-file-name 
returns :
/path_to/oecore-x86_64/sysroots/armv5te-oe-linux-gnueabi/usr/lib/arm-oe-linux-gnueabi/4.7.2/libgcc.a

so if I manage to pass
--sysroot=/path_to/oecore-x86_64/sysroots/armv5te-oe-linux-gnueabi
when PLATFORM_LIBGCC is computed, I get a working build.

so that's not a problem in the SDK : thanks for driving me
to the right track to investigate on this issue ;-)

Eric




More information about the Openembedded-core mailing list