add support for mips-uclibc targets #361

Open
japaric opened this Issue Aug 19, 2016 · 2 comments

Projects

None yet

2 participants

@japaric
Member
japaric commented Aug 19, 2016 edited

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 is awesome - thanks for doing all of this for a relatively exotic platform!! 💯

@japaric
Member
japaric commented Aug 19, 2016

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

@japaric japaric referenced this issue in rust-embedded/rfcs Sep 29, 2016
Open

Support more OpenWRT devices #4

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