Commit 9a368d0f5818bb671c4567ca0e2dbabbf9c6724d

Authored by Masahiro Yamada
Committed by Tom Rini
1 parent b831bb36bb

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>

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

scripts/Kbuild.include
... ... @@ -85,14 +85,16 @@
85 85 # Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
86 86 # Exit code chooses option. "$$TMP" is can be used as temporary file and
87 87 # is automatically cleaned up.
  88 +# modifed for U-Boot: prevent cc-option from leaving .*.su files
88 89 try-run = $(shell set -e; \
89 90 TMP="$(TMPOUT).$$$$.tmp"; \
90 91 TMPO="$(TMPOUT).$$$$.o"; \
  92 + TMPSU="$(TMPOUT).$$$$.su"; \
91 93 if ($(1)) >/dev/null 2>&1; \
92 94 then echo "$(2)"; \
93 95 else echo "$(3)"; \
94 96 fi; \
95   - rm -f "$$TMP" "$$TMPO")
  97 + rm -f "$$TMP" "$$TMPO" "$$TMPSU")
96 98  
97 99 # as-option
98 100 # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)