summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-09-28 08:39:40 +0200
committerMasahiro Yamada <masahiroy@kernel.org>2022-10-02 20:52:58 +0200
commit7a342e6c7735e13b294374cb0a0f6283d8667496 (patch)
tree784cf59af95127834224b9977a226160e6ea08f3 /Makefile
parentzstd: Fixing mixed module-builtin objects (diff)
downloadlinux-7a342e6c7735e13b294374cb0a0f6283d8667496.tar.xz
linux-7a342e6c7735e13b294374cb0a0f6283d8667496.zip
kbuild: move modules.builtin(.modinfo) rules to Makefile.vmlinux_o
Do not build modules.builtin(.modinfo) as a side-effect of vmlinux. There are no good reason to rebuild them just because any of vmlinux's prerequistes (vmlinux.lds, .vmlinux.export.c, etc.) has been updated. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e4186c171049..2fcbd753cb27 100644
--- a/Makefile
+++ b/Makefile
@@ -1153,9 +1153,13 @@ targets += vmlinux.a
vmlinux.a: $(KBUILD_VMLINUX_OBJS) scripts/head-object-list.txt autoksyms_recursive FORCE
$(call if_changed,ar_vmlinux.a)
-vmlinux.o: vmlinux.a $(KBUILD_VMLINUX_LIBS) FORCE
+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
+ @:
+
ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink)
# Final link of vmlinux with optional arch pass after final link