]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
gcc-plugins: Adjust Kconfig to avoid cyc_complexity
authorKees Cook <keescook@chromium.org>
Wed, 9 Nov 2016 00:27:03 +0000 (16:27 -0800)
committerKees Cook <keescook@chromium.org>
Wed, 9 Nov 2016 00:27:03 +0000 (16:27 -0800)
In preparation for removing "depends on !COMPILE_TEST" from GCC_PLUGINS,
the GCC_PLUGIN_CYC_COMPLEXITY plugin needs to gain the restriction,
since it is mainly an example, and produces (intended) voluminous stderr
reporting, which is generally undesirable for allyesconfig-style build
tests. This additionally puts the plugin behind EXPERT and improves the
help text.

Signed-off-by: Kees Cook <keescook@chromium.org>
arch/Kconfig

index 659bdd079277ebdbec01f8a5c9dd38af1a19c888..d5066593a60fdb1e24fa7328a1a13a0ae506d617 100644 (file)
@@ -363,8 +363,9 @@ menuconfig GCC_PLUGINS
          See Documentation/gcc-plugins.txt for details.
 
 config GCC_PLUGIN_CYC_COMPLEXITY
-       bool "Compute the cyclomatic complexity of a function"
+       bool "Compute the cyclomatic complexity of a function" if EXPERT
        depends on GCC_PLUGINS
+       depends on !COMPILE_TEST
        help
          The complexity M of a function's control flow graph is defined as:
           M = E - N + 2P
@@ -374,6 +375,10 @@ config GCC_PLUGIN_CYC_COMPLEXITY
          N = the number of nodes
          P = the number of connected components (exit nodes).
 
+         Enabling this plugin reports the complexity to stderr during the
+         build. It mainly serves as a simple example of how to create a
+         gcc plugin for the kernel.
+
 config GCC_PLUGIN_SANCOV
        bool
        depends on GCC_PLUGINS