Skip to content
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

mk: Don't pass -msoft-float on mips-gnu #34841

Merged
merged 1 commit into from
Jul 16, 2016

Conversation

alexcrichton
Copy link
Member

Soon the LLVM upgrade (#34743) will require an updated CMake installation, and
the easiest way to do this was to upgrade the Ubuntu version of the bots to
16.04. This in turn brings in a new MIPS compiler on the linux-cross builder,
which is now from the "official" ubuntu repositories. Unfortunately these
new compilers don't support compiling with the -msoft-float flag like we're
currently passing, causing compiles to fail.

This commit removes these flags as it's not clear why they're being passed, as
the mipsel targets also don't have it. At least if it's not supported by a
debian default compiler, perhaps it's not too relevant to support?

Soon the LLVM upgrade (rust-lang#34743) will require an updated CMake installation, and
the easiest way to do this was to upgrade the Ubuntu version of the bots to
16.04. This in turn brings in a new MIPS compiler on the linux-cross builder,
which is now from the "official" ubuntu repositories. Unfortunately these
new compilers don't support compiling with the `-msoft-float` flag like we're
currently passing, causing compiles to fail.

This commit removes these flags as it's not clear *why* they're being passed, as
the mipsel targets also don't have it. At least if it's not supported by a
debian default compiler, perhaps it's not too relevant to support?
@rust-highfive
Copy link
Collaborator

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member Author

r? @brson

cc @japaric
cc @badboy

@rust-highfive rust-highfive assigned brson and unassigned aturon Jul 15, 2016
@alexcrichton alexcrichton mentioned this pull request Jul 15, 2016
3 tasks
@alexcrichton
Copy link
Member Author

Confirmed that this passes our suite of auto bots in dev with the updated images the LLVM upgrade will use, just need to see if it passes our current auto bots...

@brson
Copy link
Contributor

brson commented Jul 15, 2016

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Jul 15, 2016

📌 Commit 5f43817 has been approved by brson

@bors
Copy link
Contributor

bors commented Jul 16, 2016

⌛ Testing commit 5f43817 with merge 145f0ec...

bors added a commit that referenced this pull request Jul 16, 2016
mk: Don't pass -msoft-float on mips-gnu

Soon the LLVM upgrade (#34743) will require an updated CMake installation, and
the easiest way to do this was to upgrade the Ubuntu version of the bots to
16.04. This in turn brings in a new MIPS compiler on the linux-cross builder,
which is now from the "official" ubuntu repositories. Unfortunately these
new compilers don't support compiling with the `-msoft-float` flag like we're
currently passing, causing compiles to fail.

This commit removes these flags as it's not clear *why* they're being passed, as
the mipsel targets also don't have it. At least if it's not supported by a
debian default compiler, perhaps it's not too relevant to support?
@bors bors merged commit 5f43817 into rust-lang:master Jul 16, 2016
@alexcrichton alexcrichton deleted the no-mips-soft-float branch July 16, 2016 17:20
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Jul 19, 2016
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!
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Jul 21, 2016
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!
@alexcrichton alexcrichton added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 27, 2016
@alexcrichton
Copy link
Member Author

The update of the builder images has unfortunately caused the beta build to now fail due to this PR not being available:

cc1: warning: command line option '-ftarget=mips-linux-gnu' is valid for Java but not for C
In file included from /usr/mips-linux-gnu/include/features.h:391:0,
                 from /usr/mips-linux-gnu/include/limits.h:25,
                 from /usr/lib/gcc-cross/mips-linux-gnu/5/include-fixed/limits.h:168,
                 from /usr/lib/gcc-cross/mips-linux-gnu/5/include-fixed/syslimits.h:7,
                 from /usr/lib/gcc-cross/mips-linux-gnu/5/include-fixed/limits.h:34,
                 from /buildslave/rust-buildbot/slave/beta-dist-rustc-cross-linux/build/src/compiler-rt/lib/builtins/int_lib.h:67,
                 from /buildslave/rust-buildbot/slave/beta-dist-rustc-cross-linux/build/src/compiler-rt/lib/builtins/absvdi2.c:15:
/usr/mips-linux-gnu/include/gnu/stubs.h:8:33: fatal error: gnu/stubs-o32_soft.h: No such file or directory
compilation terminated.
make[4]: *** [lib/builtins/CMakeFiles/clang_rt.builtins-mips.dir/absvdi2.c.o] Error 1
make[4]: Leaving directory `/buildslave/rust-buildbot/slave/beta-dist-rustc-cross-linux/build/obj/mips-unknown-linux-gnu/rt/compiler-rt'
make[3]: *** [lib/builtins/CMakeFiles/clang_rt.builtins-mips.dir/all] Error 2
make[3]: Leaving directory `/buildslave/rust-buildbot/slave/beta-dist-rustc-cross-linux/build/obj/mips-unknown-linux-gnu/rt/compiler-rt'
make[2]: *** [lib/builtins/CMakeFiles/clang_rt.builtins-mips.dir/rule] Error 2
make[1]: *** [clang_rt.builtins-mips] Error 2make[2]: Leaving directory `/buildslave/rust-buildbot/slave/beta-dist-rustc-cross-linux/build/obj/mips-unknown-linux-gnu/rt/compiler-rt'
make[1]: Leaving directory `/buildslave/rust-buildbot/slave/beta-dist-rustc-cross-linux/build/obj/mips-unknown-linux-gnu/rt/compiler-rt'

make: *** [mips-unknown-linux-gnu/rt/libcompiler-rt.a] Error 2

As a result I'm nominating for beta and tagging beta-accepted as well to unbreak the build

@alexcrichton alexcrichton added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Jul 27, 2016
brson added a commit that referenced this pull request Jul 27, 2016
@brson brson removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jul 27, 2016
pmatos pushed a commit to LinkiTools/rust that referenced this pull request Sep 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants