diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-04-13 01:06:10 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-05-04 21:24:52 -0400 |
commit | 642ef99be932c4071274b28eaf3d3d85bbb6e78c (patch) | |
tree | ff0382396f3fd8f10786e8eace8e9750014590bc | |
parent | 1cd4023bc3370578fae05abf48fb4a6ef79c9ea1 (diff) |
gcc-plugins: fix build condition of SANCOV plugin
Since commit d677a4d60193 ("Makefile: support flag
-fsanitizer-coverage=trace-cmp"), you miss to build the SANCOV
plugin under some circumstances.
CONFIG_KCOV=y
CONFIG_KCOV_ENABLE_COMPARISONS=y
Your compiler does not support -fsanitize-coverage=trace-pc
Your compiler does not support -fsanitize-coverage=trace-cmp
Under this condition, $(CFLAGS_KCOV) is not empty but contains a
space, so the following ifeq-conditional is false.
ifeq ($(CFLAGS_KCOV),)
Then, scripts/Makefile.gcc-plugins misses to add sancov_plugin.so to
gcc-plugin-y while the SANCOV plugin is necessary as an alternative
means.
Fixes: d677a4d60193 ("Makefile: support flag -fsanitizer-coverage=trace-cmp")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Kees Cook <keescook@chromium.org>
-rw-r--r-- | scripts/Makefile.gcc-plugins | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/Makefile.gcc-plugins b/scripts/Makefile.gcc-plugins index b2a95af7df18..7f5c86246138 100644 --- a/scripts/Makefile.gcc-plugins +++ b/scripts/Makefile.gcc-plugins | |||
@@ -14,7 +14,7 @@ ifdef CONFIG_GCC_PLUGINS | |||
14 | endif | 14 | endif |
15 | 15 | ||
16 | ifdef CONFIG_GCC_PLUGIN_SANCOV | 16 | ifdef CONFIG_GCC_PLUGIN_SANCOV |
17 | ifeq ($(CFLAGS_KCOV),) | 17 | ifeq ($(strip $(CFLAGS_KCOV)),) |
18 | # It is needed because of the gcc-plugin.sh and gcc version checks. | 18 | # It is needed because of the gcc-plugin.sh and gcc version checks. |
19 | gcc-plugin-$(CONFIG_GCC_PLUGIN_SANCOV) += sancov_plugin.so | 19 | gcc-plugin-$(CONFIG_GCC_PLUGIN_SANCOV) += sancov_plugin.so |
20 | 20 | ||