linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] kbuild: add scripts/Makefile.toolcheck to check necessary host tools
@ 2018-10-16  9:10 Masahiro Yamada
  2018-10-16  9:10 ` [PATCH 1/3] kbuild: provide a new place " Masahiro Yamada
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Masahiro Yamada @ 2018-10-16  9:10 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Ingo Molnar, Josh Poimboeuf, Bernd Edlinger, Borislav Petkov,
	Sam Ravnborg, Masahiro Yamada, Michal Marek, linux-kernel


I wrote this patch set to cater to some reports:

 - Bernd Edlinger reports false positive check of libelf
   once CONFIG_UNWINDER_ORC is enabled.
   https://lore.kernel.org/patchwork/patch/960411/

 - Borislav Petkov reports the build fails very late
   if CONFIG_KERNEL_LZ4 is enabled but lz4 is missing.
   https://patchwork.kernel.org/patch/10635381/

From the discussion
https://patchwork.kernel.org/patch/10516049/
people like to see a build error when some host tools
are missing.

So, we need to check host tools in makefiles.
(Or, do not check at all. The build will fail anyway,
but the error message might not be clear enough in some cases.)

A problem is people check host tools
in random places in the top Makefile.
This does not work because the top Makefile is parsed twice
when the include/config/auto.config is updated.
Once with a stale auto.config, and once again with a
new auto.conf.
This will cause false positive build error.

One solution is to provide a systematic way to
do host-tool checks.

I added small macros in scripts/Makefile.toolcheck
to describe tool checks in a Kbuild-ish taste.


Masahiro Yamada (3):
  kbuild: provide a new place to check necessary host tools
  objtool: move libelf check out of top Makefile
  kbuild: check the presence of lzo and lz4 tools when necessary

 Makefile                   | 22 ++++-----------------
 scripts/Makefile.build     |  2 --
 scripts/Makefile.toolcheck | 48 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 52 insertions(+), 20 deletions(-)
 create mode 100644 scripts/Makefile.toolcheck

-- 
2.7.4


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

end of thread, other threads:[~2018-10-19 19:29 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-16  9:10 [PATCH 0/3] kbuild: add scripts/Makefile.toolcheck to check necessary host tools Masahiro Yamada
2018-10-16  9:10 ` [PATCH 1/3] kbuild: provide a new place " Masahiro Yamada
2018-10-16 15:47   ` Sam Ravnborg
2018-10-16  9:10 ` [PATCH 2/3] objtool: move libelf check out of top Makefile Masahiro Yamada
2018-10-16 14:25   ` Josh Poimboeuf
2018-10-16 15:51     ` Masahiro Yamada
2018-10-16 16:15       ` Josh Poimboeuf
2018-10-19  6:04         ` Masahiro Yamada
2018-10-19 19:28           ` Josh Poimboeuf
2018-10-16  9:10 ` [PATCH 3/3] kbuild: check the presence of lzo and lz4 tools when necessary Masahiro Yamada
2018-10-16 19:54   ` Borislav Petkov
2018-10-17  8:59     ` Masahiro Yamada
2018-10-17  9:10       ` Borislav Petkov
2018-10-17  9:25         ` Masahiro Yamada
2018-10-17  9:47           ` Borislav Petkov

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).