Explicitly choose x86 softfloat/hardfloat ABI by RalfJung · Pull Request #136146 · rust-lang/rust (original) (raw)
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation73 Commits2 Checks6 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Part of #135408:
Instead of choosing this based on the target features listed in the target spec, make that choice explicit.
All built-in targets are being updated here; custom (JSON-defined) x86 (32bit and 64bit) softfloat targets need to explicitly set rustc-abi
to x86-softfloat
.
r? @cjgillot
rustbot has assigned @cjgillot.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r?
to explicitly pick a reviewer
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
RalfJung changed the title
Explicit choose x86 softfloat/hardfloat ABI Explicitly choose x86 softfloat/hardfloat ABI
This comment has been minimized.
This comment has been minimized.
("soft-float", Stability::Forbidden { reason: "unsound because it changes float ABI" }, &[]), |
---|
// This cannot actually be toggled, the ABI always fixes it, so it'd make little sense to |
// stabilize. It must be in this list for the ABI check to be able to use it. |
("soft-float", Stability::Unstable(sym::x87_target_feature), &[]), |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making this "forbidden" just leads to duplicate warnings so there's little point in doing that.
This makes riscv's forced-atomics
the only remaining "forbidden" feature.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense to me.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that while it changes some error outputs, this PR shouldn't have any practical effect on people, correct? Except those using our unstable target-spec.json, I suppose, and they bought the ticket for the ride they're going to get.
r=me with nits addressed
match s.parse::super::RustcAbi() { |
---|
Ok(rustc_abi) => base.$key_name = Some(rustc_abi), |
_ => return Some(Err(format!( |
"'{s}' is not a valid value for rust-abi. \ |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"'{s}' is not a valid value for rust-abi. \ |
---|
"'{s}' is not a valid value for rustc-abi. \ |
/// The Rustc-specific variant of the ABI used for this target. |
---|
#[derive(Clone, Copy, PartialEq, Hash, Debug)] |
pub enum RustcAbi { |
/// On x86-32/64 only: do not use any FPU or SIMD registers for the ABI/ |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the "ABI/"?
My understanding is that while it changes some error outputs, this PR shouldn't have any practical effect on people, correct? Except those using our unstable target-spec.json, I suppose, and they bought the ticket for the ride they're going to get.
Correct, for custom target specs this can add -soft-float
if you don't also set rustc-abi: "x86-softfloat"
. This is probably surprising as there is no warning about this, it just silently happens.
Maybe we should land #136147 first; that would avoid changing behavior for target-spec users and instead just emit a warning.
I'm not worried about being maximally convenient for them, but either way. I'll try to review that when I finish my tea.
Could not assign reviewer from: workingjubilee
.
User(s) workingjubilee
are either the PR author, already assigned, or on vacation. Please use r?
to specify someone else to assign.
ojeda mentioned this pull request
95 tasks
ojeda pushed a commit to ojeda/linux that referenced this pull request
When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option.
Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build.
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: rust-lang/rust#136146 Signed-off-by: Alice Ryhl aliceryhl@google.com Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda ojeda@kernel.org
ojeda pushed a commit to Rust-for-Linux/linux that referenced this pull request
When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option.
Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build.
[ For future reference, this solves the following error:
RUSTC L rust/core.o
error: Error loading target specification: target feature
`soft-float` is incompatible with the ABI but gets enabled in
target spec. Run `rustc --print target-list` for a list of
built-in targets
- Miguel ]
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: rust-lang/rust#136146 Signed-off-by: Alice Ryhl aliceryhl@google.com Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda ojeda@kernel.org
ojeda pushed a commit to Rust-for-Linux/linux that referenced this pull request
When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option.
Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build.
[ For future reference, this solves the following error:
RUSTC L rust/core.o
error: Error loading target specification: target feature
`soft-float` is incompatible with the ABI but gets enabled in
target spec. Run `rustc --print target-list` for a list of
built-in targets
- Miguel ]
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: rust-lang/rust#136146 Signed-off-by: Alice Ryhl aliceryhl@google.com Acked-by: Dave Hansen dave.hansen@linux.intel.com # for x86 Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda ojeda@kernel.org
| @@ -28,7 +28,7 @@ rm -rf linux || true | | -------------------------------------------------------------------------- | | # Download Linux at a specific commit | | mkdir -p linux | | git -C linux init | | git -C linux remote add origin https://github.com/Rust-for-Linux/linux.git | | git -C linux remote add origin https://github.com/Darksonn/linux.git |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs a cfg(bootstrap) to get bumped on release
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I missed that the maintainers have taken responsibility for flipping this back and don't need extra reminders from Release.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't follow, what does the Linux kernel have to do with bootstraping?
I think I did everything mentioned at https://rustc-dev-guide.rust-lang.org/tests/rust-for-linux.html.
I am confused too -- this seems fine.
When v6.14-rc3 releases in a couple weeks, which is the one I am planning to get the fix into, I will send a PR with that tag, and we will be in the normal situation again.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I missed that the maintainers have taken responsibility for flipping this back and don't need extra reminders from Release.
I don't think there is a technical requirement to flip it back. I mean, the idea is that we do so, but it is orthogonal to the release, no? It is just a CI test. For instance, in an ideal world, we could be testing several supported Linux versions (e.g. the latest LTS).
phil-opp added a commit to phil-opp/blog_os that referenced this pull request
phil-opp added a commit to phil-opp/blog_os that referenced this pull request
The Rust compiler now requires an explicit rustc-abi: x86-softfloat
field when using the soft-float target feature. This was added in rust-lang/rust#136146 and is part of the latest nightlies.
I updated the post branches in commit 688a21e
github-actions bot pushed a commit to anon503/linux that referenced this pull request
commit 6273a05 upstream.
When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option.
Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build.
[ For future reference, this solves the following error:
RUSTC L rust/core.o
error: Error loading target specification: target feature
`soft-float` is incompatible with the ABI but gets enabled in
target spec. Run `rustc --print target-list` for a list of
built-in targets
- Miguel ]
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: rust-lang/rust#136146 Signed-off-by: Alice Ryhl aliceryhl@google.com Acked-by: Dave Hansen dave.hansen@linux.intel.com # for x86 Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda ojeda@kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
johnny-mnemonic pushed a commit to linux-ia64/linux-stable-rc that referenced this pull request
commit 6273a05 upstream.
When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option.
Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build.
[ For future reference, this solves the following error:
RUSTC L rust/core.o
error: Error loading target specification: target feature
`soft-float` is incompatible with the ABI but gets enabled in
target spec. Run `rustc --print target-list` for a list of
built-in targets
- Miguel ]
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: rust-lang/rust#136146 Signed-off-by: Alice Ryhl aliceryhl@google.com Acked-by: Dave Hansen dave.hansen@linux.intel.com # for x86 Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda ojeda@kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
mj22226 pushed a commit to mj22226/linux that referenced this pull request
commit 6273a05 upstream.
When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option.
Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build.
[ For future reference, this solves the following error:
RUSTC L rust/core.o
error: Error loading target specification: target feature
`soft-float` is incompatible with the ABI but gets enabled in
target spec. Run `rustc --print target-list` for a list of
built-in targets
- Miguel ]
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: rust-lang/rust#136146 Signed-off-by: Alice Ryhl aliceryhl@google.com Acked-by: Dave Hansen dave.hansen@linux.intel.com # for x86 Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda ojeda@kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
mj22226 pushed a commit to mj22226/linux that referenced this pull request
commit 6273a05 upstream.
When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option.
Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build.
[ For future reference, this solves the following error:
RUSTC L rust/core.o
error: Error loading target specification: target feature
`soft-float` is incompatible with the ABI but gets enabled in
target spec. Run `rustc --print target-list` for a list of
built-in targets
- Miguel ]
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: rust-lang/rust#136146 Signed-off-by: Alice Ryhl aliceryhl@google.com Acked-by: Dave Hansen dave.hansen@linux.intel.com # for x86 Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda ojeda@kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
johnny-mnemonic pushed a commit to linux-ia64/linux-stable-rc that referenced this pull request
commit 6273a05 upstream.
When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option.
Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build.
[ For future reference, this solves the following error:
RUSTC L rust/core.o
error: Error loading target specification: target feature
`soft-float` is incompatible with the ABI but gets enabled in
target spec. Run `rustc --print target-list` for a list of
built-in targets
- Miguel ]
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: rust-lang/rust#136146 Signed-off-by: Alice Ryhl aliceryhl@google.com Acked-by: Dave Hansen dave.hansen@linux.intel.com # for x86 Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda ojeda@kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
KexyBiscuit pushed a commit to AOSC-Tracking/linux that referenced this pull request
commit 6273a05 upstream.
When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option.
Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build.
[ For future reference, this solves the following error:
RUSTC L rust/core.o
error: Error loading target specification: target feature
`soft-float` is incompatible with the ABI but gets enabled in
target spec. Run `rustc --print target-list` for a list of
built-in targets
- Miguel ]
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: rust-lang/rust#136146 Signed-off-by: Alice Ryhl aliceryhl@google.com Acked-by: Dave Hansen dave.hansen@linux.intel.com # for x86 Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda ojeda@kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
KexyBiscuit pushed a commit to AOSC-Tracking/linux that referenced this pull request
commit 6273a05 upstream.
When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option.
Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build.
[ For future reference, this solves the following error:
RUSTC L rust/core.o
error: Error loading target specification: target feature
`soft-float` is incompatible with the ABI but gets enabled in
target spec. Run `rustc --print target-list` for a list of
built-in targets
- Miguel ]
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: rust-lang/rust#136146 Signed-off-by: Alice Ryhl aliceryhl@google.com Acked-by: Dave Hansen dave.hansen@linux.intel.com # for x86 Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda ojeda@kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
mj22226 pushed a commit to mj22226/linux that referenced this pull request
commit 6273a05 upstream.
When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option.
Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build.
[ For future reference, this solves the following error:
RUSTC L rust/core.o
error: Error loading target specification: target feature
`soft-float` is incompatible with the ABI but gets enabled in
target spec. Run `rustc --print target-list` for a list of
built-in targets
- Miguel ]
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: rust-lang/rust#136146 Signed-off-by: Alice Ryhl aliceryhl@google.com Acked-by: Dave Hansen dave.hansen@linux.intel.com # for x86 Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda ojeda@kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
KexyBiscuit pushed a commit to AOSC-Tracking/linux that referenced this pull request
commit 6273a05 upstream.
When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option.
Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build.
[ For future reference, this solves the following error:
RUSTC L rust/core.o
error: Error loading target specification: target feature
`soft-float` is incompatible with the ABI but gets enabled in
target spec. Run `rustc --print target-list` for a list of
built-in targets
- Miguel ]
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: rust-lang/rust#136146 Signed-off-by: Alice Ryhl aliceryhl@google.com Acked-by: Dave Hansen dave.hansen@linux.intel.com # for x86 Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda ojeda@kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
tamird pushed a commit to tamird/linux that referenced this pull request
When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option.
Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build.
[ For future reference, this solves the following error:
RUSTC L rust/core.o
error: Error loading target specification: target feature
`soft-float` is incompatible with the ABI but gets enabled in
target spec. Run `rustc --print target-list` for a list of
built-in targets
- Miguel ]
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: rust-lang/rust#136146 Signed-off-by: Alice Ryhl aliceryhl@google.com Acked-by: Dave Hansen dave.hansen@linux.intel.com # for x86 Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda ojeda@kernel.org
Whissi pushed a commit to Whissi/linux-stable that referenced this pull request
commit 6273a05 upstream.
When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option.
Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build.
[ For future reference, this solves the following error:
RUSTC L rust/core.o
error: Error loading target specification: target feature
`soft-float` is incompatible with the ABI but gets enabled in
target spec. Run `rustc --print target-list` for a list of
built-in targets
- Miguel ]
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: rust-lang/rust#136146 Signed-off-by: Alice Ryhl aliceryhl@google.com Acked-by: Dave Hansen dave.hansen@linux.intel.com # for x86 Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda ojeda@kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
ojeda mentioned this pull request
bors pushed a commit to rust-lang-ci/rust that referenced this pull request
Linux v6.14-rc3 contains commit 6273a058383e ("x86: rust: set rustc-abi=x86-softfloat on rustc>=1.86.0"), which resolves the error from rust-lang#136146.
Signed-off-by: Miguel Ojeda ojeda@kernel.org
bors added a commit to rust-lang-ci/rust that referenced this pull request
CI: rfl: move job forward to Linux v6.14-rc3
Linux v6.14-rc3 contains commit 6273a058383e ("x86: rust: set rustc-abi=x86-softfloat on rustc>=1.86.0"), which resolves the error from rust-lang#136146.
r? @lqd
@Kobzol
try-job: x86_64-rust-for-linux
@rustbot
label A-rust-for-linux
@bors
try
Whissi pushed a commit to Whissi/linux-stable that referenced this pull request
commit 6273a05 upstream.
When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option.
Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build.
[ For future reference, this solves the following error:
RUSTC L rust/core.o
error: Error loading target specification: target feature
`soft-float` is incompatible with the ABI but gets enabled in
target spec. Run `rustc --print target-list` for a list of
built-in targets
- Miguel ]
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: rust-lang/rust#136146 Signed-off-by: Alice Ryhl aliceryhl@google.com Acked-by: Dave Hansen dave.hansen@linux.intel.com # for x86 Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda ojeda@kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
CI: rfl: move job forward to Linux v6.14-rc3
Linux v6.14-rc3 contains commit 6273a058383e ("x86: rust: set rustc-abi=x86-softfloat on rustc>=1.86.0"), which resolves the error from rust-lang#136146.
r? @lqd
@Kobzol
try-job: x86_64-rust-for-linux
@rustbot
label A-rust-for-linux
@bors
try
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
Rollup merge of rust-lang#137169 - ojeda:rfl, r=lqd
CI: rfl: move job forward to Linux v6.14-rc3
Linux v6.14-rc3 contains commit 6273a058383e ("x86: rust: set rustc-abi=x86-softfloat on rustc>=1.86.0"), which resolves the error from rust-lang#136146.
r? @lqd
@Kobzol
try-job: x86_64-rust-for-linux
@rustbot
label A-rust-for-linux
@bors
try
github-merge-queue bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request
CI: rfl: move job forward to Linux v6.14-rc3
Linux v6.14-rc3 contains commit 6273a058383e ("x86: rust: set rustc-abi=x86-softfloat on rustc>=1.86.0"), which resolves the error from rust-lang/rust#136146.
r? @lqd
@Kobzol
try-job: x86_64-rust-for-linux
@rustbot
label A-rust-for-linux
@bors
try
FireBurn pushed a commit to FireBurn/linux that referenced this pull request
When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option.
Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build.
[ For future reference, this solves the following error:
RUSTC L rust/core.o
error: Error loading target specification: target feature
`soft-float` is incompatible with the ABI but gets enabled in
target spec. Run `rustc --print target-list` for a list of
built-in targets
- Miguel ]
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: rust-lang/rust#136146 Signed-off-by: Alice Ryhl aliceryhl@google.com Acked-by: Dave Hansen dave.hansen@linux.intel.com # for x86 Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda ojeda@kernel.org
aaron-ang pushed a commit to aaron-ang/kvm that referenced this pull request
When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option.
Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build.
[ For future reference, this solves the following error:
RUSTC L rust/core.o
error: Error loading target specification: target feature
`soft-float` is incompatible with the ABI but gets enabled in
target spec. Run `rustc --print target-list` for a list of
built-in targets
- Miguel ]
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: rust-lang/rust#136146 Signed-off-by: Alice Ryhl aliceryhl@google.com Acked-by: Dave Hansen dave.hansen@linux.intel.com # for x86 Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda ojeda@kernel.org
egkoppel added a commit to popcorn-2/popcorn-2 that referenced this pull request
oraclelinuxkernel pushed a commit to oracle/linux-uek that referenced this pull request
commit 6273a058383e05465083b535ed9469f2c8a48321 upstream.
When using Rust on the x86 architecture, we are currently using the unstable target.json feature to specify the compilation target. Rustc is going to change how softfloat is specified in the target.json file on x86, thus update generate_rust_target.rs to specify softfloat using the new option.
Note that if you enable this parameter with a compiler that does not recognize it, then that triggers a warning but it does not break the build.
[ For future reference, this solves the following error:
RUSTC L rust/core.o
error: Error loading target specification: target feature
`soft-float` is incompatible with the ABI but gets enabled in
target spec. Run `rustc --print target-list` for a list of
built-in targets
- Miguel ]
Cc: stable@vger.kernel.org # Needed in 6.12.y and 6.13.y only (Rust is pinned in older LTSs). Link: rust-lang/rust#136146 Signed-off-by: Alice Ryhl aliceryhl@google.com Acked-by: Dave Hansen dave.hansen@linux.intel.com # for x86 Link: https://lore.kernel.org/r/20250203-rustc-1-86-x86-softfloat-v1-1-220a72a5003e@google.com [ Added 6.13.y too to Cc: stable tag and added reasoning to avoid over-backporting. - Miguel ] Signed-off-by: Miguel Ojeda ojeda@kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org (cherry picked from commit 93893d74135780f2d98b25312603bc91ee31caac) Signed-off-by: Jack Vogel jack.vogel@oracle.com
Labels
Area: The testsuite used to check the correctness of rustc
CI spurious failure: target env msvc
This PR was explicitly merged by bors.
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the compiler team, which will review and decide on the PR/issue.
Relevant to the infrastructure team, which will review and decide on the PR/issue.