lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 28 Jun 2024 11:13:18 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
Cc: "krzk@...nel.org" <krzk@...nel.org>, "nicolas@...sle.eu" <nicolas@...sle.eu>, 
	"conor@...nel.org" <conor@...nel.org>, "robh@...nel.org" <robh@...nel.org>, 
	"linux-kbuild@...r.kernel.org" <linux-kbuild@...r.kernel.org>, 
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, 
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH v2 4/4] kbuild: use $(src) instead of $(srctree)/$(src)
 for source directory

On Fri, Jun 28, 2024 at 2:14 AM Edgecombe, Rick P
<rick.p.edgecombe@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