[U-Boot] Can't find -lgcc

Anatolij Gustschin agust at denx.de
Mon Nov 3 23:55:13 CET 2014


Hello,

On Mon, 3 Nov 2014 14:17:45 +0000
Brad Andrews <bandrews at activepower.com> wrote:

> Hello,
> Can someone help with the error below.
> My system specs:
> Fedora 3.16.6-200.fc20.i686
> ELDK 5.5.2
> 
> export PATH=/home/brad/development/ELDK/powerpc/sysroots/i686-eldk-linux/usr/bin:/home/brad/development/ELDK/powerpc/sysroots/i686-eldk-linux/usr/bin/powerpc-linux:$PATH
> export ARCH=powerpc
> export CROSS_COMPILE=powerpc-linux-
> 
> make icecube_5200_LOWBOOT_config
> make

...
> cd /home/brad/development/ELDK/powerpc/sysroots/powerpc-linux/usr/src/u-boot && powerpc-linux-ld.bfd  -n -T u-boot.lds --gc-sections -Bstatic -Ttext 0xFF000000 arch/powerpc/cpu/mpc5xxx/start.o --start-group arch/powerpc/cpu/built-in.o arch/powerpc/cpu/mpc5xxx/built-in.o arch/powerpc/lib/built-in.o board/icecube/built-in.o common/built-in.o disk/built-in.o drivers/built-in.o drivers/dma/built-in.o drivers/gpio/built-in.o drivers/i2c/built-in.o drivers/input/built-in.o drivers/mmc/built-in.o drivers/mtd/built-in.o drivers/mtd/onenand/built-in.o drivers/mtd/spi/built-in.o drivers/net/built-in.o drivers/net/phy/built-in.o drivers/pci/built-in.o drivers/power/battery/built-in.o drivers/power/built-in.o drivers/power/fuel_gauge/built-in.o drivers/power/mfd/built-in.o drivers/power/pmic/built-in.o drivers/serial/built-in.o drivers/spi/built-in.o drivers/usb/eth/built-in.o drivers/usb/gadget/built-in.o drivers/usb/host/built-in.o drivers/usb/musb-new/built-in.o drivers/usb/musb/bui
 lt-in.o 
 drivers/usb/phy/built-in.o drivers/usb/ulpi/built-in.o fs/built-in.o lib/built-in.o lib/libfdt/built-in.o net/built-in.o test/built-in.o --end-group -L . -lgcc -Map u-boot.map -o u-boot
> powerpc-linux-ld.bfd: cannot find -lgcc
> make: *** [u-boot] Error 1

the powerpc-linux-gcc in ELDK was built with hard-coded sysroot
which is:
$ powerpc-linux-gcc -print-sysroot
/opt/eldk-5.5.2/powerpc/sysroots/powerpc-linux

If the ELDK-5.5.2 wasn't installed in the default location
/opt/eldk-5.5.2, then the real sysroot should be specified
to powerpc-linux-gcc by the --sysroot option. This will be
done by setting CC when you source the environment setting
script for the toolchain, e.g.:

 $ source ~/development/ELDK/powerpc/environment-setup-powerpc-linux
 $ unset LDFLAGS

Then the building should work by running

 $ make CC="$CC"

Thanks,

Anatolij


More information about the U-Boot mailing list