qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] fix tool/libuser makefile race
@ 2009-12-18 10:40 Paolo Bonzini
  2009-12-18 16:16 ` [Qemu-devel] " Juan Quintela
  0 siblings, 1 reply; 10+ messages in thread
From: Paolo Bonzini @ 2009-12-18 10:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: Juan Quintela

I just had this race happen on me while building qemu.  The problematic
file in my case was cutils.o.  I'm using GNU make's order-only
dependencies to avoid that "make recurse-all" builds the tools as well.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 Makefile |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index d555bb2..373a861 100644
--- a/Makefile
+++ b/Makefile
@@ -79,7 +79,10 @@ romsubdir-%:
 
 ALL_SUBDIRS=$(TARGET_DIRS) $(patsubst %,pc-bios/%, $(ROMS))
 
-recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES)
+# Some files are shared between the tools and the emulators.  So there
+# can be a race when the main makefile starts building xyz.o, while
+# the recursive make sees a partially built xyz.o and ar(1) fails.
+recurse-all: $(SUBDIR_RULES) $(ROMSUBDIR_RULES) | $(TOOLS)
 
 #######################################################################
 # QObject
-- 
1.6.5.2

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-01-08 16:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-18 10:40 [Qemu-devel] [PATCH] fix tool/libuser makefile race Paolo Bonzini
2009-12-18 16:16 ` [Qemu-devel] " Juan Quintela
2009-12-18 16:22   ` Paolo Bonzini
2009-12-18 18:59   ` Andreas Färber
2009-12-20 18:22     ` Paolo Bonzini
2009-12-20 18:30       ` Andreas Färber
2009-12-20 18:38         ` Paolo Bonzini
2009-12-20 18:57           ` Andreas Färber
2009-12-21  9:06   ` [Qemu-devel] [PATCH] Use vpath directive Paolo Bonzini
2010-01-08 16:34     ` Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).