aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada2022-09-28 15:39:40 +0900
committerMasahiro Yamada2022-10-03 03:52:58 +0900
commit7a342e6c7735e13b294374cb0a0f6283d8667496 (patch)
tree784cf59af95127834224b9977a226160e6ea08f3 /Makefile
parent637a642f5ca5e850186bb64ac75ebb0f124b458d (diff)
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