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

Feature request: aarch64-unknown-linux-musl and powerpc-unknown-linux-musl binaries #42520

Closed
ArcaneNibble opened this issue Jun 7, 2017 · 6 comments
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. O-linux Operating system: Linux O-musl Target: The musl libc O-PowerPC Target: PowerPC processors T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-core Relevant to the core team, which will review and decide on the PR/issue.

Comments

@ArcaneNibble
Copy link

Other Linux targets like ARM/x86/MIPS have -musl variants in addition to -gnu variants. It'd be nice to have this for PPC and AARCH64 as well.

@sanxiyn sanxiyn added the O-linux Operating system: Linux label Jun 9, 2017
@Mark-Simulacrum Mark-Simulacrum added C-feature-request Category: A feature request, i.e: not implemented / a PR. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-core Relevant to the core team, which will review and decide on the PR/issue. labels Jul 27, 2017
bors added a commit that referenced this issue Sep 27, 2017
Add aarch64-unknown-linux-musl target

This adds support for the aarch64-unknown-linux-musl target in the build and CI systems.

This addresses half of issue #42520.

The new file `aarch64_unknown_linux_musl.rs` is a copy of `aarch64_unknown_linux_gnu.rs` with "gnu" replaced by "musl", and the added logic in `build-arm-musl.sh` is similarly a near-copy of the arches around it, so overall the changes were straightforward.

Testing:

```
$ sudo ./src/ci/docker/run.sh cross
...
Dist std stage2 (x86_64-unknown-linux-gnu -> aarch64-unknown-linux-musl)
Building stage2 test artifacts (x86_64-unknown-linux-gnu -> aarch64-unknown-linux-musl)
   Compiling getopts v0.2.14
   Compiling term v0.0.0 (file:///checkout/src/libterm)
   Compiling test v0.0.0 (file:///checkout/src/libtest)
    Finished release [optimized] target(s) in 16.91 secs
Copying stage2 test from stage2 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / aarch64-unknown-linux-musl)
...
Build completed successfully in 0:55:22
```

```
$ rustup toolchain link local obj/build/x86_64-unknown-linux-gnu/stage2
$ rustup default local
```

After setting the local toolchain as default, and adding this in ~/.cargo/config:

```
[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-musl-gcc"
```

...then the toolchain was able to build a working ripgrep as a test:

```
$ readelf -a target/aarch64-unknown-linux-musl/debug/rg | grep -i interpreter
$ readelf -a target/aarch64-unknown-linux-musl/debug/rg | grep NEEDED
$ file target/aarch64-unknown-linux-musl/debug/rg
target/aarch64-unknown-linux-musl/debug/rg: ELF 64-bit LSB executable, ARM aarch64, version 1 (GNU/Linux), statically linked, BuildID[sha1]=be11036b0988fac5dccc9f6487eb780b05186582, not stripped
```
bors added a commit that referenced this issue Sep 28, 2017
Add aarch64-unknown-linux-musl target

This adds support for the aarch64-unknown-linux-musl target in the build and CI systems.

This addresses half of issue #42520.

The new file `aarch64_unknown_linux_musl.rs` is a copy of `aarch64_unknown_linux_gnu.rs` with "gnu" replaced by "musl", and the added logic in `build-arm-musl.sh` is similarly a near-copy of the arches around it, so overall the changes were straightforward.

Testing:

```
$ sudo ./src/ci/docker/run.sh cross
...
Dist std stage2 (x86_64-unknown-linux-gnu -> aarch64-unknown-linux-musl)
Building stage2 test artifacts (x86_64-unknown-linux-gnu -> aarch64-unknown-linux-musl)
   Compiling getopts v0.2.14
   Compiling term v0.0.0 (file:///checkout/src/libterm)
   Compiling test v0.0.0 (file:///checkout/src/libtest)
    Finished release [optimized] target(s) in 16.91 secs
Copying stage2 test from stage2 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / aarch64-unknown-linux-musl)
...
Build completed successfully in 0:55:22
```

```
$ rustup toolchain link local obj/build/x86_64-unknown-linux-gnu/stage2
$ rustup default local
```

After setting the local toolchain as default, and adding this in ~/.cargo/config:

```
[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-musl-gcc"
```

...then the toolchain was able to build a working ripgrep as a test:

```
$ readelf -a target/aarch64-unknown-linux-musl/debug/rg | grep -i interpreter
$ readelf -a target/aarch64-unknown-linux-musl/debug/rg | grep NEEDED
$ file target/aarch64-unknown-linux-musl/debug/rg
target/aarch64-unknown-linux-musl/debug/rg: ELF 64-bit LSB executable, ARM aarch64, version 1 (GNU/Linux), statically linked, BuildID[sha1]=be11036b0988fac5dccc9f6487eb780b05186582, not stripped
```
@smaeul
Copy link
Contributor

smaeul commented Mar 23, 2019

Both of these have been merged (as well as powerpc64 and powerpc64le). Can this be closed?

@jonas-schievink
Copy link
Contributor

@smaeul PowerPC seems to only have GNU targets, this is about adding musl targets. #45422 was closed, unfortunately, but feel free to revive that!

@jonas-schievink jonas-schievink added O-PowerPC Target: PowerPC processors O-musl Target: The musl libc labels Mar 23, 2019
@jonas-schievink
Copy link
Contributor

@smaeul Oh, interesting. According to https://forge.rust-lang.org/platform-support.html they're not supported, but the forge is often outdated. Closing as fixed.

@halvors
Copy link

halvors commented Jan 17, 2023

What happened to this feature request? Seems this was left as a tier 3 target? See #106932

@workingjubilee
Copy link
Member

Please do not try to resume conversations on long-closed issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. O-linux Operating system: Linux O-musl Target: The musl libc O-PowerPC Target: PowerPC processors T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-core Relevant to the core team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants