summaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.gcc-plugins
diff options
context:
space:
mode:
authorSven Schnelle <svens@linux.ibm.com>2026-09-09 11:29:53 +0200
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>2026-09-10 08:43:35 +0900
commitd22c3e0088e85be8131f7a9283f759cdbb20726d (patch)
tree9668df2aa27b26f850d3ba5ba1287e443803675c /scripts/Makefile.gcc-plugins
downloadlinux-stable-d22c3e0088e85be8131f7a9283f759cdbb20726d.tar.gz
linux-stable-d22c3e0088e85be8131f7a9283f759cdbb20726d.zip
selftests/ftrace: Fix unique symbol check in kprobe_non_uniq_symbol.tcgrafted
The current regex also matches symbols in modules, which makes the test fail on s390 where name_show is present only once in the kernel, but also multiple times in modules: 000001b1401cdc20 t name_show 000001b0c05e6c40 t name_show [mdev] 000001b0c0495f30 t name_show [i2c_core] Fix this by changing the regular expression to only match the function name. Link: https://lore.kernel.org/all/20260909092954.2200558-1-svens@linux.ibm.com/ Fixes: 03b80ff8023a ("selftests/ftrace: Add new test case which checks non unique symbol") Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Reviewed-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'scripts/Makefile.gcc-plugins')
-rw-r--r--scripts/Makefile.gcc-plugins29
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/Makefile.gcc-plugins b/scripts/Makefile.gcc-plugins
new file mode 100644
index 000000000..b0e1423b0
--- /dev/null
+++ b/scripts/Makefile.gcc-plugins
@@ -0,0 +1,29 @@
+# SPDX-License-Identifier: GPL-2.0
+
+gcc-plugin-$(CONFIG_GCC_PLUGIN_LATENT_ENTROPY) += latent_entropy_plugin.so
+gcc-plugin-cflags-$(CONFIG_GCC_PLUGIN_LATENT_ENTROPY) \
+ += -DLATENT_ENTROPY_PLUGIN
+ifdef CONFIG_GCC_PLUGIN_LATENT_ENTROPY
+ DISABLE_LATENT_ENTROPY_PLUGIN += -fplugin-arg-latent_entropy_plugin-disable -ULATENT_ENTROPY_PLUGIN
+endif
+export DISABLE_LATENT_ENTROPY_PLUGIN
+
+# All the plugin CFLAGS are collected here in case a build target needs to
+# filter them out of the KBUILD_CFLAGS.
+GCC_PLUGINS_CFLAGS := $(strip $(addprefix -fplugin=$(objtree)/scripts/gcc-plugins/, $(gcc-plugin-y)) $(gcc-plugin-cflags-y)) -DGCC_PLUGINS
+export GCC_PLUGINS_CFLAGS
+
+# Add the flags to the build!
+KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
+
+# Some plugins are enabled outside of this Makefile, but they still need to
+# be included in GCC_PLUGIN so they can get built.
+gcc-plugin-external-$(CONFIG_GCC_PLUGIN_RANDSTRUCT) \
+ += randomize_layout_plugin.so
+gcc-plugin-external-$(CONFIG_GCC_PLUGIN_STACKLEAK) \
+ += stackleak_plugin.so
+
+# All enabled GCC plugins are collected here for building in
+# scripts/gcc-scripts/Makefile.
+GCC_PLUGIN := $(gcc-plugin-y) $(gcc-plugin-external-y)
+export GCC_PLUGIN