From: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
To: "masahiroy@kernel.org" <masahiroy@kernel.org>
Cc: "nicolas@fjasle.eu" <nicolas@fjasle.eu>,
"conor@kernel.org" <conor@kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kbuild@vger.kernel.org" <linux-kbuild@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"robh@kernel.org" <robh@kernel.org>,
"krzk@kernel.org" <krzk@kernel.org>
Subject: Re: [PATCH v2 4/4] kbuild: use $(src) instead of $(srctree)/$(src) for source directory
Date: Tue, 2 Jul 2024 16:15:38 +0000 [thread overview]
Message-ID: <c485326b640ae6f79582155c31ecaf4a1230b1ee.camel@intel.com> (raw)
In-Reply-To: <CAK7LNAQ47bZpE6c6Yoz-jQS78uU611oZwU8bH+7e=p5zSyADJw@mail.gmail.com>
On Tue, 2024-07-02 at 18:15 +0900, Masahiro Yamada wrote:
> > So there is no official way to build just a module to the output directory?
>
>
> You already know how to do it:
>
> #I'm guess it has something to do with the "M=" option because:
> #make ARCH=x86_64 O=../linux-tdx-kvm-out/ -j36 arch/x86/kvm/kvm.ko
> #arch/x86/kvm/kvm-intel.ko
> #
> #...works.
This can build just the module, but not clean just the module.
>
>
>
>
> > And
> > it just accidentally worked all these years? IMO it's a nice feature to
> > have.
> > I've especially found it useful when doing virtualization development where
> > you
> > need to build/test guest and host kernels as the same time.
> >
> > Or was it just now delegated to unofficial support after this patch?
>
>
> No.
> The M= option is intended for building external modules.
> You just abused it to build the upstream modules.
>
> Kbuild has never supported building external modules in a separate
> output directory.
>
>
> "delegated to unofficial support" is a wrong statement,
> as it has never officially supported in the past.
>
>
> Your way is a workaround that people found happened to work.
The main point is that the old behavior was useful. It seems the change that
broke my workflow was intended to make it easier to maintain out-of-tree
modules? If so then aren't we taking away useful behavior for in-tree module
development to help out-of-tree modules?
Can you at least support VPATH method going forward? Although I am surprised I'm
the only one that hit this. I assumed this was a common usage.
next prev parent reply other threads:[~2024-07-02 16:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240427145502.2804311-1-masahiroy@kernel.org>
[not found] ` <20240427145502.2804311-5-masahiroy@kernel.org>
2024-05-09 8:59 ` [PATCH v2 4/4] kbuild: use $(src) instead of $(srctree)/$(src) for source directory Krzysztof Kozlowski
2024-05-09 19:36 ` Masahiro Yamada
2024-06-27 17:13 ` Edgecombe, Rick P
2024-06-28 2:13 ` Masahiro Yamada
2024-06-28 21:23 ` Edgecombe, Rick P
2024-06-28 22:54 ` Edgecombe, Rick P
2024-07-02 9:15 ` Masahiro Yamada
2024-07-02 16:15 ` Edgecombe, Rick P [this message]
2024-07-02 17:46 ` Masahiro Yamada
2024-07-02 9:12 ` Masahiro Yamada
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=c485326b640ae6f79582155c31ecaf4a1230b1ee.camel@intel.com \
--to=rick.p.edgecombe@intel.com \
--cc=conor@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=nicolas@fjasle.eu \
--cc=robh@kernel.org \
/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 NNTP newsgroup(s).