Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4056735ybl; Mon, 12 Aug 2019 10:35:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqwu6C/mGWNe+luFGUz6uDflXhFGCp7+23ufMN4rv1ZWNl54KrgcZ4xfvYGSkZ8/rF0u0778 X-Received: by 2002:a17:902:b090:: with SMTP id p16mr12793826plr.93.1565631351097; Mon, 12 Aug 2019 10:35:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565631351; cv=none; d=google.com; s=arc-20160816; b=SOUeQkSbSmLHlKt6K0V6bgG8SxZmBtpSllBs3YdoNpdcWD5fINKhEHBqEO1wZlusty TdSqaF4TiSOarkS7aJ6beBLKtqsk0uMjdwRGYKWwKou9O3H/jampjAHpFyZlJljje8KE Ah93ZJvFqE5qanJZL6Ft/aZ1H403ADK0zcNnBPIpHel+BwkDFtAYLk56a91ehbNnTOXr dBXfkkmSrRBHqWRQBle/GoiZ4+WtoRmUVFOi700VLhzUijllKWwZo4bsg00kb/X7n0kH C0BuRAQq1TeWtG93tyGn5AT7kj2giPQQqUCEgBFxij7nX6o0rT/aXPfn5dFxv35pizx/ 95+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=XCsKdiFdCyUb9h1XpQVRtFcaXFlzTncnJBLcRKOgyMM=; b=KqiVDFPcKoVihRxzPf8bzksAvNABlw67IJ8SMtS8KqmflK9Q5/8u8FLN27xArLa8Ot e3a0iBgoHMn36eChkcbmVFr6AOQNicGDlzCnvgqQBy76Y6XbkjAPKzJOUDxXPEoKFu1v 3M9uDs5+5PXFooiwAzCuG3iHUfor2iiPVBl2CvpIRTKrtO3Ce/NGCPJfPJ/tTrThiQMb I4q9L8mTikU6rmxwe0gg3TD64nza2wptUGI2lRlNlmlGMkmD2/L4UXhC7qMb2OGBcGj6 RhOwa8jRAEAfVv2u30mszRtATY5rxhLbnf5FUDcn3xnxZ1K/BddPpg7vZDUHop6++XQ7 Rzlw== 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 i8si61652738pgs.87.2019.08.12.10.35.34; Mon, 12 Aug 2019 10:35:51 -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 S1727301AbfHLReo (ORCPT + 99 others); Mon, 12 Aug 2019 13:34:44 -0400 Received: from mail-vk1-f194.google.com ([209.85.221.194]:41928 "EHLO mail-vk1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726267AbfHLReo (ORCPT ); Mon, 12 Aug 2019 13:34:44 -0400 Received: by mail-vk1-f194.google.com with SMTP id u64so20870530vku.8; Mon, 12 Aug 2019 10:34:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XCsKdiFdCyUb9h1XpQVRtFcaXFlzTncnJBLcRKOgyMM=; b=AnxMh+t8b0773ZzHDr31aS5lKDV9T9SzVCmQT/Sw3iVpt8oCqyN202akVsNfKec/4B dep1gbQs/pKoJxl532mIRPpFyXSYpmNB+Lot3bcgzemFI4D5rIhrxkSNvCqyurS5nV79 ANj/uRGKGnw2Wv/3MDh82P52VMctHhOvyvjERGzOWPfrqwqHB4eEoHiYIhhm+waYyoIR omYnxcomRI3zXRyWB+vMFC4c9HKDF9sqSAtf46SV/nnyQC+ep262OZzJQsX+YcrOtyR6 70wUaMV3/vKtHf7K8X860ADjdACgnZoWdMgxzxyTfpllnlMq0oL5fL1SQTllwijfxt0k d9IA== X-Gm-Message-State: APjAAAVctJ51NxmI66r0mPP54LQ/en4JATnnaP+/KNYKBOF9FMOK0uwv Moc5ohwGFZZ2fds4ElPcR54LFKuf2MkW6XUFIzs7KGxxXVMbUA== X-Received: by 2002:a1f:d687:: with SMTP id n129mr12600410vkg.71.1565631281261; Mon, 12 Aug 2019 10:34:41 -0700 (PDT) MIME-Version: 1.0 References: <20190809002104.18599-1-stancheff@cray.com> <20190809002104.18599-2-stancheff@cray.com> In-Reply-To: From: Shaun Tancheff Date: Mon, 12 Aug 2019 12:34:30 -0500 Message-ID: Subject: Re: [PATCH 1/1] kbuild: recursive build of external kernel modules To: Masahiro Yamada Cc: Shaun Tancheff , Linux Kbuild mailing list , Joe Lawrence , "James E . J . Bottomley" , Jonathan Corbet , "Martin K . Petersen" , Michal Marek , Shuah Khan , Thomas Renninger , "open list:DOCUMENTATION" , Linux Kernel Mailing List , Linux PM mailing list , linux-scsi Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 12, 2019 at 10:24 AM Masahiro Yamada wrote: > > On Fri, Aug 9, 2019 at 9:21 AM Shaun Tancheff wrote: > > > > When building a tree of external modules stage 2 fails > > silently as the root modules.order is empty. > > > > Modify the modules.order location to be fixed to the > > root when KBUILD_EXTMOD is specified and write all > > module paths to the single modules.order file. > > Could you try v5.3-rc4 please? So it seems we are using 'subdir-m' but that is now gone? Is there a recommend pattern for backward compatibility? Thanks! > > > Signed-off-by: Shaun Tancheff > > --- > > Makefile | 1 + > > scripts/Makefile.build | 8 +++++++- > > 2 files changed, 8 insertions(+), 1 deletion(-) > > > > diff --git a/Makefile b/Makefile > > index 23cdf1f41364..a9964492f47e 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -1622,6 +1622,7 @@ $(module-dirs): prepare $(objtree)/Module.symvers > > > > modules: $(module-dirs) > > @$(kecho) ' Building modules, stage 2.'; > > + $(Q)$rm -f $(KBUILD_EXTMOD)/modules.order > > $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost > > > > PHONY += modules_install > > diff --git a/scripts/Makefile.build b/scripts/Makefile.build > > index 0d434d0afc0b..f9908b3d59e0 100644 > > --- a/scripts/Makefile.build > > +++ b/scripts/Makefile.build > > @@ -64,7 +64,13 @@ builtin-target := $(obj)/built-in.a > > endif > > > > ifeq ($(CONFIG_MODULES)$(need-modorder),y1) > > +ifneq ($(KBUILD_EXTMOD),) > > +modorder-target := $(KBUILD_EXTMOD)/modules.order > > +modorder-add := >> > > +else > > modorder-target := $(obj)/modules.order > > +modorder-add := > > > +endif > > endif > > > > mod-targets := $(patsubst %.o, %.mod, $(obj-m)) > > @@ -423,7 +429,7 @@ endif # builtin-target > > $(modorder-target): $(subdir-ym) FORCE > > $(Q){ $(foreach m, $(modorder), \ > > $(if $(filter %/modules.order, $m), cat $m, echo $m);) :; } \ > > - | $(AWK) '!x[$$0]++' - > $@ > > + | $(AWK) '!x[$$0]++' - $(modorder-add) $@ > > > > # > > # Rule to compile a set of .o files into one .a file (with symbol table) > > -- > > 2.20.1 > > > > > -- > Best Regards > Masahiro Yamada