]> git.baikalelectronics.ru Git - kernel.git/commitdiff
gcc-plugins: Automate make rule generation
authorEmese Revfy <re.emese@gmail.com>
Sun, 26 Jun 2016 15:36:43 +0000 (17:36 +0200)
committerKees Cook <keescook@chromium.org>
Tue, 9 Aug 2016 00:52:20 +0000 (17:52 -0700)
There's no reason to repeat the same names in the Makefile when the .so
files have already been listed. The .o list can be generated from them.

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>
scripts/gcc-plugins/Makefile

index 88c8ec47232b1c8595992109fbdd8a503cc6cc09..ee0a75d2a1c703a2589eccebbabe4bde7f439b8d 100644 (file)
@@ -21,7 +21,6 @@ endif
 $(HOSTLIBS)-y := $(GCC_PLUGIN)
 always := $($(HOSTLIBS)-y)
 
-cyc_complexity_plugin-objs := cyc_complexity_plugin.o
-sancov_plugin-objs := sancov_plugin.o
+$(foreach p,$($(HOSTLIBS)-y:%.so=%),$(eval $(p)-objs := $(p).o))
 
 clean-files += *.so