Skip to content

Commit f1385dc

Browse files
Conan-Kudoojeda
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 7bc1867 commit f1385dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

init/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1900,7 +1900,7 @@ config RUST
19001900
depends on RUST_IS_AVAILABLE
19011901
depends on !CFI_CLANG
19021902
depends on !MODVERSIONS
1903-
depends on !GCC_PLUGINS
1903+
depends on !GCC_PLUGIN_RANDSTRUCT
19041904
depends on !RANDSTRUCT
19051905
depends on !SHADOW_CALL_STACK
19061906
depends on !DEBUG_INFO_BTF || PAHOLE_HAS_LANG_EXCLUDE

0 commit comments

Comments
 (0)