From mboxrd@z Thu Jan 1 00:00:00 1970 From: Masahiro Yamada Date: Wed, 29 Jan 2014 21:26:34 +0900 Subject: [U-Boot] [PATCH v8 37/38] kbuild: Do not generate .*.su files at the top directory In-Reply-To: <1390998395-18567-1-git-send-email-yamada.m@jp.panasonic.com> References: <1390998395-18567-1-git-send-email-yamada.m@jp.panasonic.com> Message-ID: <1390998395-18567-38-git-send-email-yamada.m@jp.panasonic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- Changes in v8: None Changes in v7: None Changes in v6: None Changes in v5: None 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