public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] bfin: Disable -fstack-usage
@ 2012-09-11 19:08 Marek Vasut
  2012-09-11 19:08 ` [U-Boot] [PATCH 2/2] bfin: Fix warning in bfin_mac Marek Vasut
  2012-09-12  4:27 ` [U-Boot] [PATCH 1/2] bfin: Disable -fstack-usage Mike Frysinger
  0 siblings, 2 replies; 9+ messages in thread
From: Marek Vasut @ 2012-09-11 19:08 UTC (permalink / raw)
  To: u-boot

The GCC does not support this on blackfin, disable it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 config.mk |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/config.mk b/config.mk
index c3822a2..d39355f 100644
--- a/config.mk
+++ b/config.mk
@@ -245,8 +245,10 @@ CFLAGS_WARN := $(call cc-option,-Wno-format-nonliteral) \
 CFLAGS += $(CFLAGS_WARN)
 
 # Report stack usage if supported
+ifneq ($(ARCH),blackfin)
 CFLAGS_STACK := $(call cc-option,-fstack-usage)
 CFLAGS += $(CFLAGS_STACK)
+endif
 
 # $(CPPFLAGS) sets -g, which causes gcc to pass a suitable -g<format>
 # option to the assembler.
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 2/2] bfin: Fix warning in bfin_mac
  2012-09-11 19:08 [U-Boot] [PATCH 1/2] bfin: Disable -fstack-usage Marek Vasut
@ 2012-09-11 19:08 ` Marek Vasut
  2012-09-12  4:27   ` Mike Frysinger
  2012-09-12  9:51   ` Marek Vasut
  2012-09-12  4:27 ` [U-Boot] [PATCH 1/2] bfin: Disable -fstack-usage Mike Frysinger
  1 sibling, 2 replies; 9+ messages in thread
From: Marek Vasut @ 2012-09-11 19:08 UTC (permalink / raw)
  To: u-boot

The buf variable in bfin_mac.c is not used and produces warning,
fix it.

bfin_mac.c: In function 'bfin_EMAC_send':
bfin_mac.c:125:16: warning: variable 'buf' set but not used [-Wunused-but-set-variable]

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
---
 drivers/net/bfin_mac.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
