From patchwork Fri Dec 18 10:40:32 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 41380 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A873BB6F0D for ; Fri, 18 Dec 2009 21:41:56 +1100 (EST) Received: from localhost ([127.0.0.1]:57813 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLaHR-000212-90 for incoming@patchwork.ozlabs.org; Fri, 18 Dec 2009 05:41:53 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLaGK-0001z5-T8 for qemu-devel@nongnu.org; Fri, 18 Dec 2009 05:40:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLaGG-0001xe-W6 for qemu-devel@nongnu.org; Fri, 18 Dec 2009 05:40:44 -0500 Received: from [199.232.76.173] (port=39294 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLaGG-0001xU-Ad for qemu-devel@nongnu.org; Fri, 18 Dec 2009 05:40:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:11022) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLaGF-000280-TY for qemu-devel@nongnu.org; Fri, 18 Dec 2009 05:40:40 -0500 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nBIAebDd014374 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 18 Dec 2009 05:40:38 -0500 Received: from localhost.localdomain (vpn1-6-222.ams2.redhat.com [10.36.6.222]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nBIAeWws026829; Fri, 18 Dec 2009 05:40:34 -0500 From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Fri, 18 Dec 2009 11:40:32 +0100 Message-Id: <1261132832-7688-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Juan Quintela Subject: [Qemu-devel] [PATCH] fix tool/libuser makefile race X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Signed-off-by: Paolo Bonzini --- 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