[U-Boot] [PATCH] config.mk: enable -fstack-usage only when it is desired

Tom Rini trini at ti.com
Thu Sep 26 13:52:46 CEST 2013


-----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 at jp.panasonic.com>
> Cc: Tom Rini <trini at 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-----


More information about the U-Boot mailing list