Skip to content

Commit 642ef99

Browse files
committed
gcc-plugins: fix build condition of SANCOV plugin
Since commit d677a4d ("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: d677a4d ("Makefile: support flag -fsanitizer-coverage=trace-cmp") Signed-off-by: Masahiro Yamada <[email protected]> Acked-by: Kees Cook <[email protected]>
1 parent 1cd4023 commit 642ef99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/Makefile.gcc-plugins

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ifdef CONFIG_GCC_PLUGINS
1414
endif
1515

1616
ifdef CONFIG_GCC_PLUGIN_SANCOV
17-
ifeq ($(CFLAGS_KCOV),)
17+
ifeq ($(strip $(CFLAGS_KCOV)),)
1818
# It is needed because of the gcc-plugin.sh and gcc version checks.
1919
gcc-plugin-$(CONFIG_GCC_PLUGIN_SANCOV) += sancov_plugin.so
2020

0 commit comments

Comments
 (0)