init/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
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.
Signed-off-by: Neal Gompa <neal@gompa.dev>
---
init/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/init/Kconfig b/init/Kconfig
index a465ea9525bd..ff4ecfa62569 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1900,8 +1900,8 @@ config RUST
depends on RUST_IS_AVAILABLE
depends on !CFI_CLANG
depends on !MODVERSIONS
- depends on !GCC_PLUGINS
- depends on !RANDSTRUCT
+ depends on !GCC_PLUGIN_RANDSTRUCT
+ depends on RANDSTRUCT_NONE
depends on !DEBUG_INFO_BTF || PAHOLE_HAS_LANG_EXCLUDE
help
Enables Rust support in the kernel.
--
2.45.2
On Wed, Jul 31, 2024 at 5:21 AM Neal Gompa <neal@gompa.dev> wrote: > > 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. Yeah, only that one is what we had initially years ago, and then we went the easy route since anyway the mixed builds are best effort at the moment and GCC plugins could possibly be going away anyway. Did you test it with the other GCC plugins enabled etc.? > + depends on RANDSTRUCT_NONE Also, why is this changed? Thanks! Cheers, Miguel
On Wed, Jul 31, 2024 at 4:32 AM Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote: > > On Wed, Jul 31, 2024 at 5:21 AM Neal Gompa <neal@gompa.dev> wrote: > > > > 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. > > Yeah, only that one is what we had initially years ago, and then we > went the easy route since anyway the mixed builds are best effort at > the moment and GCC plugins could possibly be going away anyway. > > Did you test it with the other GCC plugins enabled etc.? > 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. > > + depends on RANDSTRUCT_NONE > > Also, why is this changed? > This was mostly because I wanted it to be clearer. The negation didn't exactly read to me the same way, but that hunk can be dropped if you want. -- 真実はいつも一つ!/ Always, there's only one truth!
On Wed, Jul 31, 2024 at 12:18 PM Neal Gompa <neal@gompa.dev> wrote: > > 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 Just for clarity, when you say "carrying the patch for a year", does that mean Asahi used it with the other GCC plugins enabled? > 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. Same here: I am reading this as "yes, in Fedora we tested it for a while with the other GCC plugins enabled, although not recently". If so, that is great to know and we can relax things here. > This was mostly because I wanted it to be clearer. The negation didn't > exactly read to me the same way, but that hunk can be dropped if you want. I see, that is what I suspected, but I wanted to be sure I was not missing something. I am ambivalent on what reads best, to be honest, so I think I prefer to avoid the change if it is unneeded. Thanks! Cheers, Miguel
On Wed, Jul 31, 2024 at 6:29 AM Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote: > > On Wed, Jul 31, 2024 at 12:18 PM Neal Gompa <neal@gompa.dev> wrote: > > > > 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 > > Just for clarity, when you say "carrying the patch for a year", does > that mean Asahi used it with the other GCC plugins enabled? > Yes. When Fedora had it on, so did we. > > 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. > > Same here: I am reading this as "yes, in Fedora we tested it for a > while with the other GCC plugins enabled, although not recently". > > If so, that is great to know and we can relax things here. > Yup, that is exactly the case. > > This was mostly because I wanted it to be clearer. The negation didn't > > exactly read to me the same way, but that hunk can be dropped if you want. > > I see, that is what I suspected, but I wanted to be sure I was not > missing something. > > I am ambivalent on what reads best, to be honest, so I think I prefer > to avoid the change if it is unneeded. > I'll send a v2 then. -- 真実はいつも一つ!/ Always, there's only one truth!
© 2016 - 2026 Red Hat, Inc.