index c63398e..0ffd59d 100644
--- a/drivers/net/bfin_mac.c
+++ b/drivers/net/bfin_mac.c
@@ -122,8 +122,6 @@ static int bfin_EMAC_send(struct eth_device *dev, void *packet, int length)
 {
 	int i;
 	int result = 0;
-	unsigned int *buf;
-	buf = (unsigned int *)packet;
 
 	if (length <= 0) {
 		printf("Ethernet: bad packet size: %d\n", length);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 1/2] bfin: Disable -fstack-usage
  2012-09-11 19:08 [U-Boot] [PATCH 1/2] bfin: Disable -fstack-usage Marek Vasut
  2012-09-11 19:08 ` [U-Boot] [PATCH 2/2] bfin: Fix warning in bfin_mac Marek Vasut
@ 2012-09-12  4:27 ` Mike Frysinger
  2012-09-12  7:59   ` Marek Vasut
  1 sibling, 1 reply; 9+ messages in thread
From: Mike Frysinger @ 2012-09-12  4:27 UTC (permalink / raw)
  To: u-boot

On Tue, Sep 11, 2012 at 3:08 PM, Marek Vasut wrote:
> The GCC does not support this on blackfin, disable it.

err, no, you're probably using gcc-4.5.x which didn't support
-fstack-usage.  that is not specific to Blackfin as gcc didn't add it
until 4.6.x.

why doesn't the cc-option check work ?
-mike

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 2/2] bfin: Fix warning in bfin_mac
  2012-09-11 19:08 ` [U-Boot] [PATCH 2/2] bfin: Fix warning in bfin_mac Marek Vasut
@ 2012-09-12  4:27   ` Mike Frysinger
  2012-09-12  9:51   ` Marek Vasut
  1 sibling, 0 replies; 9+ messages in thread
From: Mike Frysinger @ 2012-09-12  4:27 UTC (permalink / raw)
  To: u-boot

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 1/2] bfin: Disable -fstack-usage
  2012-09-12  4:27 ` [U-Boot] [PATCH 1/2] bfin: Disable -fstack-usage Mike Frysinger
@ 2012-09-12  7:59   ` Marek Vasut
  2012-09-12 17:10     ` Tom Rini
  0 siblings, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2012-09-12  7:59 UTC (permalink / raw)
  To: u-boot

Dear Mike Frysinger,

> On Tue, Sep 11, 2012 at 3:08 PM, Marek Vasut wrote:
> > The GCC does not support this on blackfin, disable it.
> 
> err, no, you're probably using gcc-4.5.x which didn't support
> -fstack-usage.  that is not specific to Blackfin as gcc didn't add it
> until 4.6.x.

I actually used gentoo here, so it's really possible there is some crap going 
on.

$ bfin-unknown-elf-gcc --version
bfin-unknown-elf-gcc (crosstool-NG hg+default-ff167977b163) 4.6.3
Copyright (C) 2011 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.

> why doesn't the cc-option check work ?

I dunno man, probably because it's supported but broken, see (there's lot more 
to this, I cut it down):

$ ARCH=blackfin CROSS_COMPILE=bfin-unknown-elf- ./MAKEALL -a blackfin
Configuring for bct-brettl2 board...
   text    data     bss     dec     hex filename
 168228    4070   61768  234066   39252 ./u-boot
lib/asm-offsets.c: In function 'main':
lib/asm-offsets.c:32:1: warning: -fstack-usage not supported for this target 
[enabled by default]
initcode.c: In function 'initcode':
initcode.c:691:1: warning: -fstack-usage not supported for this target [enabled 
by default]
bootrom-asm-offsets.c: In function 'main':
bootrom-asm-offsets.c:62:1: warning: -fstack-usage not supported for this target 
[enabled by default]
cpu.c: In function 'cpu_init_f':
cpu.c:76:1: warning: -fstack-usage not supported for this target [enabled by 
default]
part.c: In function 'get_dev':
part.c:103:1: warning: -fstack-usage not supported for this target [enabled by 
default]
gpio.c: In function 'port_setup':
gpio.c:220:1: warning: -fstack-usage not supported for this target [enabled by 
default]
In file included from /home/marex/U-Boot/u-boot-
marex/include/asm/blackfin.h:13:0,
                 from /home/marex/U-Boot/u-boot-marex/include/common.h:109,
                 from interrupts.c:21:
/home/marex/U-Boot/u-boot-marex/include/asm/blackfin_local.h: In function 
'CSYNC':
/home/marex/U-Boot/u-boot-marex/include/asm/blackfin_local.h:200:1: warning: -
fstack-usage not supported for this target [enabled by default]
jtag-console.c: In function 'jtag_getc':
jtag-console.c:177:1: warning: -fstack-usage not supported for this target 
[enabled by default]
os_log.c: In function 'bfin_os_log_check':
os_log.c:21:1: warning: -fstack-usage not supported for this target [enabled by 
default]

> -mike

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 2/2] bfin: Fix warning in bfin_mac
  2012-09-11 19:08 ` [U-Boot] [PATCH 2/2] bfin: Fix warning in bfin_mac Marek Vasut
  2012-09-12  4:27   ` Mike Frysinger
@ 2012-09-12  9:51   ` Marek Vasut
  2012-09-12 14:32     ` Joe Hershberger
  1 sibling, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2012-09-12  9:51 UTC (permalink / raw)
  To: u-boot

Dear Marek Vasut,

> The buf variable in bfin_mac.c is not used and produces warning,
> fix it.
> 
> bfin_mac.c: In function 'bfin_EMAC_send':
> bfin_mac.c:125:16: warning: variable 'buf' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Mike Frysinger <vapier@gentoo.org>

Guess I should have Cced Joe too ... 

> ---
>  drivers/net/bfin_mac.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c
> index c63398e..0ffd59d 100644
> --- a/drivers/net/bfin_mac.c
> +++ b/drivers/net/bfin_mac.c
> @@ -122,8 +122,6 @@ static int bfin_EMAC_send(struct eth_device *dev, void
> *packet, int length) {
>  	int i;
>  	int result = 0;
> -	unsigned int *buf;
> -	buf = (unsigned int *)packet;
> 
>  	if (length <= 0) {
>  		printf("Ethernet: bad packet size: %d\n", length);

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 2/2] bfin: Fix warning in bfin_mac
  2012-09-12  9:51   ` Marek Vasut
