public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] config.mk: disable -fstack-usage for blackfin and m68k
Date: Tue, 15 Oct 2013 10:45:06 +0200	[thread overview]
Message-ID: <20131015104506.7a13444f@lilith> (raw)
In-Reply-To: <1381825457-25971-1-git-send-email-yamada.m@jp.panasonic.com>

Hi Masahiro,

On Tue, 15 Oct 2013 17:24:17 +0900, Masahiro Yamada
<yamada.m@jp.panasonic.com> wrote:

> Currently gcc does not seem to support -fstack-usage option
> for some targets, such as blackfin and m68k.
> 
> If -fstack-usage option is given for those targets,
> gcc displays a warning message as follows:
> 
>     warning: -fstack-usage not supported for this target [enabled by default]
> 
> But it still exits with status 0.
> 
> So,
> 
>     # Report stack usage if supported
>     CFLAGS_STACK := $(call cc-option,-fstack-usage)
>     CFLAGS += $(CFLAGS_STACK)
> 
> does not work as we expect because cc-option sees exit status
> to judge whether the given option is supported or not.
> 
> Adding -Werror option to cc-option function does not work either,
> because gcc always succeeds in compiling /dev/null input
> with -fstack-usage option.
> We cannot rely on cc-option.
> 
> To suppress warnings for such targets that -fstack-usage is not supported,
> this commit surrounds the concerned lines with
> ifdef CONFIG_CC_STACKUSAGE .. endif.
> And it adds CONFIG_CC_STACKUSAGE=y to arch/${ARCH}/config.mk
> except blackfin and m68k.

Please keep the commit message to a (short) description of the patch,
and move the rationale to a comment below the '---' line.

Also: what is the benefit of creating an elaborate mechanism to hide
a warning message that says the option is useless, IOW, wouldn't it be
simpler to only specify -fstack-usage to the arches that support it?

Amicalement,
-- 
Albert.

  reply	other threads:[~2013-10-15  8:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-15  8:24 [U-Boot] [PATCH v2] config.mk: disable -fstack-usage for blackfin and m68k Masahiro Yamada
2013-10-15  8:45 ` Albert ARIBAUD [this message]
2013-10-15 10:31   ` Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131015104506.7a13444f@lilith \
    --to=albert.u.boot@aribaud.net \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox