summaryrefslogtreecommitdiff
path: root/scripts/Kbuild.include
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-02-04 17:24:44 +0900
committerTom Rini <trini@ti.com>2014-02-19 11:10:04 -0500
commit9a368d0f5818bb671c4567ca0e2dbabbf9c6724d (patch)
treed6ca7b91d1a88ce29999972798370312934cb9c5 /scripts/Kbuild.include
parentb831bb36bbf138a209608f192270fb1c5239cb10 (diff)
downloadu-boot-imx-9a368d0f5818bb671c4567ca0e2dbabbf9c6724d.zip
u-boot-imx-9a368d0f5818bb671c4567ca0e2dbabbf9c6724d.tar.gz
u-boot-imx-9a368d0f5818bb671c4567ca0e2dbabbf9c6724d.tar.bz2
kbuild: Do not generate .*.su files at the top directory
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@jp.panasonic.com>
Diffstat (limited to 'scripts/Kbuild.include')
-rw-r--r--scripts/Kbuild.include4
1 files changed, 3 insertions, 1 deletions
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,)