From: Masahiro Yamada <masahiroy@kernel.org>
To: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
Cc: "krzk@kernel.org" <krzk@kernel.org>,
"nicolas@fjasle.eu" <nicolas@fjasle.eu>,
"conor@kernel.org" <conor@kernel.org>,
"robh@kernel.org" <robh@kernel.org>,
"linux-kbuild@vger.kernel.org" <linux-kbuild@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH v2 4/4] kbuild: use $(src) instead of $(srctree)/$(src) for source directory
Date: Fri, 28 Jun 2024 11:13:18 +0900 [thread overview]
Message-ID: <CAK7LNATGGibmjZzYX_A2SkJthmOPbKw2K3R7JYuHTWzgGL2Zjg@mail.gmail.com> (raw)
In-Reply-To: <9771d50d95e508bf8971a36b6475c782c42b46a1.camel@intel.com>
On Fri, Jun 28, 2024 at 2:14 AM Edgecombe, Rick P
<rick.p.edgecombe@intel.com> wrote:
>
> On Fri, 2024-05-10 at 04:36 +0900, Masahiro Yamada wrote:
> >
> > Or, fix the code.
> >
> >
> > Now fixed. Thanks for the report.
> >
>
> Hi,
>
> This commit broke my build in a similar way:
> make ARCH=x86_64 O=../linux-tdx-kvm-out/ -j36 M=arch/x86/kvm/
> make[1]: Entering directory '/home/rpedgeco/repos/linux-tdx-kvm-out'
> /home/rpedgeco/repos/linux/scripts/Makefile.build:41: arch/x86/kvm/Makefile: No
> such file or directory
> make[3]: *** No rule to make target 'arch/x86/kvm/Makefile'. Stop.
> make[2]: *** [/home/rpedgeco/repos/linux/Makefile:1934: arch/x86/kvm] Error 2
> make[1]: *** [/home/rpedgeco/repos/linux/Makefile:240: __sub-make] Error 2
> make[1]: Leaving directory '/home/rpedgeco/repos/linux-tdx-kvm-out'
> make: *** [Makefile:240: __sub-make] Error 2
>
> This patch didn’t fix it:
> https://lore.kernel.org/lkml/20240624-kbuild-fix-xconfig-v1-1-7c06eae6d3aa@avm.de/
>
> But reverting b1992c3772e6 ("kbuild: use $(src) instead of $(srctree)/$(src) for
> source directory") does.
>
> 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.
There are two solutions, depending on what you want to achieve.
The official way is to pass the absolute path to M=
(or relative path to ../linux-tdm-kvm-out)
The other unofficial way is to pass VPATH.
The external module build does not officially support
the separate output directory, but you can still
do it in this case.
[1] will work like before.
[1] Output module objects to linux-tdm-kvm-out/arch/x86/kvm/ (unofficial)
$ make ARCH=x86_64 O=../linux-tdx-kvm-out/ -j36 M=arch/x86/kvm VPATH=$(pwd)
[2] Output the module objects into arch/x86/kvm/ of the source tree (official)
$ make ARCH=x86_64 O=../linux-tdx-kvm-out/ -j36 M=$(realpath arch/x86/kvm)
--
Best Regards
Masahiro Yamada
next prev parent reply other threads:[~2024-06-28 2:13 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 [this message]
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
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=CAK7LNATGGibmjZzYX_A2SkJthmOPbKw2K3R7JYuHTWzgGL2Zjg@mail.gmail.com \
--to=masahiroy@kernel.org \
--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=nicolas@fjasle.eu \
--cc=rick.p.edgecombe@intel.com \
--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).