Re: [PATCH] arch: um: rust: Use the generated target.json again

From: Miguel Ojeda
Date: Tue Jun 11 2024 - 18:08:56 EST


On Wed, May 29, 2024 at 11:33 AM David Gow <davidgow@xxxxxxxxxx> wrote:
>
> 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: f82811e22b48 ("rust: Refactor the build target to allow the use of builtin targets")
> Signed-off-by: David Gow <davidgow@xxxxxxxxxx>

I guess this should go through UML, but please let me know otherwise
(I don't see it in next).

Tested-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
Reviewed-by: Miguel Ojeda <ojeda@xxxxxxxxxx>

Should this have a

Cc: stable@xxxxxxxxxxxxxxx

too?

Thanks!

Cheers,
Miguel