From c889945e7e5534b7c98b242072801d89cffded9c Mon Sep 17 00:00:00 2001 From: Feng Yu Date: Mon, 14 Mar 2022 22:43:39 +0800 Subject: [PATCH] Add mips64-unknown-linux-muslabi64 and mips64el-unknown-linux-muslabi64 support Fix #503 --- .github/workflows/ci.yml | 92 ++++++++++--------- CHANGELOG.md | 1 + .../Dockerfile.mips64-unknown-linux-muslabi64 | 30 ++++++ ...ockerfile.mips64el-unknown-linux-muslabi64 | 30 ++++++ 4 files changed, 108 insertions(+), 45 deletions(-) create mode 100644 docker/Dockerfile.mips64-unknown-linux-muslabi64 create mode 100644 docker/Dockerfile.mips64el-unknown-linux-muslabi64 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63ecedcfd..4cb36f253 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,49 +86,51 @@ jobs: fail-fast: false matrix: include: - - { target: x86_64-apple-darwin, os: macos-latest, cpp: 1, dylib: 1, std: 1, run: 1, deploy: true } - - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: native qemu-user qemu-system, deploy: true } - - { target: x86_64-unknown-linux-musl, os: ubuntu-latest, std: 1, run: 1, deploy: true } - - { target: x86_64-pc-windows-msvc, os: windows-latest, cpp: 1, std: 1, run: 1, deploy: true } - - - { target: aarch64-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system } - - { target: arm-unknown-linux-gnueabi, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1 } - - { target: arm-unknown-linux-gnueabihf, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1 } - - { target: armv7-unknown-linux-gnueabihf, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system } - - { target: i586-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1 } - - { target: i686-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: native qemu-user qemu-system } - - { target: mips-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system } - - { target: mipsel-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system } - - { target: mips64-unknown-linux-gnuabi64, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1 } - - { target: mips64el-unknown-linux-gnuabi64, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system } - - { target: powerpc-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system } - - { target: powerpc64-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system } - - { target: powerpc64le-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system } - - { target: riscv64gc-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } - - { target: s390x-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-system } - - { target: sparc64-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-system } - - { target: aarch64-unknown-linux-musl, os: ubuntu-latest, std: 1, run: 1 } - - { target: arm-unknown-linux-musleabihf, os: ubuntu-latest, std: 1, run: 1 } - - { target: arm-unknown-linux-musleabi, os: ubuntu-latest, std: 1, run: 1 } - - { target: armv5te-unknown-linux-gnueabi, os: ubuntu-latest, std: 1, run: 1 } - - { target: armv5te-unknown-linux-musleabi, os: ubuntu-latest, std: 1, run: 1 } - - { target: armv7-unknown-linux-musleabihf, os: ubuntu-latest, std: 1, run: 1 } - - { target: i586-unknown-linux-musl, os: ubuntu-latest, std: 1, run: 1 } - - { target: i686-unknown-linux-musl, os: ubuntu-latest, std: 1, run: 1 } - - { target: mips-unknown-linux-musl, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } - - { target: mipsel-unknown-linux-musl, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } - - { target: aarch64-linux-android, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } - - { target: arm-linux-androideabi, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } - - { target: armv7-linux-androideabi, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } - - { target: i686-linux-android, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } - - { target: x86_64-linux-android, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } - - { target: x86_64-pc-windows-gnu, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } - - { target: i686-pc-windows-gnu, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } + - { target: x86_64-apple-darwin, os: macos-latest, cpp: 1, dylib: 1, std: 1, run: 1, deploy: true } + - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: native qemu-user qemu-system, deploy: true } + - { target: x86_64-unknown-linux-musl, os: ubuntu-latest, std: 1, run: 1, deploy: true } + - { target: x86_64-pc-windows-msvc, os: windows-latest, cpp: 1, std: 1, run: 1, deploy: true } + + - { target: aarch64-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system } + - { target: arm-unknown-linux-gnueabi, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1 } + - { target: arm-unknown-linux-gnueabihf, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1 } + - { target: armv7-unknown-linux-gnueabihf, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system } + - { target: i586-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1 } + - { target: i686-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: native qemu-user qemu-system } + - { target: mips-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system } + - { target: mipsel-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system } + - { target: mips64-unknown-linux-gnuabi64, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1 } + - { target: mips64el-unknown-linux-gnuabi64, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system } + - { target: mips64-unknown-linux-muslabi64, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1 } + - { target: mips64el-unknown-linux-muslabi64, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system } + - { target: powerpc-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system } + - { target: powerpc64-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system } + - { target: powerpc64le-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-user qemu-system } + - { target: riscv64gc-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } + - { target: s390x-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-system } + - { target: sparc64-unknown-linux-gnu, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1, run: 1, runners: qemu-system } + - { target: aarch64-unknown-linux-musl, os: ubuntu-latest, std: 1, run: 1 } + - { target: arm-unknown-linux-musleabihf, os: ubuntu-latest, std: 1, run: 1 } + - { target: arm-unknown-linux-musleabi, os: ubuntu-latest, std: 1, run: 1 } + - { target: armv5te-unknown-linux-gnueabi, os: ubuntu-latest, std: 1, run: 1 } + - { target: armv5te-unknown-linux-musleabi, os: ubuntu-latest, std: 1, run: 1 } + - { target: armv7-unknown-linux-musleabihf, os: ubuntu-latest, std: 1, run: 1 } + - { target: i586-unknown-linux-musl, os: ubuntu-latest, std: 1, run: 1 } + - { target: i686-unknown-linux-musl, os: ubuntu-latest, std: 1, run: 1 } + - { target: mips-unknown-linux-musl, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } + - { target: mipsel-unknown-linux-musl, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } + - { target: aarch64-linux-android, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } + - { target: arm-linux-androideabi, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } + - { target: armv7-linux-androideabi, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } + - { target: i686-linux-android, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } + - { target: x86_64-linux-android, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } + - { target: x86_64-pc-windows-gnu, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } + - { target: i686-pc-windows-gnu, os: ubuntu-latest, cpp: 1, std: 1, run: 1 } # Disabled, see #396 #-{ target: x86_64-unknown-dragonfly, os: ubuntu-latest, cpp: 1, dylib: 1 } - - { target: i686-unknown-freebsd, os: ubuntu-latest, dylib: 1, std: 1 } - - { target: x86_64-unknown-freebsd, os: ubuntu-latest, dylib: 1, std: 1 } - - { target: x86_64-unknown-netbsd, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1 } + - { target: i686-unknown-freebsd, os: ubuntu-latest, dylib: 1, std: 1 } + - { target: x86_64-unknown-freebsd, os: ubuntu-latest, dylib: 1, std: 1 } + - { target: x86_64-unknown-netbsd, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1 } # Disabled, see #534 #-{ target: sparcv9-sun-solaris, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1 } #-{ target: x86_64-sun-solaris, os: ubuntu-latest, cpp: 1, dylib: 1, std: 1 } @@ -136,10 +138,10 @@ jobs: #-{ target: asmjs-unknown-emscripten, os: ubuntu-latest, std: 1, run: 1 } # `cargo run` fails with an assertion error (https://github.com/rust-lang/cargo/issues/4689) on `wasm32-unknown-emscripten`. #-{ target: wasm32-unknown-emscripten, os: ubuntu-latest, std: 1 } - - { target: thumbv6m-none-eabi, os: ubuntu-latest, std: 1 } - - { target: thumbv7em-none-eabi, os: ubuntu-latest, std: 1 } - - { target: thumbv7em-none-eabihf, os: ubuntu-latest, std: 1 } - - { target: thumbv7m-none-eabi, os: ubuntu-latest, std: 1 } + - { target: thumbv6m-none-eabi, os: ubuntu-latest, std: 1 } + - { target: thumbv7em-none-eabi, os: ubuntu-latest, std: 1 } + - { target: thumbv7em-none-eabihf, os: ubuntu-latest, std: 1 } + - { target: thumbv7m-none-eabi, os: ubuntu-latest, std: 1 } steps: - uses: actions/checkout@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index 88ad18124..39bf21670 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +- #647 - Add `mips64-unknown-linux-muslabi64` and `mips64el-unknown-linux-muslabi64` support - #650 - Improve Docker caching. - #588 - fix ci: bump openssl version in freebsd again - #552 - Added CHANGELOG.md automation diff --git a/docker/Dockerfile.mips64-unknown-linux-muslabi64 b/docker/Dockerfile.mips64-unknown-linux-muslabi64 new file mode 100644 index 000000000..09d616855 --- /dev/null +++ b/docker/Dockerfile.mips64-unknown-linux-muslabi64 @@ -0,0 +1,30 @@ +FROM ubuntu:18.04 + +COPY common.sh lib.sh / +RUN /common.sh + +COPY cmake.sh / +RUN /cmake.sh + +COPY xargo.sh / +RUN /xargo.sh + +COPY qemu.sh / +RUN /qemu.sh mips64 + +COPY musl.sh / +RUN /musl.sh \ + TARGET=mips64-linux-muslsf \ + "COMMON_CONFIG += -with-arch=mips64r2" + +# This allows qemu run dynamic linked binaries +RUN ln -sf \ + /usr/local/mips64-linux-muslsf/lib/libc.so \ + /usr/local/mips64-linux-muslsf/lib/ld-musl-mips64-sf.so.1 +ENV QEMU_LD_PREFIX=/usr/local/mips64-linux-muslsf + +ENV CARGO_TARGET_MIPS64_UNKNOWN_LINUX_MUSLABI64_LINKER=mips64-linux-muslsf-gcc \ + CARGO_TARGET_MIPS64_UNKNOWN_LINUX_MUSLABI64_RUNNER=qemu-mips64 \ + CC_mips64_unknown_linux_muslabi64=mips64-linux-muslsf-gcc \ + CXX_mips64_unknown_linux_muslabi64=mips64-linux-muslsf-g++ \ + RUST_TEST_THREADS=1 diff --git a/docker/Dockerfile.mips64el-unknown-linux-muslabi64 b/docker/Dockerfile.mips64el-unknown-linux-muslabi64 new file mode 100644 index 000000000..2da763241 --- /dev/null +++ b/docker/Dockerfile.mips64el-unknown-linux-muslabi64 @@ -0,0 +1,30 @@ +FROM ubuntu:18.04 + +COPY common.sh lib.sh / +RUN /common.sh + +COPY cmake.sh / +RUN /cmake.sh + +COPY xargo.sh / +RUN /xargo.sh + +COPY qemu.sh / +RUN /qemu.sh mips64el + +COPY musl.sh / +RUN /musl.sh \ + TARGET=mips64el-linux-muslsf \ + "COMMON_CONFIG += -with-arch=mips64" + +# This allows qemu run dynamic linked binaries +RUN ln -sf \ + /usr/local/mips64el-linux-muslsf/lib/libc.so \ + /usr/local/mips64el-linux-muslsf/lib/ld-musl-mips64el-sf.so.1 +ENV QEMU_LD_PREFIX=/usr/local/mips64el-linux-muslsf + +ENV CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_MUSLABI64_LINKER=mips64el-linux-muslsf-gcc \ + CARGO_TARGET_MIPS64EL_UNKNOWN_LINUX_MUSLABI64_RUNNER=qemu-mips64el \ + CC_mips64el_unknown_linux_muslabi64=mips64el-linux-muslsf-gcc \ + CXX_mips64el_unknown_linux_muslabi64=mips64el-linux-muslsf-g++ \ + RUST_TEST_THREADS=1