From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EAB42C433FF for ; Mon, 12 Aug 2019 17:34:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CA1A62067D for ; Mon, 12 Aug 2019 17:34:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727249AbfHLReo (ORCPT ); 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-Google-Smtp-Source: APXvYqzcrQcBsk0/Yrys6c8GgXQrSpsNz4FqdTvJYCSbqFE1AU6tZPX+nx2Ca0ELNiwlAPTAwEcFEPS8L5YbFKICUH4= 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-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@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