kbuild: remove ARCH_POSTLINK from module builds

The '%.ko' rule in arch/*/Makefile.postlink does nothing but call the
'true' command.

Remove the unneeded code.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <n.schier@avm.de>
This commit is contained in:
Masahiro Yamada 2023-10-19 00:19:47 +09:00
parent 9d361173ed
commit 7f6d8f7e43
5 changed files with 1 additions and 16 deletions

View File

@ -31,9 +31,6 @@ ifeq ($(CONFIG_RELOCATABLE),y)
$(call if_changed,relocs) $(call if_changed,relocs)
endif endif
%.ko: FORCE
@true
clean: clean:
@true @true

View File

@ -35,9 +35,6 @@ ifdef CONFIG_RELOCATABLE
$(call if_changed,relocs_check) $(call if_changed,relocs_check)
endif endif
%.ko: FORCE
@true
clean: clean:
rm -f .tmp_symbols.txt rm -f .tmp_symbols.txt

View File

@ -36,9 +36,6 @@ ifdef CONFIG_RELOCATABLE
$(call if_changed,relocs_strip) $(call if_changed,relocs_strip)
endif endif
%.ko: FORCE
@true
clean: clean:
@true @true

View File

@ -34,9 +34,6 @@ ifeq ($(CONFIG_X86_NEED_RELOCS),y)
$(call cmd,strip_relocs) $(call cmd,strip_relocs)
endif endif
%.ko: FORCE
@true
clean: clean:
@rm -f $(OUT_RELOCS)/vmlinux.relocs @rm -f $(OUT_RELOCS)/vmlinux.relocs

View File

@ -28,14 +28,11 @@ quiet_cmd_cc_o_c = CC [M] $@
%.mod.o: %.mod.c FORCE %.mod.o: %.mod.c FORCE
$(call if_changed_dep,cc_o_c) $(call if_changed_dep,cc_o_c)
ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink)
quiet_cmd_ld_ko_o = LD [M] $@ quiet_cmd_ld_ko_o = LD [M] $@
cmd_ld_ko_o += \ cmd_ld_ko_o += \
$(LD) -r $(KBUILD_LDFLAGS) \ $(LD) -r $(KBUILD_LDFLAGS) \
$(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \ $(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \
-T scripts/module.lds -o $@ $(filter %.o, $^); \ -T scripts/module.lds -o $@ $(filter %.o, $^)
$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
quiet_cmd_btf_ko = BTF [M] $@ quiet_cmd_btf_ko = BTF [M] $@
cmd_btf_ko = \ cmd_btf_ko = \