diff options
| author | Kees Cook <[email protected]> | 2025-05-03 18:46:18 +0000 |
|---|---|---|
| committer | Kees Cook <[email protected]> | 2025-05-08 16:42:06 +0000 |
| commit | 0cecd37daef3d57e6656c0023978d5ec2d7409c1 (patch) | |
| tree | 497cc620941750eb1efaa602b40e1dbcc35c6ef1 /scripts/gcc-plugins | |
| parent | kbuild: Switch from -Wvla to -Wvla-larger-than=1 (diff) | |
| download | kernel-0cecd37daef3d57e6656c0023978d5ec2d7409c1.tar.gz kernel-0cecd37daef3d57e6656c0023978d5ec2d7409c1.zip | |
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/[email protected]
Tested-by: Nicolas Schier <[email protected]>
Reviewed-by: Nicolas Schier <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins')
| -rw-r--r-- | scripts/gcc-plugins/Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/gcc-plugins/Makefile b/scripts/gcc-plugins/Makefile index 320afd3cf8e8..05b14aba41ef 100644 --- a/scripts/gcc-plugins/Makefile +++ b/scripts/gcc-plugins/Makefile @@ -66,3 +66,7 @@ quiet_cmd_plugin_cxx_o_c = HOSTCXX $@ $(plugin-objs): $(obj)/%.o: $(src)/%.c FORCE $(call if_changed_dep,plugin_cxx_o_c) + +$(obj)/../../include/generated/gcc-plugins.h: $(plugin-single) $(plugin-multi) FORCE + $(call if_changed,touch) +always-y += ../../include/generated/gcc-plugins.h |
