CONFIG_RUST currently supports x86_64, but does not support it under
UML. With the previous patches applied, adding support is trivial:
add CONFIG_HAVE_RUST to UML if X86_64 is set.
The scripts/generate_rust_target.rs file already checks for
CONFIG_X86_64, not CONFIG_X86, so is prepared for UML su
This series adds support for building and running code in the Rust
programming language under x86_64 UML kernels.
It is based on two Pull Requests from the Rust-for-Linux GitHub page:
- https://github.com/Rust-for-Linux/linux/pull/766
- https://github.com/Rust-for-Linux/linux/pull/881
The series
The kernel disables all SSE and similar FP/SIMD instructions on
x86-based architectures (partly because we shouldn't be using floats in
the kernel, and partly to avoid the need for stack alignment, see:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 )
UML does not do the same thing, which isn'
UML expects a position independent executable for some reason, so tell
rustc to generate pie objects. Otherwise we get a bunch of relocations
we can't deal with in libcore.
Signed-off-by: David Gow
---
arch/um/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/um/Makefile b/arch