qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Juan Quintela <quintela@redhat.com>
Subject: [Qemu-devel] [PATCH] fix tool/libuser makefile race
Date: Fri, 18 Dec 2009 11:40:32 +0100	[thread overview]
Message-ID: <1261132832-7688-1-git-send-email-pbonzini@redhat.com> (raw)

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

             reply	other threads:[~2009-12-18 10:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-18 10:40 Paolo Bonzini [this message]
2009-12-18 16:16 ` [Qemu-devel] Re: [PATCH] fix tool/libuser makefile race 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1261132832-7688-1-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).