From: Andrew Morton http://bugzilla.kernel.org/show_bug.cgi?id=7261 berates us for putting a temporary file into the kernel source tree. Use mktemp instead. Cc: Andi Kleen Cc: Jan Beulich Cc: Sam Ravnborg Cc: Signed-off-by: Andrew Morton --- scripts/Kbuild.include | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff -puN scripts/Kbuild.include~kbuild-dont-put-temp-files-in-the-source-tree scripts/Kbuild.include --- a/scripts/Kbuild.include~kbuild-dont-put-temp-files-in-the-source-tree +++ a/scripts/Kbuild.include @@ -66,9 +66,10 @@ as-option = $(shell if $(CC) $(CFLAGS) $ # as-instr # Usage: cflags-y += $(call as-instr, instr, option1, option2) -as-instr = $(shell if echo -e "$(1)" | $(AS) >/dev/null 2>&1 -W -Z -o astest$$$$.out ; \ +ASTMP = $(shell mktemp ${TMPDIR:-/tmp}/asXXXXXX) +as-instr = $(shell if echo -e "$(1)" | $(AS) >/dev/null 2>&1 -W -Z -o $ASTMP ; \ then echo "$(2)"; else echo "$(3)"; fi; \ - rm -f astest$$$$.out) + rm -f $ASTMP) # cc-option # Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586) _