On Sun, Dec 21, 2025 at 9:17 AM <[email protected]> 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: 2f7ab1267dc9 ("Kbuild: add Rust support") > Signed-off-by: Stijn Tintel <[email protected]>
Cc'ing plugins and Kbuild. Kees, Emese: from a quick look at the plugin, it doesn't seem to change the signature of the functions (and even for variables it just initializes), so it seems OK to ignore it for `bindgen` purposes, at least naively. So I think this sounds fine. Thanks! Cheers, Miguel
