Skip to content

Commit b044133

Browse files
committed
gcc-plugins: Disable when building under Clang
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]>
1 parent 7ccb95e commit b044133

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/gcc-plugins/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ preferred-plugin-hostcc := $(if-success,[ $(gcc-version) -ge 40800 ],$(HOSTCXX),
22

33
config PLUGIN_HOSTCC
44
string
5-
default "$(shell,$(srctree)/scripts/gcc-plugin.sh "$(preferred-plugin-hostcc)" "$(HOSTCXX)" "$(CC)")"
5+
default "$(shell,$(srctree)/scripts/gcc-plugin.sh "$(preferred-plugin-hostcc)" "$(HOSTCXX)" "$(CC)")" if CC_IS_GCC
66
help
77
Host compiler used to build GCC plugins. This can be $(HOSTCXX),
88
$(HOSTCC), or a null string if GCC plugin is unsupported.

0 commit comments

Comments
 (0)