Skip to content

Commit

Permalink
initial mips64el
Browse files Browse the repository at this point in the history
  • Loading branch information
bjia56 committed Nov 29, 2024
1 parent 97c753a commit a6f0f5d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"}'

Expand All @@ -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' || '' }}
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_python_on_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
8 changes: 7 additions & 1 deletion scripts/build_linux_zig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down
4 changes: 4 additions & 0 deletions scripts/qemu_mips64le_interpreter
Original file line number Diff line number Diff line change
@@ -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 "$@"

0 comments on commit a6f0f5d

Please sign in to comment.