Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp732721imm; Thu, 13 Sep 2018 07:00:10 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYVgfAvshGLznNcF/YsfCzJ8RDiF8EG4aSoIshXIgyNCy89BHWODpcbqE8g7dMDVNfDWsWY X-Received: by 2002:a63:5c10:: with SMTP id q16-v6mr7310574pgb.452.1536847210370; Thu, 13 Sep 2018 07:00:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847210; cv=none; d=google.com; s=arc-20160816; b=KJVStLdpHBkZJN9Po6vz5qz/6VFHj3k6n/qmkBC+6EBh5rd0hJaimkQWi1zmX6YUj6 WQ7395VnmlTiA+UK4dX/6ZXgLdMar1QfzaScITJ3rtc2LvBqy/Eo1xn6BLp0eC6ELtHy pDAwwfVj9iSJBpxCVEX5FT1OzOYXsCR9uJqI48rQfkU2jZMfW696i7IifdG71BLDFhNF /t/eYhadVdpjE/ce49ngxlBdMRoTM195NKZGBoJ1qI9O+eLtdpAI89UGtyu2BXSR3NVP CDo1f6of2jPTuCS7KDPnG1SmW7YCUryhwd21YruUNwWV5LvRowMbG61eeqtM1h/aF3ES Qfog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=a6pGjNgkCQTKhhyIEKlR/ltteOPQASf7fBVcgsf5D/M=; b=Kfg7L463AobfPht2jJkH0J8SQzD8BeQKxFNC4U8lhfuBgnUFScnrWNNlC6Nze1A3tG eT5ir6SRREnxSfyGiOB1OYcu3cW3+eSkIvjH3xIp3fukWjqpO6SP9jn3i2It4hc+thdn 1W/7mhMMZDJxCD0PBvnQWMGhiqIQRlfu4q5htp26k9QvK6NBaA/+33gW9yzIHBeQuNsQ Mb9SNkkMxb6kW5JJg+sPXQiS2pRuqFUT3gDKCEtyXJ0WB4B54pOEZ6ofjEaMLvFIbcbs FK8pF7zJpKI5fnA7F+CXx9LNuoM51UnSXyu9gUvWoxCv4q7tlZDpPJjYlG6i1Ke0F97o zsGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2-v6si4167331pgs.108.2018.09.13.06.59.55; Thu, 13 Sep 2018 07:00:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731729AbeIMTJX (ORCPT + 99 others); Thu, 13 Sep 2018 15:09:23 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34866 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728339AbeIMTJW (ORCPT ); Thu, 13 Sep 2018 15:09:22 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3310FD15; Thu, 13 Sep 2018 13:59:45 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Randy Dunlap , Masahiro Yamada , Richard Weinberger , Sasha Levin Subject: [PATCH 4.18 126/197] um: fix parallel building with O= option Date: Thu, 13 Sep 2018 15:31:15 +0200 Message-Id: <20180913131846.588125958@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Masahiro Yamada [ Upstream commit 13d3d01e26b942ada7cfced68ccb6db49597874a ] 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. Reported-by: Randy Dunlap Signed-off-by: Masahiro Yamada Tested-by: Randy Dunlap Acked-by: Richard Weinberger Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/um/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- 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