From 24c675a18b04919a43071fd82229554d66d16f65 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 19 Jan 2025 03:14:04 +0900 Subject: [PATCH] Support linux-musl, i686-windows-gnu, riscv64-freebsd, and sparc64-openbsd on AArch64 host --- .github/workflows/base.yml | 57 ++++++++++++++++++++++---- .github/workflows/ci.yml | 29 ++++++++------ README.md | 82 ++++++++++++++++++-------------------- tools/build-docker.sh | 58 +++++++-------------------- tools/docker-manifest.sh | 46 ++++++--------------- 5 files changed, 132 insertions(+), 140 deletions(-) diff --git a/.github/workflows/base.yml b/.github/workflows/base.yml index 838f0b0..e81b2bf 100644 --- a/.github/workflows/base.yml +++ b/.github/workflows/base.yml @@ -7,7 +7,6 @@ on: # pull_request: push: # branches: - # - main # - dev tags: - 'base-[0-9]+-[0-9]+-[0-9]+' @@ -31,28 +30,70 @@ jobs: include: # Linux (musl) - target: aarch64-unknown-linux-musl + - target: aarch64-unknown-linux-musl + os: ubuntu-24.04-arm + - target: arm-unknown-linux-musleabi - target: arm-unknown-linux-musleabi + os: ubuntu-24.04-arm + - target: arm-unknown-linux-musleabihf - target: arm-unknown-linux-musleabihf + os: ubuntu-24.04-arm - target: armv5te-unknown-linux-musleabi + - target: armv5te-unknown-linux-musleabi + os: ubuntu-24.04-arm + - target: armv7-unknown-linux-musleabi - target: armv7-unknown-linux-musleabi + os: ubuntu-24.04-arm + - target: armv7-unknown-linux-musleabihf - target: armv7-unknown-linux-musleabihf + os: ubuntu-24.04-arm - target: hexagon-unknown-linux-musl # tier3 - target: i586-unknown-linux-musl + - target: i586-unknown-linux-musl + os: ubuntu-24.04-arm + - target: i686-unknown-linux-musl - target: i686-unknown-linux-musl + os: ubuntu-24.04-arm # - target: loongarch64-unknown-linux-musl # musl-cross-make doesn't support this target - target: mips-unknown-linux-musl # tier3 + - target: mips-unknown-linux-musl # tier3 + os: ubuntu-24.04-arm - target: mips64-unknown-linux-muslabi64 # tier3 + - target: mips64-unknown-linux-muslabi64 # tier3 + os: ubuntu-24.04-arm + - target: mips64el-unknown-linux-muslabi64 # tier3 - target: mips64el-unknown-linux-muslabi64 # tier3 + os: ubuntu-24.04-arm - target: mipsel-unknown-linux-musl # tier3 + - target: mipsel-unknown-linux-musl # tier3 + os: ubuntu-24.04-arm + - target: powerpc-unknown-linux-musl # tier3 - target: powerpc-unknown-linux-musl # tier3 + os: ubuntu-24.04-arm + - target: powerpc-unknown-linux-muslspe # tier3 - target: powerpc-unknown-linux-muslspe # tier3 + os: ubuntu-24.04-arm - target: powerpc64-unknown-linux-musl # tier3 - - target: powerpc64le-unknown-linux-musl # tier3 + - target: powerpc64-unknown-linux-musl # tier3 + os: ubuntu-24.04-arm + - target: powerpc64le-unknown-linux-musl + - target: powerpc64le-unknown-linux-musl + os: ubuntu-24.04-arm + - target: riscv32gc-unknown-linux-musl # tier3 - target: riscv32gc-unknown-linux-musl # tier3 + os: ubuntu-24.04-arm - target: riscv64gc-unknown-linux-musl + - target: riscv64gc-unknown-linux-musl + os: ubuntu-24.04-arm + - target: s390x-unknown-linux-musl # tier3 - target: s390x-unknown-linux-musl # tier3 + os: ubuntu-24.04-arm + - target: thumbv7neon-unknown-linux-musleabihf # tier3 - target: thumbv7neon-unknown-linux-musleabihf # tier3 + os: ubuntu-24.04-arm - target: x86_64-unknown-linux-musl + - target: x86_64-unknown-linux-musl + os: ubuntu-24.04-arm # NetBSD - target: aarch64-unknown-netbsd # tier3 @@ -75,16 +116,18 @@ jobs: # Windows (MinGW) - target: i686-pc-windows-gnu + - target: i686-pc-windows-gnu + os: ubuntu-24.04-arm - target: x86_64-pc-windows-gnu - target: x86_64-pc-windows-gnu - host: aarch64 + os: ubuntu-24.04-arm # Misc - target: various - target: various - host: aarch64 + os: ubuntu-24.04-arm - runs-on: ubuntu-latest + runs-on: ${{ matrix.os || 'ubuntu-latest' }} timeout-minutes: 120 permissions: contents: read @@ -93,10 +136,10 @@ jobs: - uses: taiki-e/checkout-action@v1 - uses: taiki-e/github-actions/free-device-space@main - uses: taiki-e/github-actions/setup-docker@main + with: + qemu: false - run: | docker login ghcr.io -u "${{ github.actor }}" --password-stdin <<<"${{ secrets.GITHUB_TOKEN }}" printf 'PUSH_TO_GHCR=1\n' >>"${GITHUB_ENV}" if: github.repository_owner == 'taiki-e' && (github.event_name == 'push' && (github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') - run: docker/base/build-docker.sh "${{ matrix.target }}" - env: - HOST_ARCH: ${{ matrix.host }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 916b7d5..e2b2611 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,18 +40,22 @@ jobs: include: - target: linux-gnu - target: linux-gnu - host: aarch64 - # TODO(linux-musl): https://github.com/rust-lang/rust/pull/107129/ - # - target: linux-musl - # musl: '1.1' + os: ubuntu-24.04-arm - target: linux-musl - musl: '1.2' + - target: linux-musl + os: ubuntu-24.04-arm - target: linux-uclibc - target: android - target: freebsd + - target: freebsd + os: ubuntu-24.04-arm - target: netbsd - target: openbsd + - target: openbsd + os: ubuntu-24.04-arm + - target: dragonfly - target: dragonfly + os: ubuntu-24.04-arm # TODO: undefined reference to `__sysconf_xpg7'/'__xnet7_socket' # - target: solaris - target: illumos @@ -59,17 +63,17 @@ jobs: # - target: fuchsia - target: wasi - target: wasi - host: aarch64 + os: ubuntu-24.04-arm - target: emscripten - target: emscripten - host: aarch64 + os: ubuntu-24.04-arm - target: windows-gnu - target: windows-gnu - host: aarch64 + os: ubuntu-24.04-arm - target: none - target: none - host: aarch64 - runs-on: ubuntu-latest + os: ubuntu-24.04-arm + runs-on: ${{ matrix.os || 'ubuntu-latest' }} timeout-minutes: 150 permissions: contents: read @@ -78,14 +82,13 @@ jobs: - uses: taiki-e/checkout-action@v1 - uses: taiki-e/github-actions/free-device-space@main - uses: taiki-e/github-actions/setup-docker@main + with: + qemu: false - run: | docker login ghcr.io -u "${{ github.actor }}" --password-stdin <<<"${{ secrets.GITHUB_TOKEN }}" printf 'PUSH_TO_GHCR=1\n' >>"${GITHUB_ENV}" if: github.repository_owner == 'taiki-e' && (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') - run: tools/build-docker.sh "${{ matrix.target }}" - env: - HOST_ARCH: ${{ matrix.host }} - MUSL_VERSION: ${{ matrix.musl }} manifest: if: github.repository_owner == 'taiki-e' && github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) diff --git a/README.md b/README.md index 53f8b65..c50cc31 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ See also [setup-cross-toolchain-action](https://github.com/taiki-e/setup-cross-t | target | glibc | GCC | host | | ------ | ----- | --- | ---- | -| `aarch64-unknown-linux-gnu` | 2.27 (x86_64 host) / host (aarch64 host) | 7.4.0 (x86_64 host) / host (aarch64 host) | x86_64 Linux (glibc 2.27+) | +| `aarch64-unknown-linux-gnu` | 2.27 (x86_64 host) / host (aarch64 host) | 7.4.0 (x86_64 host) / host (aarch64 host) | x86_64/aarch64 Linux (glibc 2.27+) | | `aarch64_be-unknown-linux-gnu` (tier3) | 2.31 | 10.2.1 | x86_64 Linux (glibc 2.27+) | | `arm-unknown-linux-gnueabi` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) | | `arm-unknown-linux-gnueabihf` | 2.24 | 9.4.0 | x86_64/aarch64 Linux (glibc 2.27+) | @@ -49,28 +49,28 @@ See also [setup-cross-toolchain-action](https://github.com/taiki-e/setup-cross-t | `armv5te-unknown-linux-gnueabi` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) | | `armv7-unknown-linux-gnueabi` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) | | `armv7-unknown-linux-gnueabihf` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) | -| `csky-unknown-linux-gnuabiv2` | 2.28 | 6.3.0 | x86_64/aarch64 Linux (glibc 2.27+) | -| `csky-unknown-linux-gnuabiv2hf` | 2.28 | 6.3.0 | x86_64/aarch64 Linux (glibc 2.27+) | +| `csky-unknown-linux-gnuabiv2` | 2.28 | 6.3.0 | x86_64 Linux (glibc 2.27+) | +| `csky-unknown-linux-gnuabiv2hf` | 2.28 | 6.3.0 | x86_64 Linux (glibc 2.27+) | | `i586-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) | | `i686-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) | | `loongarch64-unknown-linux-gnu` | 2.40 | 14.2.0 | x86_64 Linux (any libc) | -| `mips-unknown-linux-gnu` (tier3) [1] | 2.27 (x86_64 host) / 2.35 (aarch64 host) | 7.4.0 (x86_64 host) / 11.2.0 (aarch64 host) | x86_64 Linux (glibc 2.27+) / aarch64 Linux (glibc 2.35+) | -| `mips64-unknown-linux-gnuabi64` (tier3) | 2.27 (x86_64 host) / 2.35 (aarch64 host) | 7.4.0 (x86_64 host) / 11.2.0 (aarch64 host) | x86_64 Linux (glibc 2.27+) / aarch64 Linux (glibc 2.35+) | -| `mips64el-unknown-linux-gnuabi64` (tier3) | 2.27 (x86_64 host) / 2.35 (aarch64 host) | 7.4.0 (x86_64 host) / 11.2.0 (aarch64 host) | x86_64 Linux (glibc 2.27+) / aarch64 Linux (glibc 2.35+) | -| `mipsel-unknown-linux-gnu` (tier3) [1] | 2.27 (x86_64 host) / 2.35 (aarch64 host) | 7.4.0 (x86_64 host) / 11.2.0 (aarch64 host) | x86_64 Linux (glibc 2.27+) / aarch64 Linux (glibc 2.35+) | -| `mipsisa32r6-unknown-linux-gnu` (tier3) | 2.31 (x86_64 host) / 2.35 (aarch64 host) | 9.3.0 (x86_64 host) / 11.2.0 (aarch64 host) | x86_64 Linux (glibc 2.31+) / aarch64 Linux (glibc 2.35+) | -| `mipsisa32r6el-unknown-linux-gnu` (tier3) | 2.31 (x86_64 host) / 2.35 (aarch64 host) | 9.3.0 (x86_64 host) / 11.2.0 (aarch64 host) | x86_64 Linux (glibc 2.31+) / aarch64 Linux (glibc 2.35+) | -| `mipsisa64r6-unknown-linux-gnuabi64` (tier3) | 2.31 (x86_64 host) / 2.35 (aarch64 host) | 9.3.0 (x86_64 host) / 11.2.0 (aarch64 host) | x86_64 Linux (glibc 2.31+) / aarch64 Linux (glibc 2.35+) | -| `mipsisa64r6el-unknown-linux-gnuabi64` (tier3) | 2.31 (x86_64 host) / 2.35 (aarch64 host) | 9.3.0 (x86_64 host) / 11.2.0 (aarch64 host) | x86_64 Linux (glibc 2.31+) / aarch64 Linux (glibc 2.35+) | -| `powerpc-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64 Linux (glibc 2.27+) | +| `mips-unknown-linux-gnu` (tier3) [1] | 2.27 (x86_64 host) / 2.35 (aarch64 host) | 7.4.0 (x86_64 host) / 11.2.0 (aarch64 host) | x86_64/aarch64 Linux (glibc 2.27+) / aarch64 Linux (glibc 2.35+) | +| `mips64-unknown-linux-gnuabi64` (tier3) | 2.27 (x86_64 host) / 2.35 (aarch64 host) | 7.4.0 (x86_64 host) / 11.2.0 (aarch64 host) | x86_64/aarch64 Linux (glibc 2.27+) / aarch64 Linux (glibc 2.35+) | +| `mips64el-unknown-linux-gnuabi64` (tier3) | 2.27 (x86_64 host) / 2.35 (aarch64 host) | 7.4.0 (x86_64 host) / 11.2.0 (aarch64 host) | x86_64/aarch64 Linux (glibc 2.27+) / aarch64 Linux (glibc 2.35+) | +| `mipsel-unknown-linux-gnu` (tier3) [1] | 2.27 (x86_64 host) / 2.35 (aarch64 host) | 7.4.0 (x86_64 host) / 11.2.0 (aarch64 host) | x86_64/aarch64 Linux (glibc 2.27+) / aarch64 Linux (glibc 2.35+) | +| `mipsisa32r6-unknown-linux-gnu` (tier3) | 2.31 (x86_64 host) / 2.35 (aarch64 host) | 9.3.0 (x86_64 host) / 11.2.0 (aarch64 host) | x86_64/aarch64 Linux (glibc 2.31+) / aarch64 Linux (glibc 2.35+) | +| `mipsisa32r6el-unknown-linux-gnu` (tier3) | 2.31 (x86_64 host) / 2.35 (aarch64 host) | 9.3.0 (x86_64 host) / 11.2.0 (aarch64 host) | x86_64/aarch64 Linux (glibc 2.31+) / aarch64 Linux (glibc 2.35+) | +| `mipsisa64r6-unknown-linux-gnuabi64` (tier3) | 2.31 (x86_64 host) / 2.35 (aarch64 host) | 9.3.0 (x86_64 host) / 11.2.0 (aarch64 host) | x86_64/aarch64 Linux (glibc 2.31+) / aarch64 Linux (glibc 2.35+) | +| `mipsisa64r6el-unknown-linux-gnuabi64` (tier3) | 2.31 (x86_64 host) / 2.35 (aarch64 host) | 9.3.0 (x86_64 host) / 11.2.0 (aarch64 host) | x86_64/aarch64 Linux (glibc 2.31+) / aarch64 Linux (glibc 2.35+) | +| `powerpc-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) | | `powerpc-unknown-linux-gnuspe` (tier3) | 2.27 | 7.4.0 | x86_64 Linux (glibc 2.27+) | | `powerpc64-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64 Linux (glibc 2.27+) | | `powerpc64le-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) | | `riscv32gc-unknown-linux-gnu` (tier3) | 2.33 | 11.1.0 | x86_64 Linux (glibc 2.27+) | | `riscv64gc-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) | | `s390x-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) | -| `sparc64-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64 Linux (glibc 2.27+) | -| `sparc-unknown-linux-gnu` (tier3) | 2.27 | 7.4.0 | x86_64 Linux (glibc 2.27+) | +| `sparc64-unknown-linux-gnu` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) | +| `sparc-unknown-linux-gnu` (tier3) | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) | | `thumbv7neon-unknown-linux-gnueabihf` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) | | `x86_64-unknown-linux-gnu` | host (x86_64 host) / 2.27 (aarch64 host) | host (x86_64 host) / 7.4.0 (aarch64 host) | x86_64/aarch64 Linux (glibc 2.27+) | | `x86_64-unknown-linux-gnux32` | 2.27 | 7.4.0 | x86_64/aarch64 Linux (glibc 2.27+) | @@ -96,27 +96,27 @@ See also [setup-cross-toolchain-action](https://github.com/taiki-e/setup-cross-t | target | host | | ------ | ---- | -| `aarch64-unknown-linux-musl` | x86_64 Linux (any libc) | -| `arm-unknown-linux-musleabi` | x86_64 Linux (any libc) | -| `arm-unknown-linux-musleabihf` | x86_64 Linux (any libc) | -| `armv5te-unknown-linux-musleabi` | x86_64 Linux (any libc) | -| `armv7-unknown-linux-musleabi` | x86_64 Linux (any libc) | -| `armv7-unknown-linux-musleabihf` | x86_64 Linux (any libc) | +| `aarch64-unknown-linux-musl` | x86_64/aarch64 Linux (any libc) | +| `arm-unknown-linux-musleabi` | x86_64/aarch64 Linux (any libc) | +| `arm-unknown-linux-musleabihf` | x86_64/aarch64 Linux (any libc) | +| `armv5te-unknown-linux-musleabi` | x86_64/aarch64 Linux (any libc) | +| `armv7-unknown-linux-musleabi` | x86_64/aarch64 Linux (any libc) | +| `armv7-unknown-linux-musleabihf` | x86_64/aarch64 Linux (any libc) | | `hexagon-unknown-linux-musl` (tier3) | x86_64 Linux (glibc 2.27+) | -| `i586-unknown-linux-musl` | x86_64 Linux (any libc) | -| `i686-unknown-linux-musl` | x86_64 Linux (any libc) | -| `mips-unknown-linux-musl` (tier3) | x86_64 Linux (any libc) | -| `mips64-unknown-linux-muslabi64` (tier3) | x86_64 Linux (any libc) | -| `mips64el-unknown-linux-muslabi64` (tier3) | x86_64 Linux (any libc) | -| `mipsel-unknown-linux-musl` (tier3) | x86_64 Linux (any libc) | -| `powerpc-unknown-linux-musl` (tier3) | x86_64 Linux (any libc) | -| `powerpc-unknown-linux-muslspe` (tier3) | x86_64 Linux (any libc) | -| `powerpc64le-unknown-linux-musl` | x86_64 Linux (any libc) | -| `riscv32gc-unknown-linux-musl` (tier3) | x86_64 Linux (any libc) | -| `riscv64gc-unknown-linux-musl` | x86_64 Linux (any libc) | -| `s390x-unknown-linux-musl` (tier3) | x86_64 Linux (any libc) | -| `thumbv7neon-unknown-linux-musleabihf` (tier3) | x86_64 Linux (any libc) | -| `x86_64-unknown-linux-musl` | x86_64 Linux (any libc) | +| `i586-unknown-linux-musl` | x86_64/aarch64 Linux (any libc) | +| `i686-unknown-linux-musl` | x86_64/aarch64 Linux (any libc) | +| `mips-unknown-linux-musl` (tier3) | x86_64/aarch64 Linux (any libc) | +| `mips64-unknown-linux-muslabi64` (tier3) | x86_64/aarch64 Linux (any libc) | +| `mips64el-unknown-linux-muslabi64` (tier3) | x86_64/aarch64 Linux (any libc) | +| `mipsel-unknown-linux-musl` (tier3) | x86_64/aarch64 Linux (any libc) | +| `powerpc-unknown-linux-musl` (tier3) | x86_64/aarch64 Linux (any libc) | +| `powerpc-unknown-linux-muslspe` (tier3) | x86_64/aarch64 Linux (any libc) | +| `powerpc64le-unknown-linux-musl` | x86_64/aarch64 Linux (any libc) | +| `riscv32gc-unknown-linux-musl` (tier3) | x86_64/aarch64 Linux (any libc) | +| `riscv64gc-unknown-linux-musl` | x86_64/aarch64 Linux (any libc) | +| `s390x-unknown-linux-musl` (tier3) | x86_64/aarch64 Linux (any libc) | +| `thumbv7neon-unknown-linux-musleabihf` (tier3) | x86_64/aarch64 Linux (any libc) | +| `x86_64-unknown-linux-musl` | x86_64/aarch64 Linux (any libc) | ### Linux (uClibc) @@ -176,7 +176,7 @@ See also [setup-cross-toolchain-action](https://github.com/taiki-e/setup-cross-t | `powerpc-unknown-freebsd` (tier3) | 13.4 (default), 14.1 | Linux (any arch, any libc) | | `powerpc64-unknown-freebsd` (tier3) | 13.4 (default), 14.1 | Linux (any arch, any libc) | | `powerpc64le-unknown-freebsd` (tier3) | 13.4 (default), 14.1 | Linux (any arch, any libc) | -| `riscv64gc-unknown-freebsd` (tier3) | 13.4 (default), 14.1 | x86_64 Linux (any libc) | +| `riscv64gc-unknown-freebsd` (tier3) | 13.4 (default), 14.1 | x86_64/aarch64 Linux (any libc) | | `x86_64-unknown-freebsd` | 12.4 (default), 13.4, 14.1 | Linux (any arch, any libc) | ### NetBSD @@ -224,7 +224,7 @@ See also [setup-cross-toolchain-action](https://github.com/taiki-e/setup-cross-t | `powerpc-unknown-openbsd` (tier3) | 7.5 (default), 7.6 | Linux (any arch, any libc) | | `powerpc64-unknown-openbsd` (tier3) | 7.5 (default), 7.6 | Linux (any arch, any libc) | | `riscv64gc-unknown-openbsd` (tier3) | 7.5 (default), 7.6 | Linux (any arch, any libc) | -| `sparc64-unknown-openbsd` (tier3) | 7.5 (default), 7.6 | x86_64 Linux (any libc) | +| `sparc64-unknown-openbsd` (tier3) | 7.5 (default), 7.6 | x86_64/aarch64 Linux (any libc) | | `x86_64-unknown-openbsd` (tier3) | 7.5 (default), 7.6 | Linux (any arch, any libc) | ### DragonFly BSD @@ -315,23 +315,19 @@ clang version and wasi-libc hash can be found here: https://github.com/WebAssemb | libc | GCC | Clang | C++ | test | host | | ---- | --- | ----- | --- | ---- | ---- | -| Mingw-w64 8.0.0 | 10.3.0 | host | ✓ (libstdc++) | ✓ (wine) | [1] | +| Mingw-w64 8.0.0 | 10.3.0 | host | ✓ (libstdc++) | ✓ (wine) | x86_64/aarch64 Linux (glibc 2.35+) | -[1] See target list below for details
- ([Dockerfile](docker/windows-gnu.Dockerfile)) **Supported targets:** -| target | host | -| ------ | ---- | -| `x86_64-pc-windows-gnu` | x86_64/aarch64 Linux (glibc 2.35+) | -| `i686-pc-windows-gnu` | x86_64 Linux (glibc 2.35+) | +- `x86_64-pc-windows-gnu` +- `i686-pc-windows-gnu` ### Windows (LLVM MinGW) diff --git a/tools/build-docker.sh b/tools/build-docker.sh index 6e0200a..bb34888 100755 --- a/tools/build-docker.sh +++ b/tools/build-docker.sh @@ -162,14 +162,14 @@ build() { } for target in "${targets[@]}"; do + # NB: When updating this, the reminder to update tools/update-manifest.sh. case "${target}" in *-linux-gnu*) ubuntu_version=18.04 - # NB: When updating this, the reminder to update tools/update-manifest.sh. case "${target}" in + # aarch64_be-*|armeb-*|arm-*hf|csky-*|loongarch64-*|riscv32*: Toolchains for these targets are not available on non-x86_64 host. + # powerpc64-*|powerpc-*spe: gcc-(powerpc64-linux-gnu|powerpc-linux-gnuspe) for arm64 host is not available on 24.04. aarch64_be-* | armeb-* | arm-*hf | csky-* | loongarch64-* | riscv32* | powerpc64-* | powerpc-*spe) - # aarch64_be-*|armeb-*|arm-*hf|csky-*|loongarch64-*|riscv32*: Toolchains for these targets are not available on non-x86_64 host. - # powerpc64-*|powerpc-*spe: gcc-(powerpc64-linux-gnu|powerpc-linux-gnuspe) for arm64 host is not available on 24.04. case "${arch}" in x86_64) ;; *) continue ;; @@ -201,24 +201,25 @@ for target in "${targets[@]}"; do --build-arg "DISTRO_VERSION=${ubuntu_version}" ;; *-linux-musl*) + case "${target}" in + # hexagon-*: Toolchains for these targets are not available on non-x86_64 host. + hexagon-*) + case "${arch}" in + x86_64) ;; + *) continue ;; + esac + ;; + esac if [[ -n "${MUSL_VERSION:-}" ]]; then musl_versions=("${MUSL_VERSION}") else # https://musl.libc.org/releases.html # https://github.com/rust-lang/libc/issues/1848 # NB: When updating this, the reminder to update docker/base/build-docker.sh and README.md. - musl_versions=("1.1" "1.2") + musl_versions=("1.2") fi - default_musl_version="1.1" + default_musl_version="1.2" for musl_version in "${musl_versions[@]}"; do - case "${target}" in - hexagon-* | powerpc-*spe | riscv32*) - default_musl_version="1.2" - if [[ "${musl_version}" != "${default_musl_version}" ]]; then - continue - fi - ;; - esac build "linux-musl" "${target}" "${musl_version}" "${default_musl_version}" \ --build-arg "MUSL_VERSION=${musl_version}" done @@ -232,19 +233,7 @@ for target in "${targets[@]}"; do build "android" "${target}" "${ndk_version}" "${default_ndk_version}" \ --build-arg "NDK_VERSION=${ndk_version}" ;; - *-macos*) build "macos" "${target}" ;; - *-ios*) build "ios" "${target}" ;; *-freebsd*) - case "${target}" in - riscv64*) - # riscv64 needs to build binutils from source. - # TODO: don't skip if actual host is arm64 - case "${arch}" in - x86_64) ;; - *) continue ;; - esac - ;; - esac if [[ -n "${FREEBSD_VERSION:-}" ]]; then freebsd_versions=("${FREEBSD_VERSION}") else @@ -303,16 +292,6 @@ for target in "${targets[@]}"; do done ;; *-openbsd*) - case "${target}" in - sparc64-*) - # sparc64 needs to build binutils from source. - # TODO: don't skip if actual host is arm64 - case "${arch}" in - x86_64) ;; - *) continue ;; - esac - ;; - esac if [[ -n "${OPENBSD_VERSION:-}" ]]; then openbsd_versions=("${OPENBSD_VERSION}") else @@ -355,15 +334,6 @@ for target in "${targets[@]}"; do esac ;; *-windows-gnu*) - case "${target}" in - # i686-pc-windows-gnu needs to build toolchain from source. - i686-pc-windows-gnu) - case "${arch}" in - x86_64) ;; - *) continue ;; - esac - ;; - esac case "${target}" in *-gnullvm*) build "windows-gnullvm" "${target}" ;; *) build "windows-gnu" "${target}" ;; diff --git a/tools/docker-manifest.sh b/tools/docker-manifest.sh index 4d3fbd3..9611abc 100755 --- a/tools/docker-manifest.sh +++ b/tools/docker-manifest.sh @@ -132,31 +132,26 @@ for target in "${targets[@]}"; do *-linux-gnu*) arches=(amd64 arm64v8) case "${target}" in - aarch64_be-* | armeb-* | arm-*hf | csky-* | loongarch64-* | riscv32* | powerpc64-* | powerpc-*spe) - # aarch64_be-*|armeb-*|arm-*hf|csky-*|loongarch64-*|riscv32*: Toolchains for these targets are not available on non-x86_64 host. - # powerpc64-*|powerpc-*spe: gcc-(powerpc64-linux-gnu|powerpc-linux-gnuspe) for arm64 host is not available on 24.04. - arches=(amd64) - ;; + # aarch64_be-*|armeb-*|arm-*hf|csky-*|loongarch64-*|riscv32*: Toolchains for these targets are not available on non-x86_64 host. + # powerpc64-*|powerpc-*spe: gcc-(powerpc64-linux-gnu|powerpc-linux-gnuspe) for arm64 host is not available on 24.04. + aarch64_be-* | armeb-* | arm-*hf | csky-* | loongarch64-* | riscv32* | powerpc64-* | powerpc-*spe) arches=(amd64) ;; esac docker_manifest "${target}" ;; *-linux-musl*) + arches=(amd64 arm64v8) + case "${target}" in + # hexagon-*: Toolchains for these targets are not available on non-x86_64 host. + hexagon-*) arches=(amd64) ;; + esac if [[ -n "${MUSL_VERSION:-}" ]]; then musl_versions=("${MUSL_VERSION}") else # NB: When updating this, the reminder to update tools/build-docker.sh. - musl_versions=("1.1" "1.2") + musl_versions=("1.2") fi - default_musl_version="1.1" + default_musl_version="1.2" for musl_version in "${musl_versions[@]}"; do - case "${target}" in - hexagon-* | powerpc-*spe | riscv32*) - default_musl_version="1.2" - if [[ "${musl_version}" != "${default_musl_version}" ]]; then - continue - fi - ;; - esac docker_manifest "${target}" "${musl_version}" "${default_musl_version}" done ;; @@ -167,15 +162,8 @@ for target in "${targets[@]}"; do ndk_version="${NDK_VERSION:-"${default_ndk_version}"}" docker_manifest "${target}" "${ndk_version}" "${default_ndk_version}" ;; - *-macos*) docker_manifest "${target}" ;; - *-ios*) docker_manifest "${target}" ;; *-freebsd*) - case "${target}" in - riscv64*) - # riscv64 needs to build binutils from source. - arches=(amd64) - ;; - esac + arches=(amd64 arm64v8) if [[ -n "${FREEBSD_VERSION:-}" ]]; then freebsd_versions=("${FREEBSD_VERSION}") else @@ -208,12 +196,7 @@ for target in "${targets[@]}"; do done ;; *-openbsd*) - case "${target}" in - sparc64-*) - # sparc64 needs to build binutils from source. - arches=(amd64) - ;; - esac + arches=(amd64 arm64v8) if [[ -n "${OPENBSD_VERSION:-}" ]]; then openbsd_versions=("${OPENBSD_VERSION}") else @@ -226,6 +209,7 @@ for target in "${targets[@]}"; do done ;; *-dragonfly*) + arches=(amd64 arm64v8) # NB: When updating this, the reminder to update tools/build-docker.sh. dragonfly_version="${DRAGONFLY_VERSION:-"6.4.0"}" default_dragonfly_version="6" @@ -245,10 +229,6 @@ for target in "${targets[@]}"; do ;; *-windows-gnu*) arches=(amd64 arm64v8) - case "${target}" in - # i686-pc-windows-gnu needs to build toolchain from source. - i686-pc-windows-gnu) arches=(amd64) ;; - esac docker_manifest "${target}" ;; *-none*)