From patchwork Sat Aug 4 04:47:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 953408 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cXRj5ldZ"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="kOfjxaRa"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41jBHS03KBz9sXd for ; Sat, 4 Aug 2018 14:48:03 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=XRSjPLoAHMIVPyciGJ9OoNGjMeMVGwI6jiZyOQsIgwU=; b=cXRj5ldZEXze2AWGqjN8UIfI5M oR9DdnQ27ti4XAHs4FiFB6kJe4c2PH961bz3gQcRvbSxUG2N/OxGhMypYna5D6mA0vTEwPti6y1b8 7PCJ073L6UN4jX95PqeFsV5cHRcRjpw2yEu590mteq0iE1X3YoG7D+fqInxLMiDraAw9iUdqtCqE7 GgNStMdHVnEP/nhZaIAGz+pCBMZRtaZQUpbQfk+AJXY8xDijtuYNsBrDk+LrVVUJDSnLk1xHU1MDy tsWxEE8iuoApVi5NceLk7/RJwGdc+ttr25M+xfph7C4TGtBE1N7fGPsDmu1Auwn8tPjxNE37Jhi7C wagfxjJA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1floTq-0001zO-FK; Sat, 04 Aug 2018 04:47:54 +0000 Received: from conuserg-11.nifty.com ([210.131.2.78]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1floTn-0001xZ-5P for linux-um@lists.infradead.org; Sat, 04 Aug 2018 04:47:52 +0000 Received: from grover.tkatk1.zaq.ne.jp (zaqdadce369.zaq.ne.jp [218.220.227.105]) (authenticated) by conuserg-11.nifty.com with ESMTP id w744lBUe027764; Sat, 4 Aug 2018 13:47:12 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com w744lBUe027764 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1533358033; bh=ulZoy0aw7RRCqQOsqMWNRLnJF7c1Iv70/QIKaR5unz4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kOfjxaRajVFuIBjRzC9WPMBXFaRNIX7okCWnL23bBpWSUgfRi4vmWLRdS6hy+0Cyl jD9r5lobuOP3BiF68nTVPWy0n5k6877jQ4CM9cFCpLvvLtpCZ2EFyI648+X0Q/K0mv nClWpM7+LU8UF7t43egQ8g4xQVTMyicPz0aVbCeiuqBffIhZD/yVcIqZRv+mNcKKCU hwQBBbpFIqhZlIPYGAnjBPxk6htSvzE8HNFZDIi4j4xhqYW8YzB3N/EYiE83Y+QuLK l9rt+g40aBEltIS5S90N5PLm8jFZF4puCWwbGaZETKiH9Ws+zr1jgbqk4DqR1w4WG2 Hx0qmXPDWVx/g== X-Nifty-SrcIP: [218.220.227.105] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Subject: [PATCH 1/3] um: fix parallel building with O= option Date: Sat, 4 Aug 2018 13:47:01 +0900 Message-Id: <1533358023-5801-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533358023-5801-1-git-send-email-yamada.masahiro@socionext.com> References: <1533358023-5801-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180803_214751_575878_FB8422E8 X-CRM114-Status: UNSURE ( 8.93 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.0 (+) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (1.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [210.131.2.78 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michal Marek , Richard Weinberger , Jeff Dike , Randy Dunlap , linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Masahiro Yamada , Geert Uytterhoeven , Sam Ravnborg MIME-Version: 1.0 Sender: "linux-um" Errors-To: linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Randy Dunlap reports UML occasionally fails to build with -j and O= options. make[1]: Entering directory '/home/rdunlap/mmotm-2018-0802-1529/UM64' UPD include/generated/uapi/linux/version.h WRAP arch/x86/include/generated/asm/dma-contiguous.h WRAP arch/x86/include/generated/asm/export.h WRAP arch/x86/include/generated/asm/early_ioremap.h WRAP arch/x86/include/generated/asm/mcs_spinlock.h WRAP arch/x86/include/generated/asm/mm-arch-hooks.h WRAP arch/x86/include/generated/uapi/asm/bpf_perf_event.h WRAP arch/x86/include/generated/uapi/asm/poll.h GEN ./Makefile make[2]: *** No rule to make target 'archheaders'. Stop. arch/um/Makefile:119: recipe for target 'archheaders' failed make[1]: *** [archheaders] Error 2 make[1]: *** Waiting for unfinished jobs.... UPD include/config/kernel.release make[1]: *** wait: No child processes. Stop. Makefile:146: recipe for target 'sub-make' failed make: *** [sub-make] Error 2 The cause of the problem is the use of '$(MAKE) KBUILD_SRC=', which recurses to the top Makefile via the $(objtree)/Makefile generated by scripts/mkmakefile. When you run "make -j O= ARCH=um", Make can execute 'archheaders' and 'outputmakefile' targets simultaneously because there is no dependency between them. If it happens, $(Q)$(MAKE) KBUILD_SRC= ARCH=$(HEADER_ARCH) archheaders ... tries to run $(objtree)/Makefile that is being updated. The correct way for the recursion is $(Q)$(MAKE) -f $(srctree)/Makefile ARCH=$(HEADER_ARCH) archheaders ..., which does not rely on the generated Makefile. Signed-off-by: Masahiro Yamada Reported-by: Randy Dunlap --- arch/um/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/um/Makefile b/arch/um/Makefile index e54dda8..de340e4 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -122,8 +122,7 @@ archheaders: $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \ kbuild-file=$(HOST_DIR)/include/uapi/asm/Kbuild \ obj=$(HOST_DIR)/include/generated/uapi/asm - $(Q)$(MAKE) KBUILD_SRC= ARCH=$(HEADER_ARCH) archheaders - + $(Q)$(MAKE) -f $(srctree)/Makefile ARCH=$(HEADER_ARCH) archheaders archprepare: include/generated/user_constants.h