]> www.infradead.org Git - users/jedix/linux-maple.git/commit
gcc-plugins: Force full rebuild when plugins change
authorKees Cook <kees@kernel.org>
Sat, 3 May 2025 18:46:18 +0000 (11:46 -0700)
committerKees Cook <kees@kernel.org>
Thu, 8 May 2025 16:42:06 +0000 (09:42 -0700)
commit0cecd37daef3d57e6656c0023978d5ec2d7409c1
tree497cc620941750eb1efaa602b40e1dbcc35c6ef1
parent5e88c48cb4bcbd0ea683373a106268933bb4edd2
gcc-plugins: Force full rebuild when plugins change

There was no dependency between the plugins changing and the rest of the
kernel being built. This could cause strange behaviors as instrumentation
could vary between targets depending on when they were built.

Generate a new header file, gcc-plugins.h, any time the GCC plugins
change. Include the header file in compiler-version.h when its associated
feature name, GCC_PLUGINS, is defined. This will be picked up by fixdep
and force rebuilds where needed.

Add a generic "touch" kbuild command, which will be used again in
a following patch. Add a "normalize_path" string helper to make the
"TOUCH" output less ugly.

Link: https://lore.kernel.org/r/20250503184623.2572355-1-kees@kernel.org
Tested-by: Nicolas Schier <n.schier@avm.de>
Reviewed-by: Nicolas Schier <n.schier@avm.de>
Signed-off-by: Kees Cook <kees@kernel.org>
include/linux/compiler-version.h
scripts/Makefile.gcc-plugins
scripts/Makefile.lib
scripts/gcc-plugins/Makefile