[coreboot-gerrit] Patch set updated for coreboot: fc9c030 make: avoid problems with mv aliases

Vadim Bendebury (vbendeb@chromium.org) gerrit at coreboot.org
Mon Apr 27 17:55:12 CEST 2015


Vadim Bendebury (vbendeb at chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9994

-gerrit

commit fc9c030711a362a5d1d68b5eece834faf30b4dae
Author: Vadim Bendebury <vbendeb at chromium.org>
Date:   Sat Apr 25 11:34:35 2015 -0700

    make: avoid problems with mv aliases
    
    Make fails to update .xcompile in case there is an mv alias preventing
    silent overwrites of existing files. To avoid ambiguity, invoke mv
    from standard location.
    
    While we are at it, drop the code creating a unique .xcompile instance
    before copying it into destination: this was done for the case of
    running multiple independent make processes in parallel, but there is
    a problem with this approach with multiple processes copying their
    unique copies into the same destination file.
    
    The tool running multiple make invocations in parallel should
    explicitly invoke xcompile first.
    
    Change-Id: Iedc5e288fbcc5dfc18ce39de5c067bb869a13275
    Signed-off-by: Vadim Bendebury <vbendeb at chromium.org>
---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 14e1598..2ff4ebe 100644
--- a/Makefile
+++ b/Makefile
@@ -35,7 +35,8 @@
 $(if $(wildcard .xcompile),,$(eval $(shell util/xcompile/xcompile $(XGCCPATH) > .xcompile)))
 
 .xcompile: util/xcompile/xcompile
-	A=`mktemp $@.XXXXXX`; $< $(XGCCPATH) > $$A && mv $$A $@ 2> /dev/null
+	$< $(XGCCPATH) > $@.tmp
+	\mv -f $@.tmp $@ 2> /dev/null
 
 include .xcompile
 



More information about the coreboot-gerrit mailing list