mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-30 19:11:37 +00:00
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>
This commit is contained in:
parent
b831bb36bb
commit
9a368d0f58
1 changed files with 3 additions and 1 deletions
|
@ -85,14 +85,16 @@ TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
|
||||||
# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
|
# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
|
||||||
# Exit code chooses option. "$$TMP" is can be used as temporary file and
|
# Exit code chooses option. "$$TMP" is can be used as temporary file and
|
||||||
# is automatically cleaned up.
|
# is automatically cleaned up.
|
||||||
|
# modifed for U-Boot: prevent cc-option from leaving .*.su files
|
||||||
try-run = $(shell set -e; \
|
try-run = $(shell set -e; \
|
||||||
TMP="$(TMPOUT).$$$$.tmp"; \
|
TMP="$(TMPOUT).$$$$.tmp"; \
|
||||||
TMPO="$(TMPOUT).$$$$.o"; \
|
TMPO="$(TMPOUT).$$$$.o"; \
|
||||||
|
TMPSU="$(TMPOUT).$$$$.su"; \
|
||||||
if ($(1)) >/dev/null 2>&1; \
|
if ($(1)) >/dev/null 2>&1; \
|
||||||
then echo "$(2)"; \
|
then echo "$(2)"; \
|
||||||
else echo "$(3)"; \
|
else echo "$(3)"; \
|
||||||
fi; \
|
fi; \
|
||||||
rm -f "$$TMP" "$$TMPO")
|
rm -f "$$TMP" "$$TMPO" "$$TMPSU")
|
||||||
|
|
||||||
# as-option
|
# as-option
|
||||||
# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
|
# Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
|
||||||
|
|
Loading…
Add table
Reference in a new issue