From patchwork Wed Oct 18 18:40:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Aaron Lindsay X-Patchwork-Id: 10015205 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0E5F3602C8 for ; Wed, 18 Oct 2017 18:42:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F072429140 for ; Wed, 18 Oct 2017 18:42:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E4CDC29183; Wed, 18 Oct 2017 18:42:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5AF0729140 for ; Wed, 18 Oct 2017 18:42:01 +0000 (UTC) Received: from localhost ([::1]:45974 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4tI0-0000kP-KM for patchwork-qemu-devel@patchwork.kernel.org; Wed, 18 Oct 2017 14:42:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4tHN-0000k9-HZ for qemu-devel@nongnu.org; Wed, 18 Oct 2017 14:41:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4tHK-0000Ky-5A for qemu-devel@nongnu.org; Wed, 18 Oct 2017 14:41:21 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:54638) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e4tHJ-0000Jc-T6 for qemu-devel@nongnu.org; Wed, 18 Oct 2017 14:41:18 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B26306032D; Wed, 18 Oct 2017 18:41:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1508352075; bh=qt+7a8bINLfUF0nDx5iaQ4RzCqu47hH6jtpvA27aYN4=; h=From:To:Cc:Subject:Date:From; b=i0y8oPWu86A7VyJyKhNPLv8dYAdlk121MPDetZjaDBXzh1friuR2gjs2hKQoLM6iZ hvNYMfRghjYGQ76+i6R3wYQ8CTzO0Xl2flC/8bAD+fgIZbpeU1JA6PHPZ9KfOBgitq UeYy0JRnCVyv1iDzOFFBp8ABIxqEdzcdi3qDR98I= Received: from mossypile.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: alindsay@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 64627600CE; Wed, 18 Oct 2017 18:41:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1508352075; bh=qt+7a8bINLfUF0nDx5iaQ4RzCqu47hH6jtpvA27aYN4=; h=From:To:Cc:Subject:Date:From; b=i0y8oPWu86A7VyJyKhNPLv8dYAdlk121MPDetZjaDBXzh1friuR2gjs2hKQoLM6iZ hvNYMfRghjYGQ76+i6R3wYQ8CTzO0Xl2flC/8bAD+fgIZbpeU1JA6PHPZ9KfOBgitq UeYy0JRnCVyv1iDzOFFBp8ABIxqEdzcdi3qDR98I= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 64627600CE Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=alindsay@codeaurora.org From: Aaron Lindsay To: qemu-devel@nongnu.org Date: Wed, 18 Oct 2017 14:40:23 -0400 Message-Id: <1508352023-28591-1-git-send-email-alindsay@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 198.145.29.96 Subject: [Qemu-devel] [PATCH] build: Fix dtc-checkout race condition in Makefile X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Gerd Hoffmann , Paolo Bonzini , Fam Zheng Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This was introduced by: commit aef45d51d1204f3335fb99de6658e0c5612c2b67 Author: Daniel P. Berrange Date: Fri Sep 29 11:11:56 2017 +0100 build: automatically handle GIT submodule checkout for dtc On my system, I see the following with a fresh clone: % ./configure --disable-gtk --target-list=aarch64-softmmu % make -j8 GEN aarch64-softmmu/config-devices.mak.tmp GEN config-host.h mkdir -p dtc/libfdt GIT ui/keycodemapdb dtc mkdir -p dtc/tests GEN qemu-options.def [snip] GEN migration/trace.h make: *** [git-submodule-update] Error 1 make: *** Waiting for unfinished jobs.... Upon closer inspection, the root cause of the error is: % git submodule update --init ui/keycodemapdb dtc fatal: destination path 'dtc' already exists and is not an empty directory. Clone of 'git://git.qemu-project.org/dtc.git' into submodule path 'dtc' failed This patch fixes this race condition by forcing the 'dtc/%' rule which caused 'dtc' to be non-empty to wait on '.git-submodule-status'. Signed-off-by: Aaron Lindsay Acked-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrange --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 90f91e5..ffa82e8 100644 --- a/Makefile +++ b/Makefile @@ -380,7 +380,7 @@ DTC_CPPFLAGS=-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt subdir-dtc: .git-submodule-status dtc/libfdt dtc/tests $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CPPFLAGS)" CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,) -dtc/%: +dtc/%: .git-submodule-status mkdir -p $@ $(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \