Rust for Linux List
 help / color / mirror / Atom feed
* [PATCH] rust: x86: support Rust >= 1.98.0 target spec
@ 2026-05-30 11:49 Miguel Ojeda
  2026-05-30 12:01 ` Miguel Ojeda
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Miguel Ojeda @ 2026-05-30 11:49 UTC (permalink / raw)
  To: Miguel Ojeda, Nathan Chancellor, Nicolas Schier, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, x86
  Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Danilo Krummrich,
	rust-for-linux, linux-kbuild, H. Peter Anvin, linux-kernel,
	Ralf Jung, stable

Starting with Rust 1.98.0 (expected 2026-08-20), the target spec will not
support `x86-softfloat` anymore [1]. Instead, `softfloat` should be used,
which is an alias. Otherwise, one gets:

    error: error loading target specification: rustc-abi: invalid rustc abi: 'x86-softfloat'. allowed values: 'x86-sse2', 'softfloat' at line 3 column 32
      |
      = help: run `rustc --print target-list` for a list of built-in targets

Thus conditionally use one or the other depending on the version.

The alias has existed since Rust 1.95.0 (released 2026-04-16) [2], but
use the newer version instead to avoid changing how the build works for
existing compilers, at least until more testing takes place.

Cc: Ralf Jung <post@ralfj.de>
Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs).
Link: https://github.com/rust-lang/rust/pull/157151 [1]
Link: https://github.com/rust-lang/rust/pull/151154 [2]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
 scripts/generate_rust_target.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/generate_rust_target.rs b/scripts/generate_rust_target.rs
index 38b3416bb979..02bc45d15484 100644
--- a/scripts/generate_rust_target.rs
+++ b/scripts/generate_rust_target.rs
@@ -196,7 +196,9 @@ fn main() {
         }
     } else if cfg.has("X86_64") {
         ts.push("arch", "x86_64");
-        if cfg.rustc_version_atleast(1, 86, 0) {
+        if cfg.rustc_version_atleast(1, 98, 0) {
+            ts.push("rustc-abi", "softfloat");
+        } else if cfg.rustc_version_atleast(1, 86, 0) {
             ts.push("rustc-abi", "x86-softfloat");
         }
         ts.push(

base-commit: ac35b5580ace12e5d0a0b5e61e36d2c4e1ffa29c
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] rust: x86: support Rust >= 1.98.0 target spec
  2026-05-30 11:49 [PATCH] rust: x86: support Rust >= 1.98.0 target spec Miguel Ojeda
@ 2026-05-30 12:01 ` Miguel Ojeda
  2026-05-30 12:30 ` Alice Ryhl
  2026-05-31 13:32 ` Miguel Ojeda
  2 siblings, 0 replies; 4+ messages in thread
From: Miguel Ojeda @ 2026-05-30 12:01 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Nathan Chancellor, Nicolas Schier, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross, Danilo Krummrich, rust-for-linux, linux-kbuild,
	H. Peter Anvin, linux-kernel, Ralf Jung, stable

On Sat, May 30, 2026 at 1:49 PM Miguel Ojeda <ojeda@kernel.org> wrote:
>
>      } else if cfg.has("X86_64") {

And the same change for 32-bit UML as Sashiko points out, of course --
tested that one now too.

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] rust: x86: support Rust >= 1.98.0 target spec
  2026-05-30 11:49 [PATCH] rust: x86: support Rust >= 1.98.0 target spec Miguel Ojeda
  2026-05-30 12:01 ` Miguel Ojeda
@ 2026-05-30 12:30 ` Alice Ryhl
  2026-05-31 13:32 ` Miguel Ojeda
  2 siblings, 0 replies; 4+ messages in thread
From: Alice Ryhl @ 2026-05-30 12:30 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Nathan Chancellor, Nicolas Schier, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg,
	Trevor Gross, Danilo Krummrich, rust-for-linux, linux-kbuild,
	H. Peter Anvin, linux-kernel, Ralf Jung, stable

On Sat, May 30, 2026 at 1:49 PM Miguel Ojeda <ojeda@kernel.org> wrote:
>
> Starting with Rust 1.98.0 (expected 2026-08-20), the target spec will not
> support `x86-softfloat` anymore [1]. Instead, `softfloat` should be used,
> which is an alias. Otherwise, one gets:
>
>     error: error loading target specification: rustc-abi: invalid rustc abi: 'x86-softfloat'. allowed values: 'x86-sse2', 'softfloat' at line 3 column 32
>       |
>       = help: run `rustc --print target-list` for a list of built-in targets
>
> Thus conditionally use one or the other depending on the version.
>
> The alias has existed since Rust 1.95.0 (released 2026-04-16) [2], but
> use the newer version instead to avoid changing how the build works for
> existing compilers, at least until more testing takes place.
>
> Cc: Ralf Jung <post@ralfj.de>
> Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs).
> Link: https://github.com/rust-lang/rust/pull/157151 [1]
> Link: https://github.com/rust-lang/rust/pull/151154 [2]
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

With UML updated too:

Reviewed-by: Alice Ryhl <aliceryhl@google.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] rust: x86: support Rust >= 1.98.0 target spec
  2026-05-30 11:49 [PATCH] rust: x86: support Rust >= 1.98.0 target spec Miguel Ojeda
  2026-05-30 12:01 ` Miguel Ojeda
  2026-05-30 12:30 ` Alice Ryhl
@ 2026-05-31 13:32 ` Miguel Ojeda
  2 siblings, 0 replies; 4+ messages in thread
From: Miguel Ojeda @ 2026-05-31 13:32 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Nathan Chancellor, Nicolas Schier, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross, Danilo Krummrich, rust-for-linux, linux-kbuild,
	H. Peter Anvin, linux-kernel, Ralf Jung, stable

On Sat, May 30, 2026 at 1:49 PM Miguel Ojeda <ojeda@kernel.org> wrote:
>
> Starting with Rust 1.98.0 (expected 2026-08-20), the target spec will not
> support `x86-softfloat` anymore [1]. Instead, `softfloat` should be used,
> which is an alias. Otherwise, one gets:
>
>     error: error loading target specification: rustc-abi: invalid rustc abi: 'x86-softfloat'. allowed values: 'x86-sse2', 'softfloat' at line 3 column 32
>       |
>       = help: run `rustc --print target-list` for a list of built-in targets
>
> Thus conditionally use one or the other depending on the version.
>
> The alias has existed since Rust 1.95.0 (released 2026-04-16) [2], but
> use the newer version instead to avoid changing how the build works for
> existing compilers, at least until more testing takes place.
>
> Cc: Ralf Jung <post@ralfj.de>
> Cc: stable@vger.kernel.org # Needed in 6.12.y and later (Rust is pinned in older LTSs).
> Link: https://github.com/rust-lang/rust/pull/157151 [1]
> Link: https://github.com/rust-lang/rust/pull/151154 [2]
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

Applied to `rust-fixes` early so that we start getting testing
tomorrow -- thanks everyone!

Tags still welcome for a day or so.

(I considered `rust-next`, but to simplify testing for ~2 weeks for
those that want to use nightly, I decided to put it in `rust-fixes`
instead.)

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-31 13:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-30 11:49 [PATCH] rust: x86: support Rust >= 1.98.0 target spec Miguel Ojeda
2026-05-30 12:01 ` Miguel Ojeda
2026-05-30 12:30 ` Alice Ryhl
2026-05-31 13:32 ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox