- actually-delete-the-as-instr-ld-option-tmp-file.patch removed from -mm tree

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

 



The patch titled
     kbuild: actually delete the as-instr/ld-option tmp file
has been removed from the -mm tree.  Its filename was
     actually-delete-the-as-instr-ld-option-tmp-file.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
Subject: kbuild: actually delete the as-instr/ld-option tmp file
From: Horst Schirmeier <horst@xxxxxxxxxxxxxx>

I noticed another problem in the
kbuild-dont-put-temp-files-in-the-source-tree.patch: A "normal" make
variable is being expanded recursively on each use, therefore multiple uses
of $(ASTMP) yield different temporary files.  So $(AS) -o $(ASTMP) writes
to a file other than the one rm -f $(ASTMP) deletes, leaving behind the
first file in /tmp.

Using "simply expanded variables" (by assigning the mktemp output with
:= instead of ==) can be problematic, as parallel make processes would
all write to and delete the very same tmp file, so I chose to fix this
by storing the $(ASTMP) output in a shell variable and reusing it.

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~actually-delete-the-as-instr-ld-option-tmp-file scripts/Kbuild.include
--- a/scripts/Kbuild.include~actually-delete-the-as-instr-ld-option-tmp-file
+++ a/scripts/Kbuild.include
@@ -67,9 +67,10 @@ as-option = $(shell if $(CC) $(CFLAGS) $
 # 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) ; \
+as-instr = $(shell ASTMP=$(ASTMP); \
+		   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)
@@ -99,10 +100,10 @@ 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 $(LDTMP) -xc /dev/null \
+ld-option = $(shell LDTMP=$(LDTMP); \
+	     if $(CC) $(1) -nostdlib -o $$LDTMP -xc /dev/null \
              > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi; \
-	     rm -f $(LDTMP))
+	     rm -f $$LDTMP)
 
 ###
 # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=
_

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

actually-delete-the-as-instr-ld-option-tmp-file.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