This is a note to let you know that I've just added the patch titled kbuild: fix 'make modules' error when CONFIG_DEBUG_INFO_BTF_MODULES=y to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: kbuild-fix-make-modules-error-when-config_debug_info.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit f9cd5fd158e64b1dacc778be813a7ee85938f622 Author: Masahiro Yamada <masahiroy@xxxxxxxxxx> Date: Tue Jan 10 14:48:00 2023 +0900 kbuild: fix 'make modules' error when CONFIG_DEBUG_INFO_BTF_MODULES=y [ Upstream commit 74d3320f6f7cf72de88a7e8df573821f6db90239 ] When CONFIG_DEBUG_INFO_BTF_MODULES=y, running 'make modules' in the clean kernel tree will get the following error. $ grep CONFIG_DEBUG_INFO_BTF_MODULES .config CONFIG_DEBUG_INFO_BTF_MODULES=y $ make -s clean $ make modules [snip] AR vmlinux.a ar: ./built-in.a: No such file or directory make: *** [Makefile:1241: vmlinux.a] Error 1 'modules' depends on 'vmlinux', but builtin objects are not built. Define KBUILD_BUILTIN. Fixes: f73edc8951b2 ("kbuild: unify two modpost invocations") Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/Makefile b/Makefile index 770e509d4da4..0904b82905d9 100644 --- a/Makefile +++ b/Makefile @@ -1529,6 +1529,7 @@ endif # *.ko are usually independent of vmlinux, but CONFIG_DEBUG_INFOBTF_MODULES # is an exception. ifdef CONFIG_DEBUG_INFO_BTF_MODULES +KBUILD_BUILTIN := 1 modules: vmlinux endif