Skip to content

Commit fdfbd20

Browse files
Force patchelf to use 64KB page size on loongarch64
Signed-off-by: 吴小白 <296015668@qq.com>
1 parent a21e242 commit fdfbd20

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

cpython-unix/build-patchelf.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ tar -xf "patchelf-${PATCHELF_VERSION}.tar.bz2"
1313

1414
pushd patchelf-0.13.1.20211127.72b6d44
1515

16+
# support loongarch for patchelf
17+
if [[ "${TARGET_TRIPLE}" = loongarch64* ]]; then
18+
curl -sSL https://github.com/NixOS/patchelf/commit/4b87d4fa5769af2d7d37af0756f2fc9892f5afd2.patch | patch -p1
19+
fi
20+
1621
CC="${HOST_CC}" CXX="${HOST_CXX}" CFLAGS="${EXTRA_HOST_CFLAGS} -fPIC" CPPFLAGS="${EXTRA_HOST_CFLAGS} -fPIC" \
1722
./configure \
1823
--build="${BUILD_TRIPLE}" \

cpython-unix/targets.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ loongarch64-unknown-linux-gnu:
267267
- '3.12'
268268
- '3.13'
269269
- '3.14'
270+
- '3.15'
270271
docker_image_suffix: .cross-loongarch64
271272
host_cc: /usr/bin/x86_64-linux-gnu-gcc
272273
host_cxx: /usr/bin/x86_64-linux-gnu-g++
@@ -275,6 +276,7 @@ loongarch64-unknown-linux-gnu:
275276
target_ldflags:
276277
# Hardening
277278
- '-Wl,-z,noexecstack'
279+
- '-Wl,-z,max-page-size=0x10000'
278280
needs:
279281
- autoconf
280282
- bdb

0 commit comments

Comments
 (0)