Skip to content

Commit

Permalink
CI: add powerpc64le-unknown-linux-gnu as a target
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Richter <erichte@linux.ibm.com>
  • Loading branch information
erichte-ibm authored and briansmith committed Oct 1, 2023
1 parent c163528 commit 3161c01
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ jobs:
- i686-pc-windows-msvc
- i686-unknown-linux-gnu
- i686-unknown-linux-musl
- powerpc64le-unknown-linux-gnu
- riscv64gc-unknown-linux-gnu
- x86_64-pc-windows-gnu
- x86_64-pc-windows-msvc
Expand Down Expand Up @@ -248,6 +249,9 @@ jobs:
- target: i686-unknown-linux-musl
host_os: ubuntu-22.04

- target: powerpc64le-unknown-linux-gnu
host_os: ubuntu-22.04

- target: riscv64gc-unknown-linux-gnu
host_os: ubuntu-22.04

Expand Down Expand Up @@ -337,6 +341,7 @@ jobs:
target:
- aarch64-unknown-linux-musl
- i686-pc-windows-msvc
- powerpc64le-unknown-linux-gnu
- x86_64-unknown-linux-gnu

mode:
Expand All @@ -354,6 +359,9 @@ jobs:
- target: i686-pc-windows-msvc
host_os: windows-latest

- target: powerpc64le-unknown-linux-gnu
host_os: ubuntu-22.04

- target: x86_64-unknown-linux-gnu
host_os: ubuntu-22.04

Expand Down Expand Up @@ -487,6 +495,7 @@ jobs:
target:
- aarch64-unknown-linux-gnu
- i686-unknown-linux-gnu
- powerpc64le-unknown-linux-gnu
- riscv64gc-unknown-linux-gnu
- x86_64-unknown-linux-musl

Expand All @@ -511,6 +520,9 @@ jobs:
- target: i686-unknown-linux-gnu
host_os: ubuntu-22.04

- target: powerpc64le-unknown-linux-gnu
host_os: ubuntu-22.04

- target: riscv64gc-unknown-linux-gnu
host_os: ubuntu-22.04

Expand Down
8 changes: 8 additions & 0 deletions mk/cargo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ rustflags_self_contained="-Clink-self-contained=yes -Clinker=rust-lld"
qemu_aarch64="qemu-aarch64 -L /usr/aarch64-linux-gnu"
qemu_arm="qemu-arm -L /usr/arm-linux-gnueabihf"
qemu_mipsel="qemu-mipsel -L /usr/mipsel-linux-gnu"
qemu_powerpc64le="qemu-ppc64le -L /usr/powerpc64le-linux-gnu"
qemu_riscv64="qemu-riscv64 -L /usr/riscv64-linux-gnu"

# Avoid putting the Android tools in `$PATH` because there are tools in this
Expand Down Expand Up @@ -100,6 +101,13 @@ case $target in
export CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_GNU_LINKER=mipsel-linux-gnu-gcc
export CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_GNU_RUNNER="$qemu_mipsel"
;;
powerpc64le-unknown-linux-gnu)
export CC_powerpc64le_unknown_linux_gnu=clang-$llvm_version
export AR_powerpc64le_unknown_linux_gnu=llvm-ar-$llvm_version
export CFLAGS_powerpc64le_unknown_linux_gnu="--sysroot=/usr/powerpc64le-linux-gnu"
export CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_LINKER=powerpc64le-linux-gnu-gcc
export CARGO_TARGET_POWERPC64LE_UNKNOWN_LINUX_GNU_RUNNER="$qemu_powerpc64le"
;;
riscv64gc-unknown-linux-gnu)
export CC_riscv64gc_unknown_linux_gnu=clang-$llvm_version
export AR_riscv64gc_unknown_linux_gnu=llvm-ar-$llvm_version
Expand Down
7 changes: 7 additions & 0 deletions mk/install-build-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ case $target in
libc6-dev-mipsel-cross \
qemu-user
;;
--target=powerpc64le-unknown-linux-gnu)
use_clang=1
install_packages \
gcc-powerpc64le-linux-gnu \
libc6-dev-ppc64el-cross \
qemu-user
;;
--target=riscv64gc-unknown-linux-gnu)
use_clang=1
install_packages \
Expand Down

0 comments on commit 3161c01

Please sign in to comment.