]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
kbuild: Do not generate .*.su files at the top directory
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Tue, 4 Feb 2014 08:24:44 +0000 (17:24 +0900)
committerTom Rini <trini@ti.com>
Wed, 19 Feb 2014 16:10:04 +0000 (11:10 -0500)
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>
scripts/Kbuild.include

index 6113c13d161b676cb1b367035bcf3c0d3d4b0428..650457191a237a50e95271bff67a69ef12295ebb 100644 (file)
@@ -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,)