public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] config.mk: enable -fstack-usage only when it is desired
Date: Thu, 26 Sep 2013 07:52:46 -0400	[thread overview]
Message-ID: <5244200E.8040109@ti.com> (raw)
In-Reply-To: <1380161866-12232-1-git-send-email-yamada.m@jp.panasonic.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/25/2013 10:17 PM, Masahiro Yamada wrote:
> As far as I know, gcc does not support -fstack-usage
> for some targets such as blackfin, m68k, microblaze, etc.
> 
> 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.
> 
> To suppress warnings for such targets that -fstack-usage is not supported,
> this commit surrounds the concerned lines with
> ifdef CONFIG_CC_STACKUSAGE .. endif.
> 
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> Cc: Tom Rini <trini@ti.com>

The problem here is that except for whatever arches don't support
- -fstack-usage, we always want to generate this information, to assist in
debugging stack usage problems (which can be a real problem within SPL
for example).  How about ifneq($(CONFIG_M68K)$(CONFIG_...),y) ... endif
around it?

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJSRCAOAAoJENk4IS6UOR1WQ3AP/2kWJVnQqpMXUvX5XJ/jXzsW
tNx0Rj+JZcXgH8Nl4EAPj/oBQEA6H5Qnic0pEE9G8HpkrgEsCfqn9wAsbvN/8pCw
ZaU7zkORh4ieAz1w+ZJeJgx8rksxWNbVqFzttwDrOtvOK2s1WMLi7zfypw7DPoc/
ZPuvZJRHbbEFMqf9Y6Mo2smnM9uo+z+JnsNBio2Fau5A8VoZIaAI8Z2rob352oQ7
1MM2J1ncrmxEOO178CEbLD0dAJWqNZFNfpSZpfb/V+vYMaAMmCgYALXuBbue+JDy
PfeRxPD8iXiv5G40dQce0mjoUVDujnuOAlralaQBv0okegnGgF6ghf+bWt+sxTuT
h9/nY3i0ToRplsk2GKNAMVDNzonKBgk9BAz78ZVc6qMaLi6g9d8XVfXhoLLbWLPC
XEEZOYlflt6pnsybQjhux0UOm6hyy1moqll6GukEVmUWtYrMjimPLy2uKmeTdPbU
vnHOCcRHUD8SPBAyA9voOlwDJteusVH6FAsNoXLSSjnLI+vrBLhXTlUH/kRXMuA3
JRSLLBcwRi/VDxe0gWjSGbmTnOiWVKkg9nLNBdqMnqJI8vTYZjwDxJ50RLUQJWSq
N+kB3yZ/+ElhPi7vjJc8hy+sHUNfoVN1z6TyfY1fRxJfXXccDyBUE8eqEOWxBGg7
YldF9zwHiqjs2m/WuiIY
=YRCk
-----END PGP SIGNATURE-----

  reply	other threads:[~2013-09-26 11:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-26  2:17 [U-Boot] [PATCH] config.mk: enable -fstack-usage only when it is desired Masahiro Yamada
2013-09-26 11:52 ` Tom Rini [this message]
2013-09-26 14:32   ` Michal Simek
2013-09-27  2:23     ` Masahiro Yamada
2013-09-27  8:13       ` Michal Simek
2013-09-27  2:09   ` Masahiro Yamada
2013-09-27 17:57     ` Jeroen Hofstee
2013-09-30  8:01       ` Masahiro Yamada
2013-10-08 19:46         ` Jeroen Hofstee
2013-10-15 10:51           ` 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=5244200E.8040109@ti.com \
    --to=trini@ti.com \
    --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