Skip to content

Commit f6bfdff

Browse files
authored
Rollup merge of #138905 - Gelbpunkt:powerpc64-unknown-linux-musl-maintainer, r=compiler-errors
Add target maintainer information for powerpc64-unknown-linux-musl We intend to fix the outstanding issues on the target and eventually promote it to tier 2. We have the capacity to maintain this target in the future and already perform regular builds of rustc for this target. Currently, all host tools except miri build fine, but I have a patch for libffi-sys to make miri also compile fine for this target that is [pending review](tov/libffi-rs#100). While at it, add an option for the musl root for this target. I also added a kernel version requirement, which is rather arbitrarily chosen, but it matches our tier 2 powerpc64le-unknown-linux-musl target so I think it is a good fit.
2 parents 2da6e4d + 1a8ddee commit f6bfdff

File tree

4 files changed

+59
-1
lines changed

4 files changed

+59
-1
lines changed

Diff for: src/bootstrap/configure.py

+5
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,11 @@ def v(*args):
249249
"target.mips64el-unknown-linux-muslabi64.musl-root",
250250
"mips64el-unknown-linux-muslabi64 install directory",
251251
)
252+
v(
253+
"musl-root-powerpc64",
254+
"target.powerpc64-unknown-linux-musl.musl-root",
255+
"powerpc64-unknown-linux-musl install directory",
256+
)
252257
v(
253258
"musl-root-powerpc64le",
254259
"target.powerpc64le-unknown-linux-musl.musl-root",

Diff for: src/doc/rustc/src/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
- [powerpc-unknown-linux-gnuspe](platform-support/powerpc-unknown-linux-gnuspe.md)
7474
- [powerpc-unknown-linux-muslspe](platform-support/powerpc-unknown-linux-muslspe.md)
7575
- [powerpc64-ibm-aix](platform-support/aix.md)
76+
- [powerpc64-unknown-linux-musl](platform-support/powerpc64-unknown-linux-musl.md)
7677
- [powerpc64le-unknown-linux-gnu](platform-support/powerpc64le-unknown-linux-gnu.md)
7778
- [powerpc64le-unknown-linux-musl](platform-support/powerpc64le-unknown-linux-musl.md)
7879
- [riscv32e\*-unknown-none-elf](platform-support/riscv32e-unknown-none-elf.md)

Diff for: src/doc/rustc/src/platform-support.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ target | std | host | notes
356356
[`powerpc-wrs-vxworks-spe`](platform-support/vxworks.md) | ✓ | |
357357
[`powerpc64-ibm-aix`](platform-support/aix.md) | ? | | 64-bit AIX (7.2 and newer)
358358
[`powerpc64-unknown-freebsd`](platform-support/freebsd.md) | ✓ | ✓ | PPC64 FreeBSD (ELFv2)
359-
`powerpc64-unknown-linux-musl` | ? | | 64-bit PowerPC Linux with musl 1.2.3
359+
[`powerpc64-unknown-linux-musl`](platform-support/powerpc64-unknown-linux-musl.md) | | | PPC64 Linux (kernel 4.19, musl 1.2.3)
360360
[`powerpc64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | OpenBSD/powerpc64
361361
[`powerpc64-wrs-vxworks`](platform-support/vxworks.md) | ✓ | |
362362
[`powerpc64le-unknown-freebsd`](platform-support/freebsd.md) | ✓ | ✓ | PPC64LE FreeBSD
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# powerpc64-unknown-linux-musl
2+
3+
**Tier: 3**
4+
5+
Target for 64-bit big endian PowerPC Linux programs using musl libc.
6+
This target uses the ELF v2 ABI.
7+
8+
## Target maintainers
9+
10+
- [@Gelbpunkt](https://github.com/Gelbpunkt)
11+
- [@famfo](https://github.com/famfo)
12+
- [@neuschaefer](https://github.com/neuschaefer)
13+
14+
## Requirements
15+
16+
Building the target itself requires a 64-bit big endian PowerPC compiler that
17+
is supported by `cc-rs`.
18+
19+
## Building the target
20+
21+
The target can be built by enabling it for a `rustc` build.
22+
23+
```toml
24+
[build]
25+
target = ["powerpc64-unknown-linux-musl"]
26+
```
27+
28+
Make sure your C compiler is included in `$PATH`, then add it to the
29+
`bootstrap.toml`:
30+
31+
```toml
32+
[target.powerpc64-unknown-linux-musl]
33+
cc = "powerpc64-linux-musl-gcc"
34+
cxx = "powerpc64-linux-musl-g++"
35+
ar = "powerpc64-linux-musl-ar"
36+
linker = "powerpc64-linux-musl-gcc"
37+
```
38+
39+
## Building Rust programs
40+
41+
Rust does not yet ship pre-compiled artifacts for this target. To compile for
42+
this target, you will first need to build Rust with the target enabled (see
43+
"Building the target" above).
44+
45+
## Cross-compilation
46+
47+
This target can be cross-compiled from any host.
48+
49+
## Testing
50+
51+
This target can be tested as normal with `x.py` on a 64-bit big endian PowerPC
52+
host or via QEMU emulation.

0 commit comments

Comments
 (0)