`soft-float` feature on mips-unknown-linux-musl is listed as regular feature by rustc, but emits an unstability warning during compilation
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Location (URL)
Within CLI output of rustc +stable --target mips-unknown-linux-musl --print target-features
Summary
When listing the target features for mips-unknown-linux-musl (i.e. the MIPS architecture features; should be the same with other mips-* targets), rustc says the following:
soft-float - Does not support floating point instructions.
Note that for other features considered experimental, this is noted in their description, for example:
mips5_32r2 - Subset of MIPS-V that is also in MIPS32r2 [highly experimental].
mips64r6 - Mips64r6 ISA Support [experimental].
However, when compiling with -Ctarget-feature=+soft-float, the following warning is emitted:
Compiling breakwater-parser v0.21.0
warning: unknown and unstable feature specified for `-Ctarget-feature`: `soft-float`
|
= note: it is still passed through to the codegen backend, but use of this feature might be unsound and the behavior of this feature can change in the future
= help: consider filing a feature request
warning: `breakwater-parser` (lib) generated 1 warning
The feature should therefore be denoted as experimental in the docs.
Note: I think that this feature is on by default for the target CPU mips32r2; my particular system has a MIPS 24Kc which does not have an FPU (the variant 24Kf would), but is officially listed by MIPS’s documentation as supporting Release 2 of the MIPS32 base (so the target CPU should be correct). I’m simply adding the feature to avoid any spurious illegal instruction exceptions.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing rustc +stable --target mips-unknown-linux-musl --print target-features and compare the soft-float entry with the other MIPS feature descriptions. Locate the target-feature definitions that generate this CLI listing, mark soft-float as experimental, and verify the displayed description matches the issue's expected wording.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100