public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Makefile: add comment to discourage tools/* addition for kernel builds
@ 2024-06-19  6:21 Masahiro Yamada
  2024-06-19 11:22 ` Nicolas Schier
  2024-06-20 21:52 ` Brian Norris
  0 siblings, 2 replies; 6+ messages in thread
From: Masahiro Yamada @ 2024-06-19  6:21 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Peter Zijlstra, Josh Poimboeuf, linux-kernel, Sami Tolvanen,
	Brian Norris, Masahiro Yamada, Nathan Chancellor, Nicolas Schier

Kbuild provides scripts/Makefile.host to build host programs used for
building the kernel. Unfortunately, there are two exceptions that opt
out of Kbuild. The build system under tools/ is a cheesy replica, and
is always a disaster. I was recently poked about a problem in the tools
build issue, which I do not maintain (and nobody maintains). [1]

Without a comment, somebody might believe this is the right location
because that is where objtool lives, even when a more robust Kbuild
syntax satisfies their needs. [2]

[1]: https://lore.kernel.org/linux-kbuild/ZnIYWBgrJ-IJtqK8@google.com/T/#m8ece130dd0e23c6f2395ed89070161948dee8457
[2]: https://lore.kernel.org/all/20240618200501.GA1611012@google.com/

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Makefile b/Makefile
index 471f2df86422..ba070596ad4e 100644
--- a/Makefile
+++ b/Makefile
@@ -1331,6 +1331,11 @@ prepare: tools/bpf/resolve_btfids
 endif
 endif
 
+# README
+# The tools build system is not a part of Kbuild. Before adding yet another
+# tools/* here, please consider if the standard "hostprogs" syntax satisfies
+# your needs.
+
 PHONY += resolve_btfids_clean
 
 resolve_btfids_O = $(abspath $(objtree))/tools/bpf/resolve_btfids
-- 
2.43.0


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

end of thread, other threads:[~2024-06-28 21:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-19  6:21 [PATCH] Makefile: add comment to discourage tools/* addition for kernel builds Masahiro Yamada
2024-06-19 11:22 ` Nicolas Schier
2024-06-20 21:52 ` Brian Norris
2024-06-26 19:02   ` Masahiro Yamada
2024-06-26 19:49     ` Nicolas Schier
2024-06-28 21:54     ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox