diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-05-28 18:22:06 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-06-11 09:16:22 +0900 |
commit | 59f53855babf757ac7be19995670ab884aaf9b71 (patch) | |
tree | 482e47560c10f6d2a180cbf55d8cc196f7f6922b /scripts/gcc-plugins | |
parent | 8034c2fb1225979b1cc9b9a12fa8094ca10b4fc3 (diff) | |
download | linux-59f53855babf757ac7be19995670ab884aaf9b71.tar.gz linux-59f53855babf757ac7be19995670ab884aaf9b71.tar.bz2 linux-59f53855babf757ac7be19995670ab884aaf9b71.zip |
gcc-plugins: test plugin support in Kconfig and clean up Makefile
Run scripts/gcc-plugin.sh from Kconfig so that users can enable
GCC_PLUGINS only when the compiler supports building plugins.
Kconfig defines a new symbol, PLUGIN_HOSTCC. This will contain
the compiler (g++ or gcc) used for building plugins, or empty
if the plugin can not be supported at all.
This allows us to remove all ugly testing in Makefile.gcc-plugins.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'scripts/gcc-plugins')
-rw-r--r-- | scripts/gcc-plugins/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/gcc-plugins/Makefile b/scripts/gcc-plugins/Makefile index ea465799ced5..326254653bd0 100644 --- a/scripts/gcc-plugins/Makefile +++ b/scripts/gcc-plugins/Makefile @@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 +PLUGINCC := $(CONFIG_PLUGIN_HOSTCC:"%"=%) GCC_PLUGINS_DIR := $(shell $(CC) -print-file-name=plugin) ifeq ($(PLUGINCC),$(HOSTCC)) |