Patchwork [U-Boot,v4,3/6] config.mk: Check for -fstack-usage support

login
register
mail settings
Submitter Tom Rini
Date Feb. 20, 2012, 11:50 p.m.
Message ID <1329781810-15447-1-git-send-email-trini@ti.com>
Download mbox | patch
Permalink /patch/142213/
State Accepted
Commit 4a30f1e874a269696b983bd66673809c431edbc0
Delegated to: Tom Rini
Headers show

Comments

Tom Rini - Feb. 20, 2012, 11:50 p.m.
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Tom Rini <trini@ti.com>

---
Changes for v2:
   - Move check from arch/arm/config.mk to config.mk, reword summary

Changes for v3:
   - Drop trailing comma in cc-option call (per Mike Frysinger)

Changes for v4:
   - Add .su files to clean list

add .su to nuke list

Signed-off-by: Tom Rini <trini@ti.com>
---
 Makefile  |    2 +-
 config.mk |    4 ++++
 2 files changed, 5 insertions(+), 1 deletions(-)

Patch

diff --git a/Makefile b/Makefile
index 11aac21..8e66739 100644
--- a/Makefile
+++ b/Makefile
@@ -749,7 +749,7 @@  clean:
 	@rm -f $(obj)MLO
 	@rm -f $(TIMESTAMP_FILE) $(VERSION_FILE)
 	@find $(OBJTREE) -type f \
-		\( -name 'core' -o -name '*.bak' -o -name '*~' \
+		\( -name 'core' -o -name '*.bak' -o -name '*~' -o -name '*.su' \
 		-o -name '*.o'	-o -name '*.a' -o -name '*.exe'	\) -print \
 		| xargs rm -f
 
diff --git a/config.mk b/config.mk
index 596ba93..fa33e62 100644
--- a/config.mk
+++ b/config.mk
@@ -232,6 +232,10 @@  CFLAGS_WARN := $(call cc-option,-Wno-format-nonliteral) \
 	       $(call cc-option,-Wno-format-security)
 CFLAGS += $(CFLAGS_WARN)
 
+# Report stack usage if supported
+CFLAGS_STACK := $(call cc-option,-fstack-usage)
+CFLAGS += $(CFLAGS_STACK)
+
 # $(CPPFLAGS) sets -g, which causes gcc to pass a suitable -g<format>
 # option to the assembler.
 AFLAGS_DEBUG :=