summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ed7c6a0..d187e6b 100644
--- a/Makefile
+++ b/Makefile
@@ -547,7 +547,9 @@ KBUILD_CFLAGS += -g
KBUILD_AFLAGS += -g
# Report stack usage if supported
-KBUILD_CFLAGS += $(call cc-option,-fstack-usage)
+ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-stack-usage.sh $(CC)),y)
+ KBUILD_CFLAGS += -fstack-usage
+endif
KBUILD_CFLAGS += $(call cc-option,-Wno-format-nonliteral)