[PATCH] kbuild: introduce include/generated/global-rebuild.h
Nicolas Schier
nicolas.schier at linux.dev
Tue May 6 03:52:45 PDT 2025
On Sat, May 03, 2025 at 05:41:43PM +0900, Masahiro Yamada wrote:
> Sometimes we need to trigger a global rebuild of the kernel tree -
> for instance, when any of the GCC plugins changes. [1]
>
> This commit provides a simple mechanism to force a global rebuild
> using a single header file.
>
> The top-level Makefile creates include/generated/global-rebuild.h if
> it does not exist, and this file is included by all kernel sources.
>
> You can touch it in a build rule when a global rebuild is required.
>
> The following is an example change to the GCC plugin build rule.
>
> quiet_cmd_plugin_cxx_so_c = HOSTCXX $@
> - cmd_plugin_cxx_so_c = $(HOSTCXX) $(plugin_cxxflags) $(plugin_ldflags) -o $@ $<
> + cmd_plugin_cxx_so_c = $(HOSTCXX) $(plugin_cxxflags) $(plugin_ldflags) -o $@ $<; touch include/generated/global-rebuild.h
>
> Link: https://lore.kernel.org/linux-kbuild/CAK7LNATDbxc+3HQ6zoSk9t-Lkf4MSNmEUN6S5EqoVWnBQw_K6g@mail.gmail.com/T/#me069145443a17f0b464c13814424dbba0d970863 [1]
> Cc: Kees Cook <kees at kernel.org>
> Signed-off-by: Masahiro Yamada <masahiroy at kernel.org>
> ---
>
> Makefile | 9 ++++++++-
> arch/um/Makefile | 3 ++-
> 2 files changed, 10 insertions(+), 2 deletions(-)
>
Looks good to me, thanks!
Reviewed-by: Nicolas Schier <n.schier at avm.de>
Tested-by: Nicolas Schier <n.schier at avm.de>
More information about the linux-um
mailing list