bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bpf-next PATCH v2 1/4] kbuild: remove ARCH_POSTLINK from module builds
@ 2023-10-18 15:19 Masahiro Yamada
  2023-10-18 15:19 ` [bpf-next PATCH v2 2/4] kbuild: avoid too many execution of scripts/pahole-flags.sh Masahiro Yamada
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Masahiro Yamada @ 2023-10-18 15:19 UTC (permalink / raw)
  To: linux-kbuild
  Cc: linux-kernel, Masahiro Yamada, Nicolas Schier, Albert Ou,
	Borislav Petkov, Christophe Leroy, Dave Hansen, H. Peter Anvin,
	Ingo Molnar, Michael Ellerman, Nathan Chancellor,
	Nicholas Piggin, Nick Desaulniers, Nicolas Schier,
	Palmer Dabbelt, Paul Walmsley, Thomas Bogendoerfer,
	Thomas Gleixner, bpf, linux-mips, linux-riscv, linuxppc-dev, x86

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

Remove the meaningless code.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <n.schier@avm.de>
---

(no changes since v1)

 arch/mips/Makefile.postlink    | 3 ---
 arch/powerpc/Makefile.postlink | 3 ---
 arch/riscv/Makefile.postlink   | 3 ---
 arch/x86/Makefile.postlink     | 3 ---
 scripts/Makefile.modfinal      | 5 +----
 5 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/arch/mips/Makefile.postlink b/arch/mips/Makefile.postlink
index 34e3bd71f3b0..6cfdc149d3bc 100644
--- a/arch/mips/Makefile.postlink
+++ b/arch/mips/Makefile.postlink
@@ -31,9 +31,6 @@ ifeq ($(CONFIG_RELOCATABLE),y)
 	$(call if_changed,relocs)
 endif
 
-%.ko: FORCE
-	@true
-
 clean:
 	@true
 
diff --git a/arch/powerpc/Makefile.postlink b/arch/powerpc/Makefile.postlink
index 1f860b3c9bec..ae5a4256b03d 100644
--- a/arch/powerpc/Makefile.postlink
+++ b/arch/powerpc/Makefile.postlink
@@ -35,9 +35,6 @@ ifdef CONFIG_RELOCATABLE
 	$(call if_changed,relocs_check)
 endif
 
-%.ko: FORCE
-	@true
-
 clean:
 	rm -f .tmp_symbols.txt
 
diff --git a/arch/riscv/Makefile.postlink b/arch/riscv/Makefile.postlink
index a46fc578b30b..829b9abc91f6 100644
--- a/arch/riscv/Makefile.postlink
+++ b/arch/riscv/Makefile.postlink
@@ -36,9 +36,6 @@ ifdef CONFIG_RELOCATABLE
 	$(call if_changed,relocs_strip)
 endif
 
-%.ko: FORCE
-	@true
-
 clean:
 	@true
 
diff --git a/arch/x86/Makefile.postlink b/arch/x86/Makefile.postlink
index 936093d29160..fef2e977cc7d 100644
--- a/arch/x86/Makefile.postlink
+++ b/arch/x86/Makefile.postlink
@@ -34,9 +34,6 @@ ifeq ($(CONFIG_X86_NEED_RELOCS),y)
 	$(call cmd,strip_relocs)
 endif
 
-%.ko: FORCE
-	@true
-
 clean:
 	@rm -f $(OUT_RELOCS)/vmlinux.relocs
 
diff --git a/scripts/Makefile.modfinal b/scripts/Makefile.modfinal
index b3a6aa8fbe8c..8568d256d6fb 100644
--- a/scripts/Makefile.modfinal
+++ b/scripts/Makefile.modfinal
@@ -28,14 +28,11 @@ quiet_cmd_cc_o_c = CC [M]  $@
 %.mod.o: %.mod.c FORCE
 	$(call if_changed_dep,cc_o_c)
 
-ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink)
-
 quiet_cmd_ld_ko_o = LD [M]  $@
       cmd_ld_ko_o +=							\
 	$(LD) -r $(KBUILD_LDFLAGS)					\
 		$(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE)		\
-		-T scripts/module.lds -o $@ $(filter %.o, $^);		\
-	$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
+		-T scripts/module.lds -o $@ $(filter %.o, $^)
 
 quiet_cmd_btf_ko = BTF [M] $@
       cmd_btf_ko = 							\
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-10-31 18:44 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-18 15:19 [bpf-next PATCH v2 1/4] kbuild: remove ARCH_POSTLINK from module builds Masahiro Yamada
2023-10-18 15:19 ` [bpf-next PATCH v2 2/4] kbuild: avoid too many execution of scripts/pahole-flags.sh Masahiro Yamada
2023-10-19  8:47   ` Jiri Olsa
2023-10-23  0:33   ` Martin Rodriguez Reboredo
2023-10-18 15:19 ` [bpf-next PATCH v2 3/4] kbuild: skip module BTF with one-time check for vmlinux Masahiro Yamada
2023-10-19  8:17   ` Jiri Olsa
2023-10-18 15:19 ` [bpf-next PATCH v2 4/4] kbuild: refactor module BTF rule Masahiro Yamada
2023-10-18 15:49   ` Nicolas Schier
2023-10-19  8:15   ` Jiri Olsa
2023-10-19 22:54     ` Andrii Nakryiko
2023-10-20  7:03       ` Masahiro Yamada
2023-10-20 20:51         ` Andrii Nakryiko
2023-10-21 11:37           ` Masahiro Yamada
2023-10-21 19:33             ` Andrii Nakryiko
2023-10-22 20:23               ` Masahiro Yamada
2023-10-23  3:19                 ` Andrii Nakryiko
2023-10-28 12:00                   ` Masahiro Yamada
2023-10-28 13:36                     ` Jiri Olsa
2023-10-31 18:44                       ` Andrii Nakryiko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).