Skip to content

Add support for aarch64-unknown-linux-musl #782

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

Merged
merged 1 commit into from
Sep 25, 2017
Merged

Conversation

tjkirch
Copy link
Contributor

@tjkirch tjkirch commented Sep 25, 2017

This adds support for aarch64-unknown-linux-musl as requested in rust-lang/rust#44779 by @alexcrichton

The new file ci/docker/aarch64-unknown-linux-musl/Dockerfile essentially merges the aarch64-unknown-linux-gnu and x86_64-unknown-linux-musl Dockerfiles.

The bigger changes are under src/unix/notbsd/linux/, though they're fairly superficial:

Previously, some constants could be shared between all 64-bit musl triples, but aarch64 differs, so a number of things were moved from musl/b64/mod.rs to specific arches: musl/b64/powerpc64.rs and musl/b64/x86_64.rs, with the aarch64-specific differences being added to musl/b64/aarch64.rs.

Similarly, some constants moved from musl/mod.rs to lower levels: musl/b32/mod.rs, musl/b64/powerpc64.rs, and musl/b64/x86_64.rs, with the aarch64-specific differences added to musl/b64/aarch64.rs.

Finally, some things that were true of all Linux builds moved from mod.rs into lower levels: mips/mod.rs, other/mod.rs, musl/b32/mod.rs, musl/b64/powerpc64.rs, and musl/b64/x86_64.rs, with the aarch64-specific differences added to musl/b64/aarch64.rs.

Testing:

All linux-based triples under ci/docker were run through ci/run-docker.sh successfully, which checks that the size and alignment of definitions match for each triple, among other tests. (The local build of rust from rust-lang/rust#44779 was set for the aarch64-unknown-linux-musl build.)

I also confirmed that it has "good style!" according to ci/style.rs.

@alexcrichton
Copy link
Member

Nice!

If you want to back out the changes to src/lib.rs and .travis.yml into a separate PR I think we can land this right now and then we can land those other changes once the target has landed in upstream rust-lang/rust?

Signed-off-by: Tom Kirchner <[email protected]>
Signed-off-by: Ben Cressey <[email protected]>
@tjkirch
Copy link
Contributor Author

tjkirch commented Sep 25, 2017

@alexcrichton Done! When this is in, I'll send the PR for src/lib.rs and .travis.yml to enable the changes in CI. Thanks!

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Sep 25, 2017

📌 Commit b9fdcf9 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Sep 25, 2017

⌛ Testing commit b9fdcf9 with merge 5ee53b0...

bors added a commit that referenced this pull request Sep 25, 2017
Add support for aarch64-unknown-linux-musl

This adds support for aarch64-unknown-linux-musl as requested in rust-lang/rust#44779 by @alexcrichton

The new file `ci/docker/aarch64-unknown-linux-musl/Dockerfile` essentially merges the aarch64-unknown-linux-gnu and x86_64-unknown-linux-musl Dockerfiles.

The bigger changes are under `src/unix/notbsd/linux/`, though they're fairly superficial:

Previously, some constants could be shared between all 64-bit musl triples, but aarch64 differs, so a number of things were moved from `musl/b64/mod.rs` to specific arches: `musl/b64/powerpc64.rs` and `musl/b64/x86_64.rs`, with the aarch64-specific differences being added to `musl/b64/aarch64.rs`.

Similarly, some constants moved from `musl/mod.rs` to lower levels: `musl/b32/mod.rs`, `musl/b64/powerpc64.rs`, and `musl/b64/x86_64.rs`, with the aarch64-specific differences added to `musl/b64/aarch64.rs`.

Finally, some things that were true of all Linux builds moved from `mod.rs` into lower levels: `mips/mod.rs`, `other/mod.rs`, `musl/b32/mod.rs`, `musl/b64/powerpc64.rs`, and `musl/b64/x86_64.rs`, with the aarch64-specific differences added to `musl/b64/aarch64.rs`.

Testing:

All linux-based triples under `ci/docker` were run through `ci/run-docker.sh` successfully, which checks that the size and alignment of definitions match for each triple, among other tests.  (The local build of rust from rust-lang/rust#44779 was set for the aarch64-unknown-linux-musl build.)

I also confirmed that it has "good style!" according to `ci/style.rs`.
@bors
Copy link
Contributor

bors commented Sep 25, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: alexcrichton
Pushing 5ee53b0 to master...

@bors bors merged commit b9fdcf9 into rust-lang:master Sep 25, 2017
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

Successfully merging this pull request may close these issues.

3 participants