Linux-KBuild Archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Valerii Chernous <vchernou@cisco.com>,
	Masahiro Yamada <masahiroy@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Nicolas Schier <nicolas@fjasle.eu>
Cc: xe-linux-external@cisco.com, linux-kbuild@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Add MO(mod objs) variable to process ext modules with subdirs
Date: Tue, 2 Apr 2024 19:10:05 -0700	[thread overview]
Message-ID: <b102d460-adbe-4396-ac1b-ad2f2244061c@infradead.org> (raw)
In-Reply-To: <20240402153028.1378868-1-vchernou@cisco.com>

Hi,

On 4/2/24 8:30 AM, Valerii Chernous wrote:
> The change allow to build external modules with nested makefiles.
> With current unofficial way(using "src" variable) it is posible to build

                                                          possible

> external(out of tree) kernel module with separating source and build
> artifacts dirs but with nested makefiles it doesn't work properly.
> Build system trap to recursion inside makefiles, articafts output dir

                                                   artifacts

> path grow with each iteration until exceed max path len and build failed
> Providing "MO" variable and using "override" directive with declaring
> "src" variable solve the problem
> Usage example:
> make -C KERNEL_SOURCE_TREE MO=BUILD_OUT_DIR M=EXT_MOD_SRC_DIR modules
> 
> Cc: xe-linux-external@cisco.com
> Cc: Valerii Chernous <vchernou@cisco.com>
> Signed-off-by: Valerii Chernous <vchernou@cisco.com>
> ---
>  Makefile               | 17 +++++++++++++++++
>  scripts/Makefile.build |  7 +++++++
>  2 files changed, 24 insertions(+)
> 

If this code is going to be merged, there should also be a Documentation
update to Documentation/kbuild/{kbuild.rst,modules.rst}.

Thanks.
-- 
#Randy

      reply	other threads:[~2024-04-03  2:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02 15:30 [PATCH] Add MO(mod objs) variable to process ext modules with subdirs Valerii Chernous
2024-04-03  2:10 ` Randy Dunlap [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b102d460-adbe-4396-ac1b-ad2f2244061c@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=nicolas@fjasle.eu \
    --cc=vchernou@cisco.com \
    --cc=xe-linux-external@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).