Fix build failure in examples/standalone
PATCH 1/1 Fix build failure in examples/standalone
The variable ELF contains many leading spaces. This adds a 'fake' source file variable COBJS. It leads to build failure as below:
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 #
--- examples/standalone/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
examples/standalone/Makefile +1 -1
@@ -38,7 +38,7 @@ ELF-mpc8260 += mem_to_mem_idma2intr ELF-ppc += sched ELF-oxc += eepro100_eeprom -ELF := $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU)) +ELF := $(strip $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU))) SREC = $(addsuffix .srec,$(ELF)) BIN = $(addsuffix .bin,$(ELF))
Signature · 1 line
1.6.2.2
PATCH 1/1 Fix build failure in examples/standalone
Quoted 32 lines · Sanjeev Premi
The variable ELF contains many leading spaces. This adds a 'fake' source file variable COBJS. It leads to build failure as below:
make[1]: Entering directory `/home/sanjeev/u-boot/examples/standalone'
arm-none-linux-gnueabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float(quoted diff) +0
-2-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/codesourcery/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 -Tu-boot.lds-Ttext0x80e80000-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 <[email protected]>--- examples/standalone/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)examples/standalone/Makefile +0
-0
examples/standalone/Makefile ELF-mpc8260 += mem_to_mem_idma2intr · line 44
Quoted 8 lines
examples/standalone/Makefile +1
-1@@ -38,7 +38,7 @@ ELF-mpc8260 += mem_to_mem_idma2intr ELF-ppc += sched ELF-oxc += eepro100_eeprom -ELF := $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU)) +ELF := $(strip $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU))) SREC = $(addsuffix .srec,$(ELF)) BIN = $(addsuffix .bin,$(ELF))
What version of make do you have? I have seen this issue when I tried to use make 3.80, but it doesn't seem to be a problem in 3.81
Nick.
PATCH 1/1 Fix build failure in examples/standalone
In reply to Sanjeev PremiDear Sanjeev Premi,
Quoted 3 lines · In message <[email protected]> you wrote:
The variable ELF contains many leading spaces. This adds a 'fake' source file variable COBJS. It leads to build failure as below:
I read about the bug reports, but I cannot reproduce this on any system I'm running.
Also, why would any white space matter here?
Can you please let me know which exact versions of "make" (output of "make --version") and cross-gcc (output of "arm-none-linux-gnueabi-gcc --version") you are running?
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The Gates in my computer are AND, OR and NOT; they are not Bill.
Premi
PATCH 1/1 Fix build failure in examples/standalone
Quoted 10 lines
-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Friday, November 06, 2009 6:15 PM
To: Premi, Sanjeev
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH] Fix build failure in examples/standaloneDear Sanjeev Premi,
In message <[email protected]> you wrote:
Quoted 8 lines
Quoted 3 lines
The variable ELF contains many leading spaces. This adds a 'fake' source file variable COBJS. It leads to build failure as below:
I read about the bug reports, but I cannot reproduce this on any system I'm running.
Also, why would any white space matter here?
I was surprised too. It is the first time ever I have seen this problem with any Makefile over years.
To debug I tried this:
examples/standalone/Makefile +2 -0
@@ -42,7 +42,9 @@ ELF := $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU)) SREC = $(addsuffix .srec,$(ELF)) BIN = $(addsuffix .bin,$(ELF)) + COBJS := $(ELF:=.o) +$(error *** COBJS evaluates to [$(COBJS)]) LIB = $(obj)libstubs.a
And the result is:
premi # make
for dir in tools examples/standalone examples/api ; do make -C $dir _depend ; done make[1]: Entering directory `/home/sanjeev/u-boot/tools'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/sanjeev/u-boot/tools'
make[1]: Entering directory `/home/sanjeev/u-boot/examples/standalone'
Makefile:47: *** *** COBJS evaluates to [hello_world.o smc911x_eeprom.o .o]. Stop.
make[1]: Leaving directory /home/sanjeev/u-boot/examples/standalone' make[1]: Entering directory /home/sanjeev/u-boot/examples/api' make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/sanjeev/u-boot/examples/api'
make -C tools all
make[1]: Entering directory `/home/sanjeev/u-boot/tools'
make[1]: Leaving directory `/home/sanjeev/u-boot/tools'
make -C examples/standalone all
make[1]: Entering directory `/home/sanjeev/u-boot/examples/standalone'
Makefile:47: *** *** COBJS evaluates to [hello_world.o smc911x_eeprom.o .o]. Stop.
make[1]: Leaving directory `/home/sanjeev/u-boot/examples/standalone'
make: *** [examples/standalone] Error 2
Notice the "empty" .o in the output. This prompted me to use $(strip ...)
Quoted 6 lines
Can you please let me know which exact versions of "make" (output of "make --version") and cross-gcc (output of "arm-none-linux-gnueabi-gcc --version") you are running?
premi # make --version
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
premi #
premi #
premi # arm-none-linux-gnueabi-gcc --version arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q1-203) 4.3.3 Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Best regards,
Sanjeev
Quoted 11 lines
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The Gates in my computer are AND, OR and NOT; they are not Bill.
Premi
PATCH 1/1 Fix build failure in examples/standalone
Quoted 76 lines
-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Premi, Sanjeev
Sent: Friday, November 06, 2009 8:21 PM
To: Wolfgang Denk
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH] Fix build failure in examples/standaloneQuoted 6 lines
-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Friday, November 06, 2009 6:15 PM
To: Premi, Sanjeev
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH] Fix build failure inexamples/standalone
Quoted 4 lines
Dear Sanjeev Premi,
In message <[email protected]>
Quoted 8 lines · you
Quoted 3 lines
The variable ELF contains many leading spaces. This adds a 'fake' source file variable COBJS. It leads to build failure as below:
I read about the bug reports, but I cannot reproduce this on any system I'm running.
Also, why would any white space matter here?
I was surprised too. It is the first time ever I have seen this problem
with anyMakefileover years.To debug I tried this:
examples/standalone/Makefile +2
-0@@ -42,7 +42,9 @@ ELF := $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU)) SREC = $(addsuffix .srec,$(ELF)) BIN = $(addsuffix .bin,$(ELF)) + COBJS := $(ELF:=.o) +$(error *** COBJS evaluates to [$(COBJS)]) LIB = $(obj)libstubs.aAnd the result is:
premi # make
for dir in tools examples/standalone examples/api ; do make -C $dir_depend; done
make[1]: Entering directory/home/sanjeev/u-boot/tools' make[1]: Nothing to be done for_depend'.
make[1]: Leaving directory/home/sanjeev/u-boot/tools' make[1]: Entering directory/home/sanjeev/u-boot/examples/standalone' Makefile:47: *** *** COBJS evaluates to [hello_world.o
smc911x_eeprom.o .o]. Stop.
make[1]: Leaving directory/home/sanjeev/u-boot/examples/standalone' make[1]: Entering directory/home/sanjeev/u-boot/examples/api' make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/sanjeev/u-boot/examples/api' make -C tools all
make[1]: Entering directory/home/sanjeev/u-boot/tools' make[1]: Leaving directory/home/sanjeev/u-boot/tools' make -C examples/standalone all
make[1]: Entering directory `/home/sanjeev/u-boot/examples/standalone' Makefile:47: *** *** COBJS evaluates to [hello_world.o
smc911x_eeprom.o .o]. Stop.
make[1]: Leaving directory `/home/sanjeev/u-boot/examples/standalone'
make: *** [examples/standalone] Error 2
Quoted 3 lines
Notice the "empty" .o in the output. This prompted me to use $(strip ...)
Just after pressing this "ENTER", I tried the following:
[Moved $(ELF-y) to end of the assignment and kill trailing spaces]
-ELF := $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU)) +ELF := $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU)) $(ELF-y)
And it worked! The message for COBJS shows:
Makefile:47: *** *** COBJS evaluates to [ hello_world.o smc911x_eeprom.o]. Stop.
So, maybe "make v3.80" has problems with trailing spaces.
For the fix, I can resubmit with the change shown above OR we could keep the original. Let me know your thoughts.
Best regards,
Sanjeev
Quoted 46 lines
Quoted 6 lines
Can you please let me know which exact versions of "make" (output of "make --version") and cross-gcc (output of "arm-none-linux-gnueabi-gcc --version") you are running?
premi # make --version
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
premi #
premi #
premi # arm-none-linux-gnueabi-gcc --version arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q1-203) 4.3.3 Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.Best regards,
SanjeevQuoted 6 lines
Best regards,
Wolfgang Denk
Signature · 1 line
DENX Software Engineering GmbH, MD: Wolfgang Denk &Detlev Zundel
Quoted 1 line
HRB 165235 Munich, Office: Kirchenstr.5, D-82194
Groebenzell, Germany
Quoted 1 line
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email:
wd at denx.de
Quoted 3 lines
The Gates in my computer are AND, OR and NOT; they are not Bill.
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH 1/1 Fix build failure in examples/standalone
Quoted 48 lines · Sanjeev
From: Premi, Sanjeev
Quoted 30 lines
From: Wolfgang Denk
Quoted 9 lines
Quoted 3 lines · Sanjeev Premi
The variable ELF contains many leading spaces. This adds a 'fake' source file variable COBJS. It leads to build failure as below:
I read about the bug reports, but I cannot reproduce this on any system I'm running.
Also, why would any white space matter here?
I was surprised too. It is the first time ever I have seen this problem
with anyMakefileover years.To debug I tried this:
examples/standalone/Makefile +2
-0@@ -42,7 +42,9 @@ ELF := $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU)) SREC = $(addsuffix .srec,$(ELF)) BIN = $(addsuffix .bin,$(ELF)) + COBJS := $(ELF:=.o) +$(error *** COBJS evaluates to [$(COBJS)]) LIB = $(obj)libstubs.aQuoted 8 lines
And the result is:
premi # make
Makefile:47: *** *** COBJS evaluates to [hello_world.o
smc911x_eeprom.o .o]. Stop.Notice the "empty" .o in the output. This prompted me to use $(strip ...)
Just after pressing this "ENTER", I tried the following:
[Moved $(ELF-y) to end of the assignment and kill trailing spaces](quoted diff) +1
-1-ELF := $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU)) +ELF := $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU)) $(ELF-y)And it worked! The message for COBJS shows:
Quoted 7 lines
Makefile:47: *** *** COBJS evaluates to [ hello_world.o
smc911x_eeprom.o]. Stop.So, maybe "make v3.80" has problems with trailing spaces.
For the fix, I can resubmit with the change shown above OR we could keep the original. Let me know your thoughts.
i kind of prefer this method. if we go with the first method, it needs to have a comment there explaining why the strip exists:
# we need the strip to workaround a bug in make-3.80 and whitespace/:= -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20091106/f86846fe/attachment.pgp
PATCH 1/1 Fix build failure in examples/standalone
Dear Mike Frysinger,
Quoted 12 lines · In message <[email protected]> you wrote:
Quoted 12 lines
Just after pressing this "ENTER", I tried the following:
[Moved $(ELF-y) to end of the assignment and kill trailing spaces](quoted diff) +1
-1-ELF := $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU)) +ELF := $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU)) $(ELF-y)And it worked! The message for COBJS shows:
Makefile:47: *** *** COBJS evaluates to [ hello_world.o
smc911x_eeprom.o]. Stop.
Quoted 8 lines
Quoted 4 lines
So, maybe "make v3.80" has problems with trailing spaces.
For the fix, I can resubmit with the change shown above OR we could keep the original. Let me know your thoughts.
i kind of prefer this method. if we go with the first method, it needs to> have a comment there explaining why the strip exists:
# we need the strip to workaround a bug in make-3.80 and whitespace/:=
We definitely need an explanationin any case - otherwise someone might come up with a patch to change the order again (say, to come up with a common form) and it breaks again.
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "I believe the use of noise to make music will increase until we reach a music produced through the aid of electrical instruments which will make available for musical purposes any and all sounds that can be heard." - composer John Cage, 1937
PATCH 1/1 Fix build failure in examples/standalone
In reply to PremiDear "Premi, Sanjeev",
Quoted 5 lines · In message <[email protected]> you…
I was surprised too. It is the first time ever I have seen this problem with any
Makefileover years.To debug I tried this:
...
Quoted 5 lines
Makefile:47: *** *** COBJS evaluates to [hello_world.o smc911x_eeprom.o .o]. Stop.
make[1]: Leaving directory `/home/sanjeev/u-boot/examples/standalone'
make: *** [examples/standalone] Error 2Notice the "empty" .o in the output. This prompted me to use $(strip ...)
Indeed. I do not doubt that your modification fixes the issue.
Quoted 6 lines
premi # make --version
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
It seems very much to me as if this was a bug in GNU Make 3.80, then.
May I please ask you to modify your poatch such that both the code and the commit message contain a comment that the added "strip" call is a workaround for a white-space handling problem in some versions of GNU make, especially version 3.80?
Thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A conservative is a man who believes that nothing should be done for
the first time. - Alfred E. Wiggam
Premi
PATCH 1/1 Fix build failure in examples/standalone
Quoted 21 lines
-----Original Message-----
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Monday, November 09, 2009 4:16 AM
To: Premi, Sanjeev
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH] Fix build failure in examples/standaloneDear "Premi, Sanjeev",
In message <[email protected]>
Quoted 2 lines · you
I was surprised too. It is the first time ever I have seen
this problem
Quoted 3 lines
with any
Makefileover years.To debug I tried this:
...
Quoted 1 line
Makefile:47: *** *** COBJS evaluates to [hello_world.o
smc911x_eeprom.o .o]. Stop.
Quoted 8 lines
Quoted 1 line
make[1]: Leaving directory
`/home/sanjeev/u-boot/examples/standalone'
Quoted 3 lines
make: *** [examples/standalone] Error 2
Notice the "empty" .o in the output. This prompted me to
use $(strip ...)
Indeed. I do not doubt that your modification fixes the issue.
[sp] I was only illustrating the problem.
Quoted 8 lines
Quoted 7 lines
premi # make --version
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Quoted 6 lines
It seems very much to me as if this was a bug in GNU Make 3.80, then.
May I please ask you to modify your poatch such that both the code and the commit message contain a comment that the added "strip" call is a workaround for a white-space handling problem in some versions of GNU make, especially version 3.80?
[sp] Sure I will do so today.
Best regards,
Sanjeev
Quoted 15 lines
Thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de A conservative is a man who believes that nothing should be done for
the first time. - Alfred E. Wiggam