Skip to content
Commit 336370d5 authored by David Gow's avatar David Gow Committed by Greg Kroah-Hartman
Browse files

arch: um: rust: Use the generated target.json again

[ Upstream commit 9a2123b3 ]

The Rust compiler can take a target config from 'target.json', which is
generated by scripts/generate_rust_target.rs. It used to be that all
Linux architectures used this to generate a target.json, but now
architectures must opt-in to this, or they will default to the Rust
compiler's built-in target definition.

This is mostly okay for (64-bit) x86 and UML, except that it can
generate SSE instructions, which we can't use in the kernel. So
re-instate the custom target.json, which disables SSE (and generally
enables the 'soft-float' feature). This fixes the following compile
error:

error: <unknown>:0:0: in function _RNvMNtCs5QSdWC790r4_4core3f32f7next_up float (float): SSE register return with SSE disabled

Fixes: f82811e2

 ("rust: Refactor the build target to allow the use of builtin targets")
Signed-off-by: default avatarDavid Gow <davidgow@google.com>
Reviewed-by: default avatarBoqun Feng <boqun.feng@gmail.com>
Tested-by: default avatarMiguel Ojeda <ojeda@kernel.org>
Reviewed-by: default avatarMiguel Ojeda <ojeda@kernel.org>
Link: https://patch.msgid.link/20240529093336.4075206-1-davidgow@google.com
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a79c2099
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment