gcc-plugins updates for v5.11-rc1
Hi Linus,
Please pull these gcc-plugins updates for v5.11-rc1.
Thanks!
-Kees
The following changes since commit b65054597872ce3aefbc6a666385eabdf9e288da:
Linux 5.10-rc6 (2020-11-29 15:50:50 -0800)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/gcc-plugins-v5.11-rc1
for you to fetch changes up to 53a57e60de74a3531ae769b3241cc5169e1431ac:
MAINTAINERS: Drop inactive gcc-plugins maintainer (2020-12-04 14:11:05 -0800)
----------------------------------------------------------------
gcc-plugins updates for v5.11-rc1
- Clean up gcc plugin builds now that GCC must be 4.9+ (Masahiro Yamada)
- Update MAINTAINERS (Kees Cook)
----------------------------------------------------------------
Kees Cook (1):
MAINTAINERS: Drop inactive gcc-plugins maintainer
Masahiro Yamada (2):
gcc-plugins: remove code for GCC versions older than 4.9
gcc-plugins: simplify GCC plugin-dev capability test
MAINTAINERS | 1 - scripts/gcc-plugin.sh | 19 - scripts/gcc-plugins/Kconfig | 2 +- scripts/gcc-plugins/gcc-common.h | 407 --------------------- scripts/gcc-plugins/gcc-generate-gimple-pass.h | 12 - scripts/gcc-plugins/gcc-generate-ipa-pass.h | 23 -- scripts/gcc-plugins/gcc-generate-rtl-pass.h | 17 - scripts/gcc-plugins/gcc-generate-simple_ipa-pass.h | 17 - scripts/gcc-plugins/latent_entropy_plugin.c | 12 - scripts/gcc-plugins/randomize_layout_plugin.c | 4 - scripts/gcc-plugins/sancov_plugin.c | 6 - scripts/gcc-plugins/stackleak_plugin.c | 4 +- scripts/gcc-plugins/structleak_plugin.c | 4 - 13 files changed, 2 insertions(+), 526 deletions(-) delete mode 100755 scripts/gcc-plugin.sh
Signature · 1 line
Kees Cook
Quoted 2 lines · Kees Cook
Please pull these gcc-plugins updates for v5.11-rc1.
Hmm, I pulled this and then did an allmodconfig build.
I expected that to be a full rebuild, since the plugins got recompiled, but it turned out to just take 16 seconds because it only compiled the plugins, not any of the object files.
I'm doing a _proper_ full build with this after doing a
git clean -dqfx
to actually clean everything out, but it did make me go "Umm".
Maybe we don't care. I guess the plugins are all supposed to be stable in the sense that any updates don't change the generated code. But it does strike me as a honking big hole for verification of plugin changes.
So I don't think this necessarily requires any changes to our Kbuild infrastructure, but I thought I'd mention it since this clearly didn't match my naive expectations.
Linus
Quoted 9 lines · Linus Torvalds
Quoted 2 lines · Kees Cook
Please pull these gcc-plugins updates for v5.11-rc1.
Hmm, I pulled this and then did an allmodconfig build.
I expected that to be a full rebuild, since the plugins got recompiled, but it turned out to just take 16 seconds because it only compiled the plugins, not any of the object files.
Hmm. Yeah, that's a bug. I think that's an existing bug, though. I feel like I scratched my head on that too. I will see if there is a sensible way to have Kbuild "notice" that -- I hope there's an easier way to invalidate all object files instead of adding all the plugins as a dep to all .o builds. O_o
Thanks for the heads-up!
Signature · 1 line
Kees Cook
Quoted 6 lines · Kees Cook
Hmm. Yeah, that's a bug. I think that's an existing bug, though. I feel like I scratched my head on that too. I will see if there is a sensible way to have
Kbuild"notice" that -- I hope there's an easier way to invalidate all object files instead of adding all the plugins as a dep to all .o builds.O_o
We already have some support for checking the compiler version. I wonder if the plugins could add themselves to the version name in there somehow..
But I don't think it's a big deal, and I won't worry about it. I do hope we can deprecate the plugins some day, it has always made me very nervous to have random code at that level.
Linus
Quoted 6 lines · Kees Cook
Hmm. Yeah, that's a bug. I think that's an existing bug, though. I feel like I scratched my head on that too. I will see if there is a sensible way to have
Kbuild"notice" that -- I hope there's an easier way to invalidate all object files instead of adding all the plugins as a dep to all .o builds.O_o
Side note, there's actually a more annoying issue with the gcc plugin config code.
Namely that when I get a compiler update, the rest of the Kconfig system is smart, and rebuilds all my files.
The gcc-plugins code? The code that *really* depends on the compiler version even more? Yeah, not so much. It ends up instead causing a build error like
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin./scripts/gcc-plugins/stackleak_plugin.so
because the plugins don't depend on the compiler version.
Again, this is not new, but it's another example of how fragile and annoying the gcc-plugins code can be.
Linus
Quoted 9 lines · Linus Torvalds
Quoted 6 lines · Kees Cook
Hmm. Yeah, that's a bug. I think that's an existing bug, though. I feel like I scratched my head on that too. I will see if there is a sensible way to have
Kbuild"notice" that -- I hope there's an easier way to invalidate all object files instead of adding all the plugins as a dep to all .o builds.O_o
Quoted 5 lines
Side note, there's actually a more annoying issue with the gcc plugin config code.
Namely that when I get a compiler update, the rest of the
Kconfigsystem is smart, and rebuilds all my files.
True. The full rebuild happens after commit 8b59cd81dc5e724.
Quoted 9 lines
The gcc-plugins code? The code that *really* depends on the compiler version even more? Yeah, not so much. It ends up instead causing a build error like
cc1: error: incompatible gcc/plugin versions
cc1: error: failed to initialize plugin./scripts/gcc-plugins/stackleak_plugin.so
Quoted 6 lines
because the plugins don't depend on the compiler version.
Again, this is not new, but it's another example of how fragile and annoying the gcc-plugins code can be.
Linus
OK, I will fix it. Thanks.
Signature · 2 lines
Best Regards Masahiro Yamada
The pull request you sent on Tue, 15 Dec 2020 12:15:36 -0800:
The pull request you sent on Tue, 15 Dec 2020 12:15:36 -0800:
Quoted 1 line
https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/gcc-plugins-v5.11-rc1
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/6df0f2855a9ae888fd19d034d8e6889cee6b639c
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/prtracker.html