]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 1 Oct 2018 12:58:04 +0000 (14:58 +0200)
commit3248bfaf2e3342e78cd3a5e76dda0feb1a1c9692
treec220a02c7aabeffbc7f309b92c93c02990100522
parent6a9d2be7a816f635d722790bfbd085cd66c796ca
gcc-plugins: fix build condition of SANCOV plugin

BugLink: http://bugs.launchpad.net/bugs/1794889
[ Upstream commit 642ef99be932c4071274b28eaf3d3d85bbb6e78c ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
scripts/Makefile.gcc-plugins