[ELDK] U-Boot compile with error

Pavel Machek pavel at denx.de
Tue Oct 28 21:32:53 CET 2014


On Tue 2014-10-28 19:06:50, l.heusser at bluewin.ch wrote:
> Hello
> I try to build u-boot (mainline) using the ELDK 5.5 for Beaglebone Black but the build compile with error.
> Here the end of the build output:
>   AS      arch/arm/cpu/armv7/start.o
>   AS      arch/arm/cpu/armv7/omap3/lowlevel_init.o
>   LD      arch/arm/cpu/armv7/omap3/built-in.o
>   CC      common/main.o
>   CC      common/board_f.o
>   CC      common/cmd_version.o
>   LD      common/built-in.o
>   CC      drivers/usb/gadget/f_fastboot.o
>   LD      drivers/usb/gadget/built-in.o
>   CC      lib/display_options.o
>   LD      lib/built-in.o
>   LD      examples/standalone/hello_world
> arm-linux-gnueabi-ld.bfd: cannot find -lgcc
> make[2]: *** [examples/standalone/hello_world] Error 1
> make[1]: *** [examples/standalone] Error 2
> make: *** [examples] Error 2
> Can anybody help? Thanks

I had same problem with u-boot compilation on eldk-5.4, and did this
to work around it. You can probably do something similar...

--- a/Makefile
+++ b/Makefile
@@ -674,10 +674,10 @@ ifdef CONFIG_USE_PRIVATE_LIBGCC
 ifeq ($(CONFIG_USE_PRIVATE_LIBGCC),y)
 PLATFORM_LIBGCC = arch/$(ARCH)/lib/lib.a
 else
-PLATFORM_LIBGCC = -L $(CONFIG_USE_PRIVATE_LIBGCC) -lgcc
+PLATFORM_LIBGCC = -L $(CONFIG_USE_PRIVATE_LIBGCC) /data/eldk-5.4/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi/usr/lib/arm-linux-gnueabi/4.7.2/libgcc.a
 endif
 else
-PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(c_flags)
-print-libgcc-file-name`) -lgcc
+PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(c_flags)
-print-libgcc-file-name`) /data/eldk-5.4/armv7a/sysroots/armv7a-vfp-neon-linux-gnueabi/usr/lib/arm-linux-gnueabi/4.7.2/libgcc.a
 endif
 PLATFORM_LIBS += $(PLATFORM_LIBGCC)
 export PLATFORM_LIBS

My build script is:

#!/bin/bash
eval ` eldk-switch.sh -m -r 5.4 armv7a`
#make mrproper wagabuibui_config
#make mrproper socfpga_cyclone5_config
nice make -j 3 u-boot.img && \
cp u-boot.bin /srv/tftp

(I assumed something was wrong with my setup, so I did not investigate
further.)
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


More information about the eldk mailing list