Skip to content

Commit 2f18034

Browse files
committed
rust: avoid all GCC plugins, not just the randstruct one
We can keep support for some of the GCC plugins. However, it is simpler and safer to just disable GCC plugin support since they may be going away anyway [0]. Furthermore, if they are kept, new or future ones could also break Rust support in subtle ways. And, in any case, Rust support with GCC-built kernels is very experimental. So, at least for the moment, let's focus on other things. [0] https://lwn.net/Articles/851090/ Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 99876c6 commit 2f18034

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

init/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2058,7 +2058,7 @@ config RUST
20582058
depends on HAVE_RUST
20592059
depends on RUST_IS_AVAILABLE
20602060
depends on !MODVERSIONS
2061-
depends on !GCC_PLUGIN_RANDSTRUCT
2061+
depends on !GCC_PLUGINS
20622062
select CONSTRUCTORS
20632063
help
20642064
Enables Rust support in the kernel.

rust/Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,7 @@ bindgen_skip_c_flags := -mno-fp-ret-in-387 -mpreferred-stack-boundary=% \
245245
-fno-reorder-blocks -fno-allow-store-data-races -fasan-shadow-offset=% \
246246
-fzero-call-used-regs=% -fno-stack-clash-protection \
247247
-fno-inline-functions-called-once \
248-
--param=% --param asan-% \
249-
$(GCC_PLUGINS_CFLAGS)
248+
--param=% --param asan-%
250249

251250
# Derived from `scripts/Makefile.clang`.
252251
BINDGEN_TARGET_arm := arm-linux-gnueabi

0 commit comments

Comments
 (0)