@ 2012-09-12 14:32     ` Joe Hershberger
  2012-09-12 16:18       ` Mike Frysinger
  0 siblings, 1 reply; 9+ messages in thread
From: Joe Hershberger @ 2012-09-12 14:32 UTC (permalink / raw)
  To: u-boot

On Wed, Sep 12, 2012 at 4:51 AM, Marek Vasut <marex@denx.de> wrote:
> Dear Marek Vasut,
>
>> The buf variable in bfin_mac.c is not used and produces warning,
>> fix it.
>>
>> bfin_mac.c: In function 'bfin_EMAC_send':
>> bfin_mac.c:125:16: warning: variable 'buf' set but not used
>> [-Wunused-but-set-variable]
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Mike Frysinger <vapier@gentoo.org>
>
> Guess I should have Cced Joe too ...
>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 2/2] bfin: Fix warning in bfin_mac
  2012-09-12 14:32     ` Joe Hershberger
@ 2012-09-12 16:18       ` Mike Frysinger
  0 siblings, 0 replies; 9+ messages in thread
From: Mike Frysinger @ 2012-09-12 16:18 UTC (permalink / raw)
  To: u-boot

On Wed, Sep 12, 2012 at 10:32 AM, Joe Hershberger wrote:
> On Wed, Sep 12, 2012 at 4:51 AM, Marek Vasut wrote:
>> Dear Marek Vasut,
>>> The buf variable in bfin_mac.c is not used and produces warning,
>>> fix it.
>>>
>>> bfin_mac.c: In function 'bfin_EMAC_send':
>>> bfin_mac.c:125:16: warning: variable 'buf' set but not used
>>> [-Wunused-but-set-variable]
>>>
>>> Signed-off-by: Marek Vasut <marex@denx.de>
>>> Cc: Mike Frysinger <vapier@gentoo.org>
>>
>> Guess I should have Cced Joe too ...
>
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>

i can pick this up, or you can.  it'll be another week before i'm back
home & working on u-boot though.
-mike

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [U-Boot] [PATCH 1/2] bfin: Disable -fstack-usage
  2012-09-12  7:59   ` Marek Vasut
@ 2012-09-12 17:10     ` Tom Rini
  0 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2012-09-12 17:10 UTC (permalink / raw)
  To: u-boot

On Wed, Sep 12, 2012 at 09:59:30AM +0200, Marek Vasut wrote:
> Dear Mike Frysinger,
> 
> > On Tue, Sep 11, 2012 at 3:08 PM, Marek Vasut wrote:
> > > The GCC does not support this on blackfin, disable it.
> > 
> > err, no, you're probably using gcc-4.5.x which didn't support
> > -fstack-usage.  that is not specific to Blackfin as gcc didn't add it
> > until 4.6.x.
> 
> I actually used gentoo here, so it's really possible there is some crap going 
> on.
> 
> $ bfin-unknown-elf-gcc --version
> bfin-unknown-elf-gcc (crosstool-NG hg+default-ff167977b163) 4.6.3
> Copyright (C) 2011 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.
> 
> > why doesn't the cc-option check work ?
> 
> I dunno man, probably because it's supported but broken, see (there's lot more 
> to this, I cut it down):

I believe it's a gcc "feature" not a bug.  -fstack-usage emits a warning
on targets where it's not supported and cc-option doesn't catch that.
How about if you make cc-option call -Werror ?

-- 
Tom

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-09-12 17:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-11 19:08 [U-Boot] [PATCH 1/2] bfin: Disable -fstack-usage Marek Vasut
2012-09-11 19:08 ` [U-Boot] [PATCH 2/2] bfin: Fix warning in bfin_mac Marek Vasut
2012-09-12  4:27   ` Mike Frysinger
2012-09-12  9:51   ` Marek Vasut
2012-09-12 14:32     ` Joe Hershberger
2012-09-12 16:18       ` Mike Frysinger
2012-09-12  4:27 ` [U-Boot] [PATCH 1/2] bfin: Disable -fstack-usage Mike Frysinger
2012-09-12  7:59   ` Marek Vasut
2012-09-12 17:10     ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox