[U-Boot] [PATCH v4 37/37] kbuild: Do not generate .*.su files at the top directory

Masahiro Yamada yamada.m at jp.panasonic.com
Fri Jan 10 07:44:34 CET 2014


Without this workaround, you will see a lot of ".*.su" files
at the top directory after building with a compiler
which supports "-fstack-usage" option.

Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
---

Changes in v4:
  - Newly added

Changes in v3: None
Changes in v2: None

 scripts/Kbuild.include | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 6113c13..6504571 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -85,14 +85,16 @@ TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
 # Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
 # Exit code chooses option. "$$TMP" is can be used as temporary file and
 # is automatically cleaned up.
+# modifed for U-Boot: prevent cc-option from leaving .*.su files
 try-run = $(shell set -e;		\
 	TMP="$(TMPOUT).$$$$.tmp";	\
 	TMPO="$(TMPOUT).$$$$.o";	\
+	TMPSU="$(TMPOUT).$$$$.su";	\
 	if ($(1)) >/dev/null 2>&1;	\
 	then echo "$(2)";		\
 	else echo "$(3)";		\
 	fi;				\
-	rm -f "$$TMP" "$$TMPO")
+	rm -f "$$TMP" "$$TMPO" "$$TMPSU")
 
 # as-option
 # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
-- 
1.8.3.2



More information about the U-Boot mailing list