Re: [PATCH v2] rust: bindgen: disable GCC latent entropy plugin
From: Miguel Ojeda
Date: Thu Dec 03 2026 - 06:15:49 EST
On Mon, May 18, 2026 at 3:02 PM <stijn@xxxxxxxxxxxxx> wrote:
>
> When CONFIG_GCC_PLUGIN_LATENT_ENTROPY and CONFIG_RUST are enabled, rust
> bindgen fails due to latent_entropy being undeclared:
>
> BINDGEN rust/bindings/bindings_generated.rs
> ./include/linux/random.h:24:39: error: use of undeclared identifier 'latent_entropy'
> ./include/linux/random.h:24:62: error: use of undeclared identifier 'latent_entropy'
> Unable to generate bindings: clang diagnosed error: ./include/linux/random.h:24:39: error: use of undeclared identifier 'latent_entropy'
> ./include/linux/random.h:24:62: error: use of undeclared identifier 'latent_entropy'
>
> Fix this by adding DISABLE_LATENT_ENTROPY_PLUGIN to
> bindgen_extra_c_flags.
>
> Fixes: f1385dc670fe ("init/Kconfig: Only block on RANDSTRUCT for RUST")
> Signed-off-by: Stijn Tintel <stijn@xxxxxxxxxxxxx>
Applied to `rust-next` -- thanks!
[ Made author match the Signed-off-by one. - Miguel ]
Some months have passed, and I didn't hear complaints (or anything,
really) about this one from the Cc's I did in v1. Taking a look again,
it seems like we can't really break something else with this, but I am
Cc'ing again here a few more folks just in case they don't want this.
Please shout if needed.
Cheers,
Miguel