aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-05-24 22:55:41 +0900
committerKees Cook <keescook@chromium.org>2022-05-24 08:25:16 -0700
commitd37aa2efc89b387cda93bf15317883519683d435 (patch)
treeec5948bdf2b36ecaa47106ef0f28aaa74da8573b /scripts/gcc-plugins/Makefile
parentloadpin: stop using bdevname (diff)
downloadlinux-dev-d37aa2efc89b387cda93bf15317883519683d435.tar.xz
linux-dev-d37aa2efc89b387cda93bf15317883519683d435.zip
gcc-plugins: use KERNELVERSION for plugin version
Commit 61f60bac8c05 ("gcc-plugins: Change all version strings match kernel") broke parallel builds. Instead of adding the dependency between GCC plugins and utsrelease.h, let's use KERNELVERSION, which does not require any build artifact. Another reason why I want to avoid utsrelease.h is because it depends on CONFIG_LOCALVERSION(_AUTO) and localversion* files. (include/generated/utsrelease.h depends on include/config/kernel.release, which is generated by scripts/setlocalversion) I want to keep host tools independent of the kernel configuration. There is no good reason to rebuild GCC plugins just because of CONFIG_LOCALVERSION being changed. We just want to associate the plugin versions with the kernel source version. KERNELVERSION should be enough for our purpose. Fixes: 61f60bac8c05 ("gcc-plugins: Change all version strings match kernel") Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/linux-mm/202205230239.EZxeZ3Fv-lkp@intel.com Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20220524135541.1453693-1-masahiroy@kernel.org
Diffstat (limited to 'scripts/gcc-plugins/Makefile')
-rw-r--r--scripts/gcc-plugins/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/gcc-plugins/Makefile b/scripts/gcc-plugins/Makefile
index 6f0aecad5d67..b34d11e22636 100644
--- a/scripts/gcc-plugins/Makefile
+++ b/scripts/gcc-plugins/Makefile
@@ -28,7 +28,7 @@ GCC_PLUGINS_DIR = $(shell $(CC) -print-file-name=plugin)
plugin_cxxflags = -Wp,-MMD,$(depfile) $(KBUILD_HOSTCXXFLAGS) -fPIC \
-include $(srctree)/include/linux/compiler-version.h \
- -include $(objtree)/include/generated/utsrelease.h \
+ -DPLUGIN_VERSION=$(call stringify,$(KERNELVERSION)) \
-I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++11 \
-fno-rtti -fno-exceptions -fasynchronous-unwind-tables \
-ggdb -Wno-narrowing -Wno-unused-variable \