gcc: build with -fstack-usage
will generate an extra file that specifies the maximum amount of stack used, on a per-function basis. Using a static stack checker the data can be analysed, for example: http://dlbeer.co.nz/oss/avstack.html Change-Id: I23bd8ce7c4516bd0c7ffb74504e6d379677f25f8 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
d2669b7a00
commit
20439b488e
1 changed files with 4 additions and 0 deletions
4
Makefile
4
Makefile
|
@ -670,6 +670,10 @@ KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign)
|
|||
# disable invalid "can't wrap" optimizations for signed / pointers
|
||||
KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)
|
||||
|
||||
# generate an extra file that specifies the maximum amount of stack used,
|
||||
# on a per-function basis.
|
||||
KBUILD_CFLAGS += $(call cc-option,-fstack-usage)
|
||||
|
||||
# conserve stack if available
|
||||
KBUILD_CFLAGS += $(call cc-option,-fconserve-stack)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue