diff --git a/.github/workflows/build_python.yml b/.github/workflows/build_python.yml index 4f18777f..8827f62d 100644 --- a/.github/workflows/build_python.yml +++ b/.github/workflows/build_python.yml @@ -9,7 +9,7 @@ on: platforms: required: true type: string - default: "linux-x86_64,linux-aarch64,linux-i386,linux-arm,linux-riscv64,linux-loongarch64,linux-s390x,macos,windows,cosmo,freebsd13-x86_64,freebsd14-x86_64,freebsd15-x86_64,solaris11-x86_64" + default: "linux-x86_64,linux-aarch64,linux-i386,linux-arm,linux-riscv64,linux-loongarch64,linux-s390x,linux-mips64el,macos,windows,cosmo,freebsd13-x86_64,freebsd14-x86_64,freebsd15-x86_64,solaris11-x86_64" buildsystem_branch: required: false type: string @@ -52,8 +52,8 @@ env: DEBUG_CI: ${{ inputs.debug }} VERBOSE_CI: ${{ inputs.verbose }} PORTABLE_PYTHON_BUILDSYSTEM_BRANCH: ${{ inputs.buildsystem_branch || 'portable-python' }} - image_map: '{"x86_64": "amd64/ubuntu:18.04", "i386": "i386/ubuntu:18.04", "aarch64": "arm64v8/ubuntu:18.04", "arm": "arm32v7/debian:bullseye", "riscv64": "riscv64/debian:sid", "loongarch64": "loongarch64/debian:sid", "s390x": "s390x/debian:bullseye"}' - platform_map: '{"x86_64": "linux/amd64", "i386": "linux/386", "aarch64": "linux/arm64/v8", "arm": "linux/arm/v7", "riscv64": "linux/riscv64", "loongarch64": "linux/loong64", "s390x": "linux/s390x"}' + image_map: '{"x86_64": "amd64/ubuntu:18.04", "i386": "i386/ubuntu:18.04", "aarch64": "arm64v8/ubuntu:18.04", "arm": "arm32v7/debian:bullseye", "riscv64": "riscv64/debian:sid", "loongarch64": "loongarch64/debian:sid", "s390x": "s390x/debian:bullseye", "mips64el": "mips64le/debian:bullseye"}' + platform_map: '{"x86_64": "linux/amd64", "i386": "linux/386", "aarch64": "linux/arm64/v8", "arm": "linux/arm/v7", "riscv64": "linux/riscv64", "loongarch64": "linux/loong64", "s390x": "linux/s390x", "mips64el": "linux/mips64le"}' freebsd_release_map: '{"15": "15.0", "14": "14.0", "13": "13.2"}' solaris_release_map: '{"11": "11.4"}' @@ -65,7 +65,7 @@ jobs: strategy: fail-fast: false matrix: - arch: [x86_64, i386, aarch64, arm, riscv64, s390x, loongarch64] + arch: [x86_64, i386, aarch64, arm, riscv64, s390x, loongarch64, mips64el] distribution: [full, headless] exclude: - arch: ${{ !contains(inputs.platforms, 'linux-x86_64') && 'x86_64' || '' }} @@ -75,6 +75,7 @@ jobs: - arch: ${{ !contains(inputs.platforms, 'linux-riscv64') && 'riscv64' || '' }} - arch: ${{ !contains(inputs.platforms, 'linux-loongarch64') && 'loongarch64' || '' }} - arch: ${{ !contains(inputs.platforms, 'linux-s390x') && 's390x' || '' }} + - arch: ${{ !contains(inputs.platforms, 'linux-mips64el') && 'mips64el' || '' }} steps: - name: Parse image diff --git a/.github/workflows/build_python_on_branch.yml b/.github/workflows/build_python_on_branch.yml index 9811d663..97c53af9 100644 --- a/.github/workflows/build_python_on_branch.yml +++ b/.github/workflows/build_python_on_branch.yml @@ -35,7 +35,7 @@ jobs: run_tests: ${{ inputs.run_tests || false }} debug: ${{ inputs.debug || false }} verbose: ${{ inputs.verbose || false }} - platforms: "linux-x86_64,linux-aarch64,linux-i386,linux-arm,linux-riscv64,linux-loongarch64,linux-s390x,macos,windows,cosmo,freebsd13-x86_64,freebsd14-x86_64,freebsd15-x86_64,solaris11-x86_64" + platforms: "linux-x86_64,linux-aarch64,linux-i386,linux-arm,linux-riscv64,linux-loongarch64,linux-s390x,linux-mips64el,macos,windows,cosmo,freebsd13-x86_64,freebsd14-x86_64,freebsd15-x86_64,solaris11-x86_64" buildsystem_branch: ${{ inputs.buildsystem_branch || 'portable-python' }} graalpy: diff --git a/.github/workflows/release_python.yml b/.github/workflows/release_python.yml index 928d153c..6491084d 100644 --- a/.github/workflows/release_python.yml +++ b/.github/workflows/release_python.yml @@ -26,7 +26,7 @@ jobs: uses: ./.github/workflows/build_python.yml with: python_version: ${{ inputs.python_version }} - platforms: "linux-x86_64,linux-aarch64,linux-i386,linux-arm,linux-riscv64,linux-s390x,linux-loongarch64,macos,windows,cosmo,freebsd13-x86_64,freebsd14-x86_64,freebsd15-x86_64,solaris11-x86_64" + platforms: "linux-x86_64,linux-aarch64,linux-i386,linux-arm,linux-riscv64,linux-s390x,linux-loongarch64,linux-mips64el,macos,windows,cosmo,freebsd13-x86_64,freebsd14-x86_64,freebsd15-x86_64,solaris11-x86_64" publish: name: Publish CPython ${{ inputs.python_version }} diff --git a/scripts/build_linux_zig.sh b/scripts/build_linux_zig.sh index 1047b0ff..6e427649 100755 --- a/scripts/build_linux_zig.sh +++ b/scripts/build_linux_zig.sh @@ -49,6 +49,10 @@ case "$ARCH" in sudo apt -y install libc6-s390x-cross sudo ln -s /usr/s390x-linux-gnu/lib/ld64.so.1 /lib/ld64.so.1 ;; + mips64el) + sudo apt -y install libc6-mips64el-cross + sudo ln -s /usr/mips64el-linux-gnuabi64/lib64/ld.so.1 /lib/ld.so.1 + ;; esac sudo pip install https://github.com/mesonbuild/meson/archive/2baae24.zip ninja cmake==3.28.4 --break-system-packages if [[ "${ARCH}" == "riscv64" ]]; then @@ -104,6 +108,8 @@ else export ZIG_FLAGS="-target loongarch64-linux-gnu.2.36" elif [[ "${ARCH}" == "s390x" ]]; then export ZIG_FLAGS="-target s390x-linux-gnu.2.19" + elif [[ "${ARCH}" == "mips64el" ]]; then + export ZIG_FLAGS="-target mips64el-linux-gnuabi64.2.19" else export ZIG_FLAGS="-target ${ARCH}-linux-gnu.2.17" fi @@ -143,7 +149,7 @@ if [[ "${ARCH}" == "arm" ]]; then ./Configure linux-generic32 no-shared --prefix=${DEPSDIR} --openssldir=${DEPSDIR} elif [[ "${ARCH}" == "i386" ]]; then CFLAGS="${CFLAGS} -fgnuc-version=0 -D__STDC_NO_ATOMICS__" ./Configure linux-x86 no-shared --prefix=${DEPSDIR} --openssldir=${DEPSDIR} -elif [[ "${ARCH}" == "riscv64" ]]; then +elif [[ "${ARCH}" == "riscv64" || "${ARCH}" == "mips64el" ]]; then CFLAGS="${CFLAGS} -fgnuc-version=0 -D__STDC_NO_ATOMICS__" ./Configure linux-generic64 no-shared --prefix=${DEPSDIR} --openssldir=${DEPSDIR} elif [[ "${ARCH}" == "loongarch64" ]]; then ./Configure linux64-loongarch64 no-shared --prefix=${DEPSDIR} --openssldir=${DEPSDIR} diff --git a/scripts/qemu_mips64le_interpreter b/scripts/qemu_mips64le_interpreter new file mode 100755 index 00000000..b1ede4e5 --- /dev/null +++ b/scripts/qemu_mips64le_interpreter @@ -0,0 +1,4 @@ +#!/bin/bash +# this interpreter shim is used by cmake to run platform +# detection programs +LD_LIBRARY_PATH=/usr/s390x-linux-gnu/lib qemu-mips64el-static "$@" \ No newline at end of file