
On Wed, Dec 11, 2013 at 08:11:34PM +0900, Masahiro Yamada wrote:
If -fstack-usage option is given to crosstools that do not support it, gcc displays a warning message but still exits with status 0.
This means we can not rely on $(call cc-option,...) to detect if -fstack-usage option is supported or not.
Signed-off-by: Masahiro Yamada yamada.m@jp.panasonic.com
Some crosstools currently do not support -fstack-usage option. For example, bfin-uclinux-gcc, which is available at https://www.kernel.org/pub/tools/crosstool/
If -fstack-usage option is given to such crosstools, 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, $(call cc-option,-fstack-usage) does not work as we expect because cc-option checks exit status to judge whether the given option is supported or not.
Changes in v5:
- Rebased on Kbuild series
Changes in v4:
- Drop executable permission of scripts/gcc-stack-usage.sh
- Fix commit log
- Add the rationale below ---
We still want this, and it's still applicable right?