aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gcc-plugins/Makefile
diff options
context:
space:
mode:
authorEmese Revfy <re.emese@gmail.com>2016-05-24 00:11:37 +0200
committerMichal Marek <mmarek@suse.com>2016-06-07 22:57:10 +0200
commit543c37cb165049c3be24a0d4733e67caa2b33eef (patch)
tree91f3e0bb972a6283b607da394268e7e5872292b5 /scripts/gcc-plugins/Makefile
parentAdd Cyclomatic complexity GCC plugin (diff)
downloadlinux-dev-543c37cb165049c3be24a0d4733e67caa2b33eef.tar.xz
linux-dev-543c37cb165049c3be24a0d4733e67caa2b33eef.zip
Add sancov plugin
The sancov gcc plugin inserts a __sanitizer_cov_trace_pc() call at the start of basic blocks. This plugin is a helper plugin for the kcov feature. It supports all gcc versions with plugin support (from gcc-4.5 on). It is based on the gcc commit "Add fuzzing coverage support" by Dmitry Vyukov (https://gcc.gnu.org/viewcvs/gcc?limit_changes=0&view=revision&revision=231296). Signed-off-by: Emese Revfy <re.emese@gmail.com> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'scripts/gcc-plugins/Makefile')
-rw-r--r--scripts/gcc-plugins/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/gcc-plugins/Makefile b/scripts/gcc-plugins/Makefile
index c60ba4bef57c..88c8ec47232b 100644
--- a/scripts/gcc-plugins/Makefile
+++ b/scripts/gcc-plugins/Makefile
@@ -14,8 +14,14 @@ endif
export GCCPLUGINS_DIR HOSTLIBS
+ifneq ($(CFLAGS_KCOV), $(SANCOV_PLUGIN))
+ GCC_PLUGIN := $(filter-out $(SANCOV_PLUGIN), $(GCC_PLUGIN))
+endif
+
$(HOSTLIBS)-y := $(GCC_PLUGIN)
always := $($(HOSTLIBS)-y)
cyc_complexity_plugin-objs := cyc_complexity_plugin.o
+sancov_plugin-objs := sancov_plugin.o
+
clean-files += *.so