Promote powerpc64-unknown-linux-musl to tier 2 with host tools

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
This commit is contained in:
Jens Reidel 2025-12-13 20:16:12 +01:00
parent 8188f6c808
commit 624135bd79
No known key found for this signature in database
10 changed files with 70 additions and 9 deletions

View file

@ -17,8 +17,8 @@ pub(crate) fn target() -> Target {
llvm_target: "powerpc64-unknown-linux-musl".into(),
metadata: TargetMetadata {
description: Some("64-bit PowerPC Linux with musl 1.2.5".into()),
tier: Some(3),
host_tools: Some(false),
tier: Some(2),
host_tools: Some(true),
std: Some(true),
},
pointer_width: 64,

View file

@ -223,6 +223,7 @@ pub(crate) fn is_ci_llvm_available_for_target(
("loongarch64-unknown-linux-musl", false),
("powerpc-unknown-linux-gnu", false),
("powerpc64-unknown-linux-gnu", false),
("powerpc64-unknown-linux-musl", false),
("powerpc64le-unknown-linux-gnu", false),
("powerpc64le-unknown-linux-musl", false),
("riscv64gc-unknown-linux-gnu", false),

View file

@ -460,6 +460,7 @@ pub(crate) fn is_download_ci_available(target_triple: &str, llvm_assertions: boo
"loongarch64-unknown-linux-gnu",
"powerpc-unknown-linux-gnu",
"powerpc64-unknown-linux-gnu",
"powerpc64-unknown-linux-musl",
"powerpc64le-unknown-linux-gnu",
"powerpc64le-unknown-linux-musl",
"riscv64gc-unknown-linux-gnu",

View file

@ -11,7 +11,7 @@ RUN sh /scripts/rustbuild-setup.sh
WORKDIR /tmp
COPY scripts/crosstool-ng-build.sh /scripts/
COPY host-x86_64/dist-powerpc64-linux/powerpc64-linux-gnu.defconfig /tmp/crosstool.defconfig
COPY host-x86_64/dist-powerpc64-linux-gnu/powerpc64-linux-gnu.defconfig /tmp/crosstool.defconfig
RUN /scripts/crosstool-ng-build.sh
COPY scripts/sccache.sh /scripts/

View file

@ -0,0 +1,39 @@
FROM ubuntu:22.04
COPY scripts/cross-apt-packages.sh /scripts/
RUN sh /scripts/cross-apt-packages.sh
COPY scripts/crosstool-ng.sh /scripts/
RUN sh /scripts/crosstool-ng.sh
COPY scripts/rustbuild-setup.sh /scripts/
RUN sh /scripts/rustbuild-setup.sh
WORKDIR /tmp
COPY scripts/crosstool-ng-build.sh /scripts/
COPY host-x86_64/dist-powerpc64-linux-musl/powerpc64-unknown-linux-musl.defconfig /tmp/crosstool.defconfig
RUN /scripts/crosstool-ng-build.sh
COPY scripts/sccache.sh /scripts/
RUN sh /scripts/sccache.sh
ENV PATH=$PATH:/x-tools/powerpc64-unknown-linux-musl/bin
ENV \
AR_powerpc64_unknown_linux_musl=powerpc64-unknown-linux-musl-ar \
CC_powerpc64_unknown_linux_musl=powerpc64-unknown-linux-musl-gcc \
CXX_powerpc64_unknown_linux_musl=powerpc64-unknown-linux-musl-g++
ENV HOSTS=powerpc64-unknown-linux-musl
ENV RUST_CONFIGURE_ARGS \
--enable-extended \
--enable-full-tools \
--enable-profiler \
--enable-sanitizers \
--disable-docs \
--set target.powerpc64-unknown-linux-musl.crt-static=false \
--musl-root-powerpc64=/x-tools/powerpc64-unknown-linux-musl/powerpc64-unknown-linux-musl/sysroot/usr
ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS

View file

@ -0,0 +1,15 @@
CT_CONFIG_VERSION="4"
CT_EXPERIMENTAL=y
CT_PREFIX_DIR="/x-tools/${CT_TARGET}"
CT_USE_MIRROR=y
CT_MIRROR_BASE_URL="https://ci-mirrors.rust-lang.org/rustc"
CT_ARCH_POWERPC=y
CT_ARCH_64=y
CT_ARCH_ABI="elfv2"
# CT_DEMULTILIB is not set
CT_KERNEL_LINUX=y
CT_LINUX_V_4_19=y
CT_LIBC_MUSL=y
CT_MUSL_V_1_2_5=y
CT_CC_LANG_CXX=y
CT_GETTEXT_NEEDED=y

View file

@ -232,7 +232,10 @@ auto:
- name: dist-powerpc-linux
<<: *job-linux-4c
- name: dist-powerpc64-linux
- name: dist-powerpc64-linux-gnu
<<: *job-linux-4c
- name: dist-powerpc64-linux-musl
<<: *job-linux-4c
- name: dist-powerpc64le-linux-gnu

View file

@ -100,6 +100,7 @@ target | notes
[`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]
`powerpc-unknown-linux-gnu` | PowerPC Linux (kernel 3.2+, glibc 2.17)
`powerpc64-unknown-linux-gnu` | PPC64 Linux (kernel 3.2+, glibc 2.17)
[`powerpc64-unknown-linux-musl`](platform-support/powerpc64-unknown-linux-musl.md) | PPC64 Linux (kernel 4.19+, musl 1.2.5)
[`powerpc64le-unknown-linux-gnu`](platform-support/powerpc64le-unknown-linux-gnu.md) | PPC64LE Linux (kernel 3.10+, glibc 2.17)
[`powerpc64le-unknown-linux-musl`](platform-support/powerpc64le-unknown-linux-musl.md) | PPC64LE Linux (kernel 4.19+, musl 1.2.5)
[`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
[`powerpc-wrs-vxworks-spe`](platform-support/vxworks.md) | ✓ | |
[`powerpc64-ibm-aix`](platform-support/aix.md) | ? | | 64-bit AIX (7.2 and newer)
[`powerpc64-unknown-freebsd`](platform-support/freebsd.md) | ✓ | ✓ | PPC64 FreeBSD (ELFv2)
[`powerpc64-unknown-linux-musl`](platform-support/powerpc64-unknown-linux-musl.md) | ✓ | ✓ | PPC64 Linux (kernel 4.19, musl 1.2.5)
[`powerpc64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | OpenBSD/powerpc64
[`powerpc64-wrs-vxworks`](platform-support/vxworks.md) | ✓ | |
[`powerpc64le-unknown-freebsd`](platform-support/freebsd.md) | ✓ | ✓ | PPC64LE FreeBSD

View file

@ -1,10 +1,13 @@
# powerpc64-unknown-linux-musl
**Tier: 3**
**Tier: 2**
Target for 64-bit big endian PowerPC Linux programs using musl libc.
This target uses the ELF v2 ABI.
The baseline CPU required is a PowerPC 970, which means AltiVec is required and
the oldest IBM server CPU supported is therefore POWER6.
## Target maintainers
[@Gelbpunkt](https://github.com/Gelbpunkt)
@ -38,9 +41,8 @@ linker = "powerpc64-linux-musl-gcc"
## Building Rust programs
Rust does not yet ship pre-compiled artifacts for this target. To compile for
this target, you will first need to build Rust with the target enabled (see
"Building the target" above).
This target is distributed through `rustup`, and otherwise requires no
special configuration.
## Cross-compilation