
-----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