Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into mips64le
Browse files Browse the repository at this point in the history
  • Loading branch information
bjia56 committed Nov 30, 2024
2 parents e244ebc + b3e7609 commit c282152
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 35 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
- name: Interactive debugging
if: ${{ always() && inputs.debug_interactive }}
uses: fawazahmed0/action-debug@v2
uses: fawazahmed0/action-debug-vscode@v3

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
./scripts/build_windows.sh x86_64 ${{ inputs.python_version }} ${{ matrix.distribution }}
- name: Interactive debugging
uses: fawazahmed0/action-debug@v2
uses: fawazahmed0/action-debug-vscode@v3
if: ${{ always() && inputs.debug_interactive }}

- name: Upload artifacts
Expand Down Expand Up @@ -259,7 +259,7 @@ jobs:
./scripts/build_macos.sh universal2 ${{ inputs.python_version }} ${{ matrix.distribution }}
- name: Interactive debugging
uses: fawazahmed0/action-debug@v2
uses: fawazahmed0/action-debug-vscode@v3
if: ${{ always() && inputs.debug_interactive }}

- name: Upload artifacts
Expand Down Expand Up @@ -354,7 +354,7 @@ jobs:
- name: Interactive debugging
if: ${{ always() && inputs.debug_interactive }}
uses: fawazahmed0/action-debug@v2
uses: fawazahmed0/action-debug-vscode@v3

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -462,7 +462,7 @@ jobs:
- name: Interactive debugging
if: ${{ always() && inputs.debug_interactive }}
uses: fawazahmed0/action-debug@v2
uses: fawazahmed0/action-debug-vscode@v3

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -554,7 +554,7 @@ jobs:
- name: Interactive debugging
if: ${{ always() && inputs.debug_interactive }}
uses: fawazahmed0/action-debug@v2
uses: fawazahmed0/action-debug-vscode@v3

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
5 changes: 0 additions & 5 deletions scripts/build_linux_zig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ case "$ARCH" in
riscv64)
sudo apt -y install libc6-riscv64-cross
sudo ln -s /usr/riscv64-linux-gnu/lib/ld-linux-riscv64-lp64d.so.1 /lib/ld-linux-riscv64-lp64d.so.1
# workaround since the Zig compiler always targets ld-linux-riscv64-lp64.so.1
sudo ln -s /usr/riscv64-linux-gnu/lib/ld-linux-riscv64-lp64d.so.1 /lib/ld-linux-riscv64-lp64.so.1
;;
s390x)
sudo apt -y install libc6-s390x-cross
Expand All @@ -55,9 +53,6 @@ case "$ARCH" in
;;
esac
sudo pip install https://github.com/mesonbuild/meson/archive/2baae24.zip ninja cmake==3.28.4 --break-system-packages
if [[ "${ARCH}" == "riscv64" ]]; then
sudo pip install patchelf==0.15.0.0 --break-system-packages
fi

export ZIG_FLAGS=""
export CFLAGS="-Wno-date-time -fno-sanitize=undefined -I${DEPSDIR}/include"
Expand Down
24 changes: 0 additions & 24 deletions scripts/qemu_riscv64_interpreter
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
#!/bin/bash
# this interpreter shim is used by cmake to run platform
# detection programs

has_lp64d=$(readelf -a $1 | grep "Requesting program interpreter" | grep ld-linux-riscv64-lp64d.so.1)
if [[ "${has_lp64d}" == "" ]]; then
patchelf --set-interpreter /lib/ld-linux-riscv64-lp64d.so.1 $1
fi

has_lp64=$(readelf -d $1 | grep ld-linux-riscv64-lp64.so.1)
if [[ "${has_lp64}" != "" ]]; then
patchelf --replace-needed ld-linux-riscv64-lp64.so.1 ld-linux-riscv64-lp64d.so.1 $1
fi

has_libpython=$(readelf -d $1 | grep libpython3)
if [[ "${has_libpython}" != "" ]]; then
# this is the main python interpreter - patch libpython in its sibling directory
full_path=$(realpath $1)
prefix_dir=$(dirname $(dirname ${full_path}))
libpython=${prefix_dir}/lib/libpython${PORTABLE_PYTHON_PY_VER}.so

libpython_has_lp64=$(readelf -d ${libpython} | grep ld-linux-riscv64-lp64.so.1)
if [[ "${libpython_has_lp64}" != "" ]]; then
patchelf --replace-needed ld-linux-riscv64-lp64.so.1 ld-linux-riscv64-lp64d.so.1 ${libpython}
fi
fi

LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib qemu-riscv64-static "$@"

0 comments on commit c282152

Please sign in to comment.