Patchwork [U-Boot] tools: build some commands without -pedantic

login
register
mail settings
Submitter Linus Walleij
Date July 12, 2011, 11:24 a.m.
Message ID <1310469889-12999-1-git-send-email-linus.walleij@linaro.org>
Download mbox | patch
Permalink /patch/104350/
State Rejected
Headers show

Comments

Linus Walleij - July 12, 2011, 11:24 a.m.
On this GCC in Fedora (4.6.0 20110530) the tools gen_eth_addr
and img2srec become size zero if compiled with -pedantic (no
warnings are emitted however). Marking them _NOPED solves the
issue for me.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 tools/Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
Wolfgang Denk - July 12, 2011, 11:58 a.m.
Dear Linus Walleij,

In message <1310469889-12999-1-git-send-email-linus.walleij@linaro.org> you wrote:
> On this GCC in Fedora (4.6.0 20110530) the tools gen_eth_addr
> and img2srec become size zero if compiled with -pedantic (no
> warnings are emitted however). Marking them _NOPED solves the
> issue for me.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  tools/Makefile |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)

NAK.  I hate papering over obvious problems.  Please let's analyze
what's going wrong, and fix the cause instead.

This is all the more so, as I'm running Fedora 15 here on our machines
[with gcc version 4.6.0 20110530 (Red Hat 4.6.0-9) (GCC)], and I don;t
see any such problems.

Best regards,

Wolfgang Denk

Patch

diff --git a/tools/Makefile b/tools/Makefile
index 97f83f8..cc7bc69 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -83,8 +83,8 @@  OBJ_FILES-$(CONFIG_VIDEO_LOGO) += bmp_logo.o
 NOPED_OBJ_FILES-y += default_image.o
 OBJ_FILES-$(CONFIG_BUILD_ENVCRC) += envcrc.o
 NOPED_OBJ_FILES-y += fit_image.o
-OBJ_FILES-$(CONFIG_CMD_NET) += gen_eth_addr.o
-OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o
+NOPED_OBJ_FILES-$(CONFIG_CMD_NET) += gen_eth_addr.o
+NOPED_OBJ_FILES-$(CONFIG_CMD_LOADS) += img2srec.o
 OBJ_FILES-$(CONFIG_INCA_IP) += inca-swap-bytes.o
 NOPED_OBJ_FILES-y += kwbimage.o
 NOPED_OBJ_FILES-y += imximage.o
@@ -168,7 +168,7 @@  $(obj)envcrc$(SFX):	$(obj)crc32.o $(obj)env_embedded.o $(obj)envcrc.o $(obj)sha1
 	$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
 
 $(obj)gen_eth_addr$(SFX):	$(obj)gen_eth_addr.o
-	$(HOSTCC) $(HOSTCFLAGS) $(HOSTLDFLAGS) -o $@ $^
+	$(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTLDFLAGS) -o $@ $^
 	$(HOSTSTRIP) $@
 
 $(obj)img2srec$(SFX):	$(obj)img2srec.o