Fix build failure in examples/standalone
authorSanjeev Premi <premi@ti.com>
Mon, 9 Nov 2009 17:13:00 +0000 (22:43 +0530)
committerWolfgang Denk <wd@denx.de>
Wed, 2 Dec 2009 22:17:26 +0000 (23:17 +0100)
Some versions of 'make' do not handle trailing white-spaces
properly. Trailing spaces in ELF causes a 'fake' source to
be added to the variable COBJS; leading to build failure
(listed below). The problem was found with GNU Make 3.80.

Using text-function 'strip' as a workaround for the problem.

make[1]: Entering directory `/home/sanjeev/u-boot/examples/standalone'
arm-none-linux-gnueabi-gcc -g  -Os   -fno-common -ffixed-r8 -msoft-float
-D__KERNEL__ -DTEXT_BASE=0x80e80000 -I/home/sanjeev/u-boot/include
-fno-builtin -ffreestanding -nostdinc -isystem /opt/codesourcery/2009q1-
203/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/include -pipe  -DCONFIG_
ARM -D__ARM__ -marm  -mabi=aapcs-linux -mno-thumb-interwork -march=armv5
-Wall -Wstrict-prototypes -fno-stack-protector -g  -Os   -fno-common -ff
ixed-r8 -msoft-float   -D__KERNEL__ -DTEXT_BASE=0x80e80000 -I/home/sanje
ev/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/co
desourcery/2009q1-203/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.3/includ
e -pipe  -DCONFIG_ARM -D__ARM__ -marm  -mabi=aapcs-linux -mno-thumb-inte
rwork -march=armv5 -I.. -Bstatic -T u-boot.lds  -Ttext 0x80e80000 -o .c
arm-none-linux-gnueabi-gcc: no input files
make[1]: *** [.c] Error 1
make[1]: Leaving directory `/home/sanjeev/u-boot/examples/standalone'
make: *** [examples/standalone] Error 2
premi #

Signed-off-by: Sanjeev Premi <premi@ti.com>
Fixed typo (s/ElF/ELF/).
Signed-off-by: Wolfgang Denk <wd@denx.de>
examples/standalone/Makefile

index 5e2f2bcaeb45628ef88100faa1d8b351243f3620..6ea3b93db10c0d24e33f308a185cf905cd1d99ab 100644 (file)
@@ -38,7 +38,13 @@ ELF-mpc8260                      += mem_to_mem_idma2intr
 ELF-ppc                          += sched
 ELF-oxc                          += eepro100_eeprom
 
-ELF := $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU))
+#
+# Some versions of make do not handle trailing white spaces properly;
+# leading to build failures. The problem was found with GNU Make 3.80.
+# Using 'strip' as a workaround for the problem.
+#
+ELF := $(strip $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU)))
+
 SREC = $(addsuffix .srec,$(ELF))
 BIN  = $(addsuffix .bin,$(ELF))