Skip to content

Commit 74ff4b2

Browse files
authored
Merge pull request #366 from infosiftr/more-context
Limit ucontext linking to arm32* and s390x arches
2 parents 4d6eafa + bda17e3 commit 74ff4b2

File tree

7 files changed

+47
-12
lines changed

7 files changed

+47
-12
lines changed

2.6/alpine3.13/Dockerfile

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

2.6/alpine3.14/Dockerfile

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

2.7/alpine3.13/Dockerfile

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

2.7/alpine3.14/Dockerfile

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

3.0/alpine3.13/Dockerfile

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.0/alpine3.14/Dockerfile

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile.template

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ RUN set -eux; \
7676
libffi-dev \
7777
libxml2-dev \
7878
libxslt-dev \
79-
libucontext-dev \
8079
linux-headers \
8180
make \
8281
ncurses-dev \
@@ -165,10 +164,18 @@ RUN set -eux; \
165164
mv file.c.new file.c; \
166165
\
167166
autoconf; \
168-
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
169-
{{ if is_alpine and env.version == "2.7" then ( -}}
170-
export LIBS='-lucontext'; \
167+
{{ if is_alpine and ( [ "2.7", "3.0" ] | index(env.version) ) then ( -}}
168+
# fix builds on arm32v6/7 and s390x: https://github.com/docker-library/ruby/issues/308
169+
# and don't break the other arches: https://github.com/docker-library/ruby/issues/365
170+
apkArch="$(apk --print-arch)"; \
171+
case "$apkArch" in \
172+
s390x | armhf | armv7) \
173+
apk add --no-cache libucontext-dev; \
174+
export LIBS='-lucontext'; \
175+
;; \
176+
esac; \
171177
{{ ) else "" end -}}
178+
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
172179
./configure \
173180
--build="$gnuArch" \
174181
--disable-install-doc \

0 commit comments

Comments
 (0)