Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4eda4cf2 authored by Brendan Higgins's avatar Brendan Higgins Committed by Greg Kroah-Hartman
Browse files

gcc-plugins/structleak: add makefile var for disabling structleak



[ Upstream commit 554afc3b9797511e3245864e32aebeb6abbab1e3 ]

KUnit and structleak don't play nice, so add a makefile variable for
enabling structleak when it complains.

Co-developed-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarBrendan Higgins <brendanhiggins@google.com>
Reviewed-by: default avatarDavid Gow <davidgow@google.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c2eec4bd
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -17,6 +17,10 @@ gcc-plugin-cflags-$(CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE) \
		+= -fplugin-arg-structleak_plugin-verbose
		+= -fplugin-arg-structleak_plugin-verbose
gcc-plugin-cflags-$(CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL)	\
gcc-plugin-cflags-$(CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL)	\
		+= -fplugin-arg-structleak_plugin-byref-all
		+= -fplugin-arg-structleak_plugin-byref-all
ifdef CONFIG_GCC_PLUGIN_STRUCTLEAK
    DISABLE_STRUCTLEAK_PLUGIN += -fplugin-arg-structleak_plugin-disable
endif
export DISABLE_STRUCTLEAK_PLUGIN
gcc-plugin-cflags-$(CONFIG_GCC_PLUGIN_STRUCTLEAK)		\
gcc-plugin-cflags-$(CONFIG_GCC_PLUGIN_STRUCTLEAK)		\
		+= -DSTRUCTLEAK_PLUGIN
		+= -DSTRUCTLEAK_PLUGIN