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

add support for mips-uclibc targets #361

Closed
japaric opened this issue Aug 19, 2016 · 5 comments
Closed

add support for mips-uclibc targets #361

japaric opened this issue Aug 19, 2016 · 5 comments

Comments

@japaric
Copy link
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

@ghost
Copy link

ghost commented Aug 19, 2016

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

@japaric
Copy link
Member Author

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
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
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
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
Copy link
Member

I believe initial support has been added!

@theronic
Copy link

@japaric when I run curl -sL https://raw.githubusercontent.com/japaric/docker/master/rust-uclibc/libc-ctest.sh | bash -s -- mipsel-unknown-linux-uclibc, it can't find your libc repo:

try  + git clone --branch uclibc https://github.com/japaric/libc /home/rust/libc
Cloning into '/home/rust/libc'...
Username for 'https://github.com':

@gnzlbg
Copy link
Contributor

gnzlbg commented Feb 12, 2019

FYI we have no uclib tests upstream of any kind, so uclib support might not compile anymore. If anyone has an easy way to at least compile these targets using Xargo an script that does that would be awesome.

danielverkamp pushed a commit to danielverkamp/libc that referenced this issue Apr 28, 2020
This exposes access to the `grow_memory` and `current_memory` instructions
provided by wasm in what will hopefully be a stable interface (the stable part
being x86 first in theory).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants