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

Change mipsel-musl to soft float #34922

Closed
3 of 4 tasks
alexcrichton opened this issue Jul 19, 2016 · 9 comments
Closed
3 of 4 tasks

Change mipsel-musl to soft float #34922

alexcrichton opened this issue Jul 19, 2016 · 9 comments
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@alexcrichton
Copy link
Member

alexcrichton commented Jul 19, 2016

It was pointed out by @japaric that the mipsel-musl toolchain should use soft float like the mips-musl toolchain as almost all devices it targets all have soft float. Changing this will require a few pieces:

I'm gonna tag this as E-easy as it's pretty clear how to proceed, and I can help out anyone willing to do so! You even get to play around with our infrastructure a bit :)

@alexcrichton alexcrichton added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-tools labels Jul 19, 2016
@nagisa
Copy link
Member

nagisa commented Jul 19, 2016

Just to mirror what I said in the PR which spawned this issue, I’m against changing this target to soft-float before we collect information on what ABI conventional linux distributions, and not OpenWRT, use.

@nagisa
Copy link
Member

nagisa commented Jul 19, 2016

For what its worth, the Debian MIPS ports are all hard-float.

@alexcrichton
Copy link
Member Author

@nagisa perhaps yeah, but I believe that OpenWRT/@japaric are the primary users of mips-musl right now, as in we don't actually have any demand for mips-unknown-linux-musl that's not openwrt that I know of.

@alexcrichton
Copy link
Member Author

Ok, I've published alexcrichton/rust-slave-linux-cross:2016-07-19, the next step is to update it on the bots. I unfortunately just restarted the bots this morning due to some corrupt images. I'd like to try to land #34873 first to help along the LLVM upgrade to unblock MIR, but after that I can try to restart.

@japaric
Copy link
Member

japaric commented Jul 20, 2016

For what its worth, the Debian MIPS ports are all hard-float.

@nagisa, are those ports musl based or glibc based?

@nagisa
Copy link
Member

nagisa commented Jul 20, 2016

@japaric while Debian itself uses glibc, as the example of x86_64-unknown-linux-musl demonstrates, the -musl targets are better known as the targets which produce fully static binaries, rather than targets which target a certain kind of distribution.

I guess since musl is built-in and linked to statically, either soft and hard float will be correct… as long as the binary doesn’t link to any other library from the system. At that point the actual libc the distro is based on ends up not mattering much, but the FP ABI does.

@japaric
Copy link
Member

japaric commented Jul 20, 2016

@nagisa Ohh, I thought you were suggesting running mips-musl Rust binaries on a MIPS device running Debian.

the -musl targets are better known as the targets which produce fully static binaries

The mips(el)-musl Rust binaries are not statically linked though; they are dynamically linked to libc like pretty much every other target. Statically linked Rust binaries for MIPS are not currently possible because those binaries must be statically linked to libunwind, and libunwind doesn't support MIPS right now (or least it didn't last month -- I haven't been following its development closely).

@nagisa
Copy link
Member

nagisa commented Jul 20, 2016

Ohh, I thought you were suggesting running mips-musl Rust binaries on a MIPS device running Debian.

Yes, I was. I had produced a -musl binaries for various architectures that were supposed to run on some sort of Debian/Fedora/Arch in the past, and I’d expect a binary targeting mips-unknown-linux-musl to work on a generic MIPS distro such as Debian too. Making musl targets soft-float essentially breaks that use case.

I’d rather make my own mips-unknown-linux-musl target (just like I need to with ARM currently) when I need one and have rustc provide a mips-openwrt-linux-musl instead, in order to avoid the confusion.

TL;DR: pretty much all I’m unhappy about is the naming of soft-fp MIPS targets.

libunwind doesn't support MIPS right now (or least it didn't last month -- I haven't been following its development closely).

Which makes

… as long as the binary doesn’t link to any other library from the system. At that point the actual libc the distro is based on ends up not mattering much, but the FP ABI does.

FP ABI used matter all, rather than some of the time.

@bstrie bstrie added this to the Launch MIR into Orbit milestone Jul 20, 2016
@alexcrichton alexcrichton removed this from the Launch MIR into Orbit milestone Jul 21, 2016
@alexcrichton
Copy link
Member Author

Ok, buildbot is restarted, next patch should be good to land!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

5 participants