-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustc: Remove soft-float from MIPS targets #34910
Conversation
r? @nrc (rust_highfive has picked a reviewer for you, use r? to override) |
@bors r+ |
📌 Commit 617c65e has been approved by |
I can't really speak for the But for |
@japaric thanks for the info! This does indeed change mips-musl, but I will revert |
Right now two MIPS targets in the compiler, `mips-unknown-linux-{gnu,musl}` both generate object files using the soft-float ABI through LLVM by default. This is also expressed as the `-C soft-float` codegen option and otherwise isn't used for any other target in the compiler. This option was added quite some time ago (back in rust-lang#9617), and nowadays it's more appropriate to be done through a codegen option. This is motivated by rust-lang#34743 which necessitated an upgrade in the CMake installation on our bots which necessitated an upgrade in the Ubuntu version which invalidated the MIPS compilers we were using. The new MIPS compilers (coming from Debian I believe) all have hard float enabled by default and soft float support not built in. This meant that we couldn't upgrade the bots until rust-lang#34841 landed because otherwise we would fail to compile C code as the `-msoft-float` option wouldn't work. Unfortunately, though, this means that once we upgrade the bots the C code we're compiling will be compiled for hard float and the Rust code will be compiled for soft float, a bad mismatch! This PR remedies the situation such that Rust will compile with hard float as well. If this lands it will likely produce broken nightlies for a day or two while we get around to upgrading the bots because the current C toolchain only produces soft-float binaries, and now rust will be hard-float. Hopefully, though, the upgrade can go smoothly!
617c65e
to
f77bcc8
Compare
📌 Commit f77bcc8 has been approved by |
@alexcrichton I did a survey of the OpenWRT musl releases and all the mips (8 devices) and mipsel (12 devices) releases are using the soft float ABI. So, yes. We should change the |
I should note that the Rust |
Ah ok, confirmed that |
Ok, opened up #34922 |
I feel like Sure, OpenWRT still uses |
@nagisa perhaps yeah, but with a lack of demand I don't think it matters too much one way or another at the moment, we can always tweak in the future. This is just indicative of how our target specs are not super well defined, and probably won't get solved here either way. |
I’d still insist somewhat on making the soft-float targets be named properly, especially now that we know exactly where they are used and do have demand. |
PRs are of course always welcome! @japaric should be cc'd but I don't see too much in the way otherwise. |
IMO, we should have (at least) two releases: one for soft float and another for hard float. Also, I don't think we should conflate the vendor ( The "problem" I see with one release per ABI is naming. Then, there is the issue that there are a few MIPS ABIs: |
⌛ Testing commit f77bcc8 with merge b3707ff... |
💔 Test failed - auto-win-gnu-32-opt-rustbuild |
@bors: retry On Tue, Jul 19, 2016 at 9:36 PM, bors notifications@github.com wrote:
|
⌛ Testing commit f77bcc8 with merge 77ba66d... |
💔 Test failed - auto-linux-64-cargotest |
@bors: retry On Wed, Jul 20, 2016 at 6:24 PM, bors notifications@github.com wrote:
|
rustc: Remove soft-float from MIPS targets Right now two MIPS targets in the compiler, `mips-unknown-linux-{gnu,musl}` both generate object files using the soft-float ABI through LLVM by default. This is also expressed as the `-C soft-float` codegen option and otherwise isn't used for any other target in the compiler. This option was added quite some time ago (back in rust-lang#9617), and nowadays it's more appropriate to be done through a codegen option. This is motivated by rust-lang#34743 which necessitated an upgrade in the CMake installation on our bots which necessitated an upgrade in the Ubuntu version which invalidated the MIPS compilers we were using. The new MIPS compilers (coming from Debian I believe) all have hard float enabled by default and soft float support not built in. This meant that we couldn't upgrade the bots until rust-lang#34841 landed because otherwise we would fail to compile C code as the `-msoft-float` option wouldn't work. Unfortunately, though, this means that once we upgrade the bots the C code we're compiling will be compiled for hard float and the Rust code will be compiled for soft float, a bad mismatch! This PR remedies the situation such that Rust will compile with hard float as well. If this lands it will likely produce broken nightlies for a day or two while we get around to upgrading the bots because the current C toolchain only produces soft-float binaries, and now rust will be hard-float. Hopefully, though, the upgrade can go smoothly!
Right now two MIPS targets in the compiler,
mips-unknown-linux-{gnu,musl}
bothgenerate object files using the soft-float ABI through LLVM by default. This is
also expressed as the
-C soft-float
codegen option and otherwise isn't usedfor any other target in the compiler. This option was added quite some time ago
(back in #9617), and nowadays it's more appropriate to be done through a codegen
option.
This is motivated by #34743 which necessitated an upgrade in the CMake
installation on our bots which necessitated an upgrade in the Ubuntu version
which invalidated the MIPS compilers we were using. The new MIPS compilers
(coming from Debian I believe) all have hard float enabled by default and soft
float support not built in. This meant that we couldn't upgrade the bots
until #34841 landed because otherwise we would fail to compile C code as the
-msoft-float
option wouldn't work.Unfortunately, though, this means that once we upgrade the bots the C code we're
compiling will be compiled for hard float and the Rust code will be compiled
for soft float, a bad mismatch! This PR remedies the situation such that Rust
will compile with hard float as well.
If this lands it will likely produce broken nightlies for a day or two while we
get around to upgrading the bots because the current C toolchain only produces
soft-float binaries, and now rust will be hard-float. Hopefully, though, the
upgrade can go smoothly!