Skip to content

Commit 328946a

Browse files
Auto merge of #149962 - Gelbpunkt:powerpc64-musl-tier-2, r=<try>
Promote powerpc64-unknown-linux-musl to tier 2 with host tools try-job: dist-powerpc64-linux-gnu try-job: dist-powerpc64-linux-musl
2 parents 8188f6c + 624135b commit 328946a

File tree

10 files changed

+70
-9
lines changed

10 files changed

+70
-9
lines changed

compiler/rustc_target/src/spec/targets/powerpc64_unknown_linux_musl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ pub(crate) fn target() -> Target {
1717
llvm_target: "powerpc64-unknown-linux-musl".into(),
1818
metadata: TargetMetadata {
1919
description: Some("64-bit PowerPC Linux with musl 1.2.5".into()),
20-
tier: Some(3),
21-
host_tools: Some(false),
20+
tier: Some(2),
21+
host_tools: Some(true),
2222
std: Some(true),
2323
},
2424
pointer_width: 64,

src/bootstrap/src/core/build_steps/llvm.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ pub(crate) fn is_ci_llvm_available_for_target(
223223
("loongarch64-unknown-linux-musl", false),
224224
("powerpc-unknown-linux-gnu", false),
225225
("powerpc64-unknown-linux-gnu", false),
226+
("powerpc64-unknown-linux-musl", false),
226227
("powerpc64le-unknown-linux-gnu", false),
227228
("powerpc64le-unknown-linux-musl", false),
228229
("riscv64gc-unknown-linux-gnu", false),

src/bootstrap/src/core/download.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ pub(crate) fn is_download_ci_available(target_triple: &str, llvm_assertions: boo
460460
"loongarch64-unknown-linux-gnu",
461461
"powerpc-unknown-linux-gnu",
462462
"powerpc64-unknown-linux-gnu",
463+
"powerpc64-unknown-linux-musl",
463464
"powerpc64le-unknown-linux-gnu",
464465
"powerpc64le-unknown-linux-musl",
465466
"riscv64gc-unknown-linux-gnu",

src/ci/docker/host-x86_64/dist-powerpc64-linux/Dockerfile renamed to src/ci/docker/host-x86_64/dist-powerpc64-linux-gnu/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ RUN sh /scripts/rustbuild-setup.sh
1111
WORKDIR /tmp
1212

1313
COPY scripts/crosstool-ng-build.sh /scripts/
14-
COPY host-x86_64/dist-powerpc64-linux/powerpc64-linux-gnu.defconfig /tmp/crosstool.defconfig
14+
COPY host-x86_64/dist-powerpc64-linux-gnu/powerpc64-linux-gnu.defconfig /tmp/crosstool.defconfig
1515
RUN /scripts/crosstool-ng-build.sh
1616

1717
COPY scripts/sccache.sh /scripts/

src/ci/docker/host-x86_64/dist-powerpc64-linux/powerpc64-linux-gnu.defconfig renamed to src/ci/docker/host-x86_64/dist-powerpc64-linux-gnu/powerpc64-linux-gnu.defconfig

File renamed without changes.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
FROM ubuntu:22.04
2+
3+
COPY scripts/cross-apt-packages.sh /scripts/
4+
RUN sh /scripts/cross-apt-packages.sh
5+
6+
COPY scripts/crosstool-ng.sh /scripts/
7+
RUN sh /scripts/crosstool-ng.sh
8+
9+
COPY scripts/rustbuild-setup.sh /scripts/
10+
RUN sh /scripts/rustbuild-setup.sh
11+
12+
WORKDIR /tmp
13+
14+
COPY scripts/crosstool-ng-build.sh /scripts/
15+
COPY host-x86_64/dist-powerpc64-linux-musl/powerpc64-unknown-linux-musl.defconfig /tmp/crosstool.defconfig
16+
RUN /scripts/crosstool-ng-build.sh
17+
18+
COPY scripts/sccache.sh /scripts/
19+
RUN sh /scripts/sccache.sh
20+
21+
ENV PATH=$PATH:/x-tools/powerpc64-unknown-linux-musl/bin
22+
23+
ENV \
24+
AR_powerpc64_unknown_linux_musl=powerpc64-unknown-linux-musl-ar \
25+
CC_powerpc64_unknown_linux_musl=powerpc64-unknown-linux-musl-gcc \
26+
CXX_powerpc64_unknown_linux_musl=powerpc64-unknown-linux-musl-g++
27+
28+
ENV HOSTS=powerpc64-unknown-linux-musl
29+
30+
ENV RUST_CONFIGURE_ARGS \
31+
--enable-extended \
32+
--enable-full-tools \
33+
--enable-profiler \
34+
--enable-sanitizers \
35+
--disable-docs \
36+
--set target.powerpc64-unknown-linux-musl.crt-static=false \
37+
--musl-root-powerpc64=/x-tools/powerpc64-unknown-linux-musl/powerpc64-unknown-linux-musl/sysroot/usr
38+
39+
ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
CT_CONFIG_VERSION="4"
2+
CT_EXPERIMENTAL=y
3+
CT_PREFIX_DIR="/x-tools/${CT_TARGET}"
4+
CT_USE_MIRROR=y
5+
CT_MIRROR_BASE_URL="https://ci-mirrors.rust-lang.org/rustc"
6+
CT_ARCH_POWERPC=y
7+
CT_ARCH_64=y
8+
CT_ARCH_ABI="elfv2"
9+
# CT_DEMULTILIB is not set
10+
CT_KERNEL_LINUX=y
11+
CT_LINUX_V_4_19=y
12+
CT_LIBC_MUSL=y
13+
CT_MUSL_V_1_2_5=y
14+
CT_CC_LANG_CXX=y
15+
CT_GETTEXT_NEEDED=y

src/ci/github-actions/jobs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,10 @@ auto:
232232
- name: dist-powerpc-linux
233233
<<: *job-linux-4c
234234

235-
- name: dist-powerpc64-linux
235+
- name: dist-powerpc64-linux-gnu
236+
<<: *job-linux-4c
237+
238+
- name: dist-powerpc64-linux-musl
236239
<<: *job-linux-4c
237240

238241
- name: dist-powerpc64le-linux-gnu

src/doc/rustc/src/platform-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ target | notes
100100
[`i686-pc-windows-gnu`](platform-support/windows-gnu.md) | 32-bit MinGW (Windows 10+, Windows Server 2016+, Pentium 4) [^x86_32-floats-return-ABI] [^win32-msvc-alignment]
101101
`powerpc-unknown-linux-gnu` | PowerPC Linux (kernel 3.2+, glibc 2.17)
102102
`powerpc64-unknown-linux-gnu` | PPC64 Linux (kernel 3.2+, glibc 2.17)
103+
[`powerpc64-unknown-linux-musl`](platform-support/powerpc64-unknown-linux-musl.md) | PPC64 Linux (kernel 4.19+, musl 1.2.5)
103104
[`powerpc64le-unknown-linux-gnu`](platform-support/powerpc64le-unknown-linux-gnu.md) | PPC64LE Linux (kernel 3.10+, glibc 2.17)
104105
[`powerpc64le-unknown-linux-musl`](platform-support/powerpc64le-unknown-linux-musl.md) | PPC64LE Linux (kernel 4.19+, musl 1.2.5)
105106
[`riscv64gc-unknown-linux-gnu`](platform-support/riscv64gc-unknown-linux-gnu.md) | RISC-V Linux (kernel 4.20+, glibc 2.29)
@@ -369,7 +370,6 @@ target | std | host | notes
369370
[`powerpc-wrs-vxworks-spe`](platform-support/vxworks.md) | ✓ | |
370371
[`powerpc64-ibm-aix`](platform-support/aix.md) | ? | | 64-bit AIX (7.2 and newer)
371372
[`powerpc64-unknown-freebsd`](platform-support/freebsd.md) | ✓ | ✓ | PPC64 FreeBSD (ELFv2)
372-
[`powerpc64-unknown-linux-musl`](platform-support/powerpc64-unknown-linux-musl.md) | ✓ | ✓ | PPC64 Linux (kernel 4.19, musl 1.2.5)
373373
[`powerpc64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | OpenBSD/powerpc64
374374
[`powerpc64-wrs-vxworks`](platform-support/vxworks.md) | ✓ | |
375375
[`powerpc64le-unknown-freebsd`](platform-support/freebsd.md) | ✓ | ✓ | PPC64LE FreeBSD

src/doc/rustc/src/platform-support/powerpc64-unknown-linux-musl.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# powerpc64-unknown-linux-musl
22

3-
**Tier: 3**
3+
**Tier: 2**
44

55
Target for 64-bit big endian PowerPC Linux programs using musl libc.
66
This target uses the ELF v2 ABI.
77

8+
The baseline CPU required is a PowerPC 970, which means AltiVec is required and
9+
the oldest IBM server CPU supported is therefore POWER6.
10+
811
## Target maintainers
912

1013
[@Gelbpunkt](https://github.com/Gelbpunkt)
@@ -38,9 +41,8 @@ linker = "powerpc64-linux-musl-gcc"
3841

3942
## Building Rust programs
4043

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+
This target is distributed through `rustup`, and otherwise requires no
45+
special configuration.
4446

4547
## Cross-compilation
4648

0 commit comments

Comments
 (0)