Re: [PATCH 2/2] kbuild: simplify GCC plugin build rules
From: Kees Cook
Date: Fri Jan 11 2019 - 12:20:50 EST
On Fri, Jan 11, 2019 at 1:19 AM Masahiro Yamada
<yamada.masahiro@xxxxxxxxxxxxx> wrote:
>
> GCC-plugin is the only user of the shared library build rules in
> scripts/Makefile.host. Hence, those rules do not need to be treewide
> available.
>
> The build rules in scripts/Makefile.host are written in a too generic
> way. I guess the main reason is because commit 24403874316a ("Shared
> library support") revived the code ripped off by commit 62e2210798ed
> ("kbuild: drop shared library support from Makefile.host").
>
> Currently, every plugin is built from a single C file. So, all we need
> is a pattern rule to create %.so from %.c.
What'll it look like if we get a multi-file plugin in the future?
There are existing out-of-tree plugins that this change may make
porting more difficult...
--
Kees Cook