aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.gcc-plugins
diff options
context:
space:
mode:
authorEmese Revfy <re.emese@gmail.com>2016-06-26 17:38:20 +0200
committerKees Cook <keescook@chromium.org>2016-08-08 17:53:05 -0700
commitcaefd8c9a9fb06811e07bf3571e5d4450846b16a (patch)
tree675552008567fe3ce2cfe99a83ab1dce23e5e323 /scripts/Makefile.gcc-plugins
parentgcc-plugins: Automate make rule generation (diff)
downloadlinux-dev-caefd8c9a9fb06811e07bf3571e5d4450846b16a.tar.xz
linux-dev-caefd8c9a9fb06811e07bf3571e5d4450846b16a.zip
gcc-plugins: Add support for plugin subdirectories
This adds support for building more complex gcc plugins that live in a subdirectory instead of just in a single source file. Reported-by: PaX Team <pageexec@freemail.hu> Signed-off-by: Emese Revfy <re.emese@gmail.com> [kees: clarified commit message] Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'scripts/Makefile.gcc-plugins')
-rw-r--r--scripts/Makefile.gcc-plugins3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/Makefile.gcc-plugins b/scripts/Makefile.gcc-plugins
index ffb928b9c74b..61f0e6db909b 100644
--- a/scripts/Makefile.gcc-plugins
+++ b/scripts/Makefile.gcc-plugins
@@ -21,7 +21,7 @@ ifdef CONFIG_GCC_PLUGINS
GCC_PLUGINS_CFLAGS := $(strip $(addprefix -fplugin=$(objtree)/scripts/gcc-plugins/, $(gcc-plugin-y)) $(gcc-plugin-cflags-y))
- export PLUGINCC GCC_PLUGINS_CFLAGS GCC_PLUGIN SANCOV_PLUGIN
+ export PLUGINCC GCC_PLUGINS_CFLAGS GCC_PLUGIN GCC_PLUGIN_SUBDIR SANCOV_PLUGIN
ifneq ($(PLUGINCC),)
# SANCOV_PLUGIN can be only in CFLAGS_KCOV because avoid duplication.
@@ -30,6 +30,7 @@ ifdef CONFIG_GCC_PLUGINS
KBUILD_CFLAGS += $(GCC_PLUGINS_CFLAGS)
GCC_PLUGIN := $(gcc-plugin-y)
+ GCC_PLUGIN_SUBDIR := $(gcc-plugin-subdir-y)
endif
# If plugins aren't supported, abort the build before hard-to-read compiler