Skip to content

Commit 5e5608a

Browse files
committed
Force alignment on arm32
This fixes our test failures on Debian-based arm32v7, and fixes *most* of our test failures on Alpine-based arm32v{6,7}, leaving the notable `t/restart.t` which we've had issues with prior.
1 parent 9152f80 commit 5e5608a

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

1/alpine/Dockerfile

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

1/debian/Dockerfile

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile.template

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,18 @@ RUN set -eux; \
9090
{{ ) else "" end -}}
9191
cd /usr/src/memcached; \
9292
\
93+
# https://github.com/memcached/memcached/issues/1220#issuecomment-2770251664: on arm32, we need to override the upstream alignment check (which fails to detect the need for alignment on arm32v6+ on our hardware for some reason, which then causes us to fail the tests 😭)
94+
arch="$({{
95+
{
96+
"alpine": "apk --print-arch",
97+
"debian": "dpkg --print-architecture",
98+
}[env.variant]
99+
// error("unknown variant: \(env.variant)")
100+
}})"; \
101+
case "$arch" in \
102+
armhf | armv7) export ac_cv_c_alignment=need ;; \
103+
esac; \
104+
\
93105
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
94106
./configure \
95107
--build="$gnuArch" \

0 commit comments

Comments
 (0)