[PATCH] kbuild: fix modules.builtin(.modinfo) targets in the top-level Makefile

From: Yuntao Wang

Date: Wed Jul 29 2026 - 03:33:41 EST


Commit 7a342e6c7735 ("kbuild: move modules.builtin(.modinfo) rules to
Makefile.vmlinux_o") moved the modules.builtin(.modinfo) rules from
link-vmlinux.sh to Makefile.vmlinux_o, and added the corresponding
targets to the top-level Makefile.

Commit 39cfd5b12160 ("kbuild: extract modules.builtin.modinfo from
vmlinux.unstripped") later moved these rules from Makefile.vmlinux_o to
Makefile.vmlinux, but left the corresponding targets in the top-level
Makefile unchanged.

These modules.builtin(.modinfo) targets in the top-level Makefile should
be moved alongside the vmlinux target, since they are now generated by
Makefile.vmlinux.

However, simply removing these trivial targets might be a better choice,
as it makes the Makefile cleaner and avoids the need to keep them in sync
across multiple files, reducing the chance of future mistakes.

Fixes: 39cfd5b12160 ("kbuild: extract modules.builtin.modinfo from vmlinux.unstripped")
Signed-off-by: Yuntao Wang <yuntao.wang@xxxxxxxxx>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 2f5bf24e3389..5f3f460fd10f 100644
--- a/Makefile
+++ b/Makefile
@@ -1352,7 +1352,7 @@ PHONY += vmlinux_o
vmlinux_o: vmlinux.a $(KBUILD_VMLINUX_LIBS)
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.vmlinux_o

-vmlinux.o modules.builtin.modinfo modules.builtin: vmlinux_o
+vmlinux.o: vmlinux_o
@:

PHONY += vmlinux
--
2.55.0