Skip to content
Snippets Groups Projects
Commit c05cdb312bd8 authored by Paul Kehrer's avatar Paul Kehrer
Browse files

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
parent 8e018aa0063e
Branches
No related tags found
No related merge requests found
...@@ -112,6 +112,9 @@ ...@@ -112,6 +112,9 @@
- uses: docker://quay.io/pypa/manylinux2014_aarch64 - uses: docker://quay.io/pypa/manylinux2014_aarch64
# The weird pip cache nonsense below is due to docker ownership issues. We want # The weird pip cache nonsense below is due to docker ownership issues. We want
# a cache because otherwise we end up building cffi twice. # 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: with:
args: | args: |
bash -c "set -xe; bash -c "set -xe;
...@@ -123,7 +126,7 @@ ...@@ -123,7 +126,7 @@
tar zxvf bcrypt*.tar.gz; tar zxvf bcrypt*.tar.gz;
mkdir tmpwheelhouse; mkdir tmpwheelhouse;
pushd bcrypt*; 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; mv dist/bcrypt*.whl ../tmpwheelhouse;
popd; popd;
auditwheel repair tmpwheelhouse/bcrypt*.whl -w wheelhouse/; auditwheel repair tmpwheelhouse/bcrypt*.whl -w wheelhouse/;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment