summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2020-08-17 09:23:18 -0500
committerGitHub <noreply@github.com>2020-08-17 10:23:18 -0400
commit8d35d8acb82b4600a367e692d1231a705552900c (patch)
tree0e9ca5e9a663f642cec475cd15adb4616c426489
parent0b88cb2273b564a4193ac11813347484fc1cec7c (diff)
downloadpy-bcrypt-git-8d35d8acb82b4600a367e692d1231a705552900c.tar.gz
fix page size on aarch64 (#226)
debian/ubuntu use 4k pages while centos uses 64k pages. 64k pages work on 4k page systems while a 4k compiled binary will throw this error: ELF load command alignment not page-aligned This patch attempts to pass a linker flag that should force 64k page alignment at all times
-rw-r--r--.github/workflows/wheel-builder.yml5
1 files changed, 4 insertions, 1 deletions
diff --git a/.github/workflows/wheel-builder.yml b/.github/workflows/wheel-builder.yml
index 161f96b..8c3be26 100644
--- a/.github/workflows/wheel-builder.yml
+++ b/.github/workflows/wheel-builder.yml
@@ -112,6 +112,9 @@ jobs:
- uses: docker://quay.io/pypa/manylinux2014_aarch64
# The weird pip cache nonsense below is due to docker ownership issues. We want
# a cache because otherwise we end up building cffi twice.
+ # The bizarro max-page-size linker flag is to enforce 64k alignment even on 4k
+ # systems so we don't get ELF load command alignment not page-aligned on 64k
+ # systems.
with:
args: |
bash -c "set -xe;
@@ -123,7 +126,7 @@ jobs:
tar zxvf bcrypt*.tar.gz;
mkdir tmpwheelhouse;
pushd bcrypt*;
- ../.venv/bin/python setup.py bdist_wheel --py-limited-api=${{ matrix.PYTHON.ABI_VERSION }};
+ CFLAGS=\"-Wl,-z,max-page-size=0x10000\" ../.venv/bin/python setup.py bdist_wheel --py-limited-api=${{ matrix.PYTHON.ABI_VERSION }};
mv dist/bcrypt*.whl ../tmpwheelhouse;
popd;
auditwheel repair tmpwheelhouse/bcrypt*.whl -w wheelhouse/;