From 7b0cd13ee0c3b6744b1e05375524e0d6eb5b262d Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 10 Jan 2023 14:48:00 +0900 Subject: [PATCH] kbuild: fix 'make modules' error when CONFIG_DEBUG_INFO_BTF_MODULES=y [ Upstream commit c6f73753303e6a667e5c7fd757454be2db9cf324 ] 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: a97c17e7d53b ("kbuild: unify two modpost invocations") Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 770e509d4da4a..0904b82905d94 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 -- 2.39.5