RE: [U-Boot-Users] u-boot compile problem

Hi all, I've downloaded the latest u-boot-1.1.1 and I'm trying to compile, but I get this error at the end... any idea? Toolchain: cross-3.2 (from arm linux) regards
arm-linux-gcc -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -mshort-load-bytes -msoft-float -D__KERNEL__ -DTEXT_BASE=0x33F80000 -I/root/audiotel/u-boot-1.1.1nand/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/local/arm/current/bin/../lib/gcc-lib/arm-linux/3.2/include -pipe -DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv4 -Wall -Wstrict-prototypes -g -Os -fno-strict-aliasing -fno-common -ffixed-r8 -mshort-load-bytes -msoft-float -D__KERNEL__ -DTEXT_BASE=0x33F80000 -I/root/audiotel/u-boot-1.1.1nand/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/local/arm/current/bin/../lib/gcc-lib/arm-linux/3.2/include -pipe -DCONFIG_ARM -D__ARM__ -mapcs-32 -march=armv4 -I.. -Bstatic -T /root/audiotel/u-boot-1.1.1nand/board/smdk2410/u-boot.lds -Ttext 0x33F80000 hello_world.c -o hello_world /usr/local/arm/current/bin/../lib/gcc-lib/arm-linux/3.2/../../../../arm-linux/bin/ld: cannot find -lfloat collect2: ld returned 1 exit status make[1]: *** [hello_world] Error 1 make[1]: Leaving directory `/root/audiotel/u-boot-1.1.1nand/examples' make: *** [examples] Error 2 [root@tecne184 u-boot-1.1.1nand]#
You run into the same problem i had. It is not a problem with the toolchain, it is due to the fact how the makefile in examples is written.
When you first run make without arm-linux-gcc in the path make does a lot, but it created only empty .depend files (because of compiler not found). Afterwards you include arm-linux-gcc in the path and run make again. Everything is running then except the examples directory.
Make does not compile hello_world.c, instead it uses a builtin implicit rule to make hello_world (there is no dependency from OBJS and the explicit dependency for hello_world.o is missing, because of empty .depend). When you run make -r (no builtin implicit rules) it works.
Work around: make clobber (deletes your wrong .depend) mkconfig ... adding arm-linux-gcc to your path make
Hint to Wolfgang: If you add OBJS to the all rule in Makefile for examples, it will work in any case. all: .depend $(LIB) $(OBJS) $(SREC) $(BIN)
Rainer

In message 2574043332486841A5B27A5FE9769E4508EE914D@esealnt888.al.sw.ericsson.se you wrote:
It is not a problem with the toolchain, it is due to the fact how the makefile in examples is written.
...
Hint to Wolfgang: If you add OBJS to the all rule in Makefile for examples, it will work in any case. all: .depend $(LIB) $(OBJS) $(SREC) $(BIN)
Added, thanks!
Best regards,
Wolfgang Denk
participants (2)
-
Rainer Brestan (VI/SEA)
-
Wolfgang Denk