[lkml]   [2018]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v4 27/31] kcov: test compiler capability in Kconfig and correct dependency
On Wed, May 16, 2018 at 11:17 PM, Masahiro Yamada
<> wrote:
> As Documentation/kbuild/kconfig-language.txt notes, 'select' should be
> be used with care - it forces a lower limit of another symbol, ignoring
> the dependency. Currently, KCOV can select GCC_PLUGINS even if arch
> does not select HAVE_GCC_PLUGINS. This could cause the unmet direct
> dependency.
> Now that Kconfig can test compiler capability, let's handle this in a
> more sophisticated way.
> There are two ways to enable KCOV; use the compiler that natively
> supports -fsanitize-coverage=trace-pc, or build the SANCOV plugin if
> the compiler has ability to build GCC plugins. Hence, the correct
> dependency for KCOV is:
> You do not need to build the SANCOV plugin if the compiler already
> supports -fsanitize-coverage=trace-pc. Hence, the select should be:
> With this, GCC_PLUGIN_SANCOV is selected only when necessary, so
> scripts/Makefile.gcc-plugins can be cleaner.
> I also cleaned up Kconfig and scripts/Makefile.kcov as well.
> Signed-off-by: Masahiro Yamada <>

Reviewed-by: Kees Cook <>


Kees Cook
Pixel Security

 \ /
  Last update: 2018-05-17 08:34    [W:0.882 / U:4.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site