+ kbuild-dont-put-temp-files-in-the-source-tree-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     kbuild-dont-put-temp-files-in-the-source-tree fix
has been added to the -mm tree.  Its filename is
     kbuild-dont-put-temp-files-in-the-source-tree-fix.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: kbuild-dont-put-temp-files-in-the-source-tree fix
From: Horst Schirmeier <horst@xxxxxxxxxxxxxx>

The kbuild-dont-put-temp-files-in-the-source-tree.patch (-mm patches) is
implemented faultily and fails in its intention to put temporary files
in $TMPDIR (or /tmp by default).

This is the code as it results from the patch:

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 $ASTMP)

1) $ needs to be escaped in the shell function call, otherwise make
   tries to substitute with a (in this case not existing) make variable
   with this name.

2) Makefile variable names need to be put in parentheses; $ASTMP is
   being interpreted as $(A)STMP, resulting in as-instr writing to a file
   named after whatever is in $(A), followed by "STMP".

3) ld-option also writes to a temporary file and needs the same
   treatment.

Please consider using the corrected patch below instead. Alternatively,
we could also simply use -o /dev/null, as we are not interested in the
output anyways. Daniel Drake already suggested this in a LKML post
(message-id 452F9602.1050906@xxxxxxxxxx).

Cc: Andi Kleen <ak@xxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxxxx>
Cc: Sam Ravnborg <sam@xxxxxxxxxxxx>
Cc: <jpdenheijer@xxxxxxxxx>
Signed-off-by: Horst Schirmeier <horst@xxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 scripts/Kbuild.include |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff -puN scripts/Kbuild.include~kbuild-dont-put-temp-files-in-the-source-tree-fix scripts/Kbuild.include
--- a/scripts/Kbuild.include~kbuild-dont-put-temp-files-in-the-source-tree-fix
+++ a/scripts/Kbuild.include
@@ -66,10 +66,10 @@ as-option = $(shell if $(CC) $(CFLAGS) $
 # as-instr
 # Usage: cflags-y += $(call as-instr, instr, option1, option2)
 
-ASTMP = $(shell mktemp ${TMPDIR:-/tmp}/asXXXXXX)
-as-instr = $(shell if echo -e "$(1)" | $(AS) >/dev/null 2>&1 -W -Z -o $ASTMP ; \
+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 $ASTMP)
+	           rm -f $(ASTMP))
 
 # cc-option
 # Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586)
@@ -98,10 +98,11 @@ cc-ifversion = $(shell if [ $(call cc-ve
 
 # ld-option
 # Usage: ldflags += $(call ld-option, -Wl$(comma)--hash-style=both)
+LDTMP = $(shell mktemp $${TMPDIR:-/tmp}/ldXXXXXX)
 ld-option = $(shell if $(CC) $(1) \
-			     -nostdlib -o ldtest$$$$.out -xc /dev/null \
+			     -nostdlib -o $(LDTMP) -xc /dev/null \
              > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi; \
-	     rm -f ldtest$$$$.out)
+	     rm -f $(LDTMP))
 
 ###
 # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=
_

Patches currently in -mm which might be from horst@xxxxxxxxxxxxxx are

kbuild-dont-put-temp-files-in-the-source-tree-fix.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux