]> git.baikalelectronics.ru Git - kernel.git/commit
gcc-plugins: fix build condition of SANCOV plugin
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 13 Apr 2018 05:06:10 +0000 (14:06 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sat, 5 May 2018 01:24:52 +0000 (10:24 +0900)
commit2354980a8b0b792718acf2f52ef3d216fb3f5acd
treeff0382396f3fd8f10786e8eace8e9750014590bc
parent4ba7413b500573172d9d2549251b2d2adb4126d5
gcc-plugins: fix build condition of SANCOV plugin

Since commit d04cfe9680bd ("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: d04cfe9680bd ("Makefile: support flag -fsanitizer-coverage=trace-cmp")
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Kees Cook <keescook@chromium.org>
scripts/Makefile.gcc-plugins