summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorNeal Gompa <neal@gompa.dev>2024-07-31 08:54:28 -0400
committerMiguel Ojeda <ojeda@kernel.org>2024-08-18 23:10:53 +0200
commitf1385dc670fe66860bcec5dcba215364bf71b807 (patch)
tree971dfbf821a147265eef508b541df03725062862 /init
parent7bc186731e87482662c4f86da455f435fe838fb6 (diff)
downloadlwn-f1385dc670fe66860bcec5dcba215364bf71b807.tar.gz
lwn-f1385dc670fe66860bcec5dcba215364bf71b807.zip
init/Kconfig: Only block on RANDSTRUCT for RUST
When enabling Rust in the kernel, we only need to block on the RANDSTRUCT feature and GCC plugin. The rest of the GCC plugins are reasonably safe to enable. [ Originally (years ago) we only had this restriction, but we ended up restricting also the rest of the GCC plugins 1) to be on the safe side, 2) since compiler plugin support could be going away in the kernel and 3) since mixed builds are best effort so far; so I asked Neal about his experience enabling the other plugins -- Neal says: When I originally wrote this patch two years ago to get things working, Fedora used all the GCC plugins, so I was trying to get GCC + Rust to work while minimizing the delta on build differences. This was the combination that worked. We've been carrying this patch in the Asahi tree for a year now. And while Fedora does not currently have GCC plugins enabled because it caused issues with some third-party modules (I think it was the NVIDIA driver, but I'm not sure), it was around long enough for me to know with some confidence that it was fine this way. - Miguel ] Signed-off-by: Neal Gompa <neal@gompa.dev> Link: https://lore.kernel.org/r/20240731125615.3368813-1-neal@gompa.dev Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig2
1 files changed, 1 insertions, 1 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 5783a0b87517..839c83034006 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1900,7 +1900,7 @@ config RUST
depends on RUST_IS_AVAILABLE
depends on !CFI_CLANG
depends on !MODVERSIONS
- depends on !GCC_PLUGINS
+ depends on !GCC_PLUGIN_RANDSTRUCT
depends on !RANDSTRUCT
depends on !SHADOW_CALL_STACK
depends on !DEBUG_INFO_BTF || PAHOLE_HAS_LANG_EXCLUDE