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

add support for mips-uclibc targets #361

Closed
japaric opened this Issue Aug 19, 2016 · 3 comments

Comments

Projects
None yet
3 participants
@japaric
Member

japaric commented Aug 19, 2016

These targets landed in rust-lang/rust#35734 but this crate doesn't properly support them. This
issue tracks adding support for them. Where "adding support" means updating the function signatures
and definition of "constants" (probably via new cfg blocks/code) to make the libc-ctest test suite
pass for these targets.

Here are instructions on how to run said test suite:

I've created a docker image (*) with all the stuff needed (e.g. cross toolchain) to run the test
suite. Launch a container with this image using the following command:

$ docker run --privileged -it japaric/rust-uclibc:2016-08-17

Then, inside docker container run this command:

$ curl -sL https://raw.githubusercontent.com/japaric/docker/master/rust-uclibc/libc-ctest.sh | bash -s -- $TARGET

(where $TARGET is mips-unknown-linux-uclibc or mipsel-unknown-linux-uclibc).

To cross compile std for $TARGET and to run the libc-test test suite. The test suite will fail
and then you'll be back to the shell. The libc crate will be available in ~/libc. That libc
checkout would have to be modified until the test passes. To run the libc-test test suite again run
these commands:

$ cd ~/lib/libc-test
$ cargo run --target $TARGET

UPDATE: The image is now up. Disregard the note below.


(*) NOTE: I'm still uploading the image and it may take a while. In the meantime you can build the image
yourself with these command (it will take a while):

$ git clone --depth 1 https://github.com/japaric/docker
$ cd docker
$ docker build -t $IMAGE_NAME:$IMAGE_TAG -f Dockerfile ..

cc @felixalias

@felixalias

This comment has been minimized.

Show comment
Hide comment
@felixalias

felixalias Aug 19, 2016

This is awesome - thanks for doing all of this for a relatively exotic platform!! 💯

felixalias commented Aug 19, 2016

This is awesome - thanks for doing all of this for a relatively exotic platform!! 💯

@japaric

This comment has been minimized.

Show comment
Hide comment
@japaric

japaric Aug 19, 2016

Member

I forgot to paste the errors I got from running this. For further reference: gist

Member

japaric commented Aug 19, 2016

I forgot to paste the errors I got from running this. For further reference: gist

Susurrus pushed a commit to Susurrus/libc that referenced this issue Mar 26, 2017

Auto merge of rust-lang#361 - fiveop:missing_signals, r=@kamalmarhubi
Add missing signals.

In preparation of turning them into an enumeration.

Susurrus pushed a commit to Susurrus/libc that referenced this issue Mar 26, 2017

Auto merge of rust-lang#362 - fiveop:signal_enum, r=posborne
Signal enum

This is work in progress. I post this pull request as a request for discussion. I mark the lines I have doubts or ideas about.

Ignore the first commit. It is the same as PR rust-lang#361, which I wanted to base this change off.

bors added a commit that referenced this issue May 8, 2017

Auto merge of #578 - cactorium:master, r=alexcrichton
Steps towards support for musl-unknown-linux-uclibc

Hello! I've been working towards resolving #361 , this PR compiles successfully with a newish compiler (with some minor fixes in `gcc`, `ctest`), and all the tests pass for `libc-ctest`. Basically most of the undefined functions, constants, and structs were just removed from the ctest, and then any constants that weren't correct were fixed. Would it make more sense to conditionally remove them from libc? I wasn't sure when it was appropriate to skip the test for it instead of removing the function/constants, so I just removed all the tests for now because that was a little easier than hunting them down. I'm also guessing the way some of the constants were conditionally set wasn't the correct style, would you guys have any advice on how to do it more correctly? Lemme know how it looks!
@alexcrichton

This comment has been minimized.

Show comment
Hide comment
@alexcrichton

alexcrichton May 25, 2017

Member

I believe initial support has been added!

Member

alexcrichton commented May 25, 2017

I believe initial support has been added!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment