Re: [U-Boot] [PATCH] Fix build failure in examples/standalone
-Original Message- From: Wolfgang Denk [mailto:w...@denx.de] Sent: Monday, November 09, 2009 4:16 AM To: Premi, Sanjeev Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] [PATCH] Fix build failure in examples/standalone Dear Premi, Sanjeev, In message b85a65d85d7eb246be421b3fb0fbb59301de31f...@dbde02.ent.ti.com you wrote: 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: ... 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 ...) Indeed. I do not doubt that your modification fixes the issue. [sp] I was only illustrating the problem. 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? [sp] Sure I will do so today. Best regards, Sanjeev 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: w...@denx.de A conservative is a man who believes that nothing should be done for the first time. - Alfred E. Wiggam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Fix build failure in examples/standalone
Dear Mike Frysinger, In message 200911061122.16814.vap...@gentoo.org you wrote: 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. 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 -- 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: w...@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 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Fix build failure in examples/standalone
Dear Premi, Sanjeev, In message b85a65d85d7eb246be421b3fb0fbb59301de31f...@dbde02.ent.ti.com you wrote: 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: ... 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 ...) Indeed. I do not doubt that your modification fixes the issue. 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: w...@denx.de A conservative is a man who believes that nothing should be done for the first time. - Alfred E. Wiggam ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] 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=0x80e8 -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=0x80e8 -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 0x80e8 -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 pr...@ti.com --- examples/standalone/Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile index 5e2f2bc..61f3be1 100644 --- a/examples/standalone/Makefile +++ b/examples/standalone/Makefile @@ -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)) -- 1.6.2.2 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Fix build failure in examples/standalone
On 06/11/09 09:16, Sanjeev Premi wrote: 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=0x80e8 -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=0x80e8 -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 0x80e8 -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 pr...@ti.com --- examples/standalone/Makefile |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile index 5e2f2bc..61f3be1 100644 --- a/examples/standalone/Makefile +++ b/examples/standalone/Makefile @@ -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. ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot