]> Git Repo - J-linux.git/commitdiff
gcc-plugins: Disable when building under Clang
authorKees Cook <[email protected]>
Thu, 23 Aug 2018 06:02:31 +0000 (23:02 -0700)
committerKees Cook <[email protected]>
Thu, 23 Aug 2018 17:06:12 +0000 (10:06 -0700)
Prior to doing compiler feature detection in Kconfig, attempts to build
GCC plugins with Clang would fail the build, much in the same way missing
GCC plugin headers would fail the build. However, now that this logic
has been lifted into Kconfig, add an explicit test for GCC (instead of
duplicating it in the feature-test script).

Reported-by: Stefan Agner <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Reviewed-by: Masahiro Yamada <[email protected]>
scripts/gcc-plugins/Kconfig

index 7430a7c77a4a1ddb586519d5d38f215cd300c675..cb0c889e13aa05818e222bbfd2cef9f082a29655 100644 (file)
@@ -2,7 +2,7 @@ preferred-plugin-hostcc := $(if-success,[ $(gcc-version) -ge 40800 ],$(HOSTCXX),
 
 config PLUGIN_HOSTCC
        string
-       default "$(shell,$(srctree)/scripts/gcc-plugin.sh "$(preferred-plugin-hostcc)" "$(HOSTCXX)" "$(CC)")"
+       default "$(shell,$(srctree)/scripts/gcc-plugin.sh "$(preferred-plugin-hostcc)" "$(HOSTCXX)" "$(CC)")" if CC_IS_GCC
        help
          Host compiler used to build GCC plugins.  This can be $(HOSTCXX),
          $(HOSTCC), or a null string if GCC plugin is unsupported.
This page took 0.045348 seconds and 4 git commands to generate.