Skip to content

Commit

Permalink
Limit ucontext linking to specific arches
Browse files Browse the repository at this point in the history
  • Loading branch information
yosifkit committed Oct 27, 2021
1 parent 4d6eafa commit bda17e3
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 12 deletions.
1 change: 0 additions & 1 deletion 2.6/alpine3.13/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion 2.6/alpine3.14/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions 2.7/alpine3.13/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions 2.7/alpine3.14/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion 3.0/alpine3.13/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion 3.0/alpine3.14/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 11 additions & 4 deletions Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ RUN set -eux; \
libffi-dev \
libxml2-dev \
libxslt-dev \
libucontext-dev \
linux-headers \
make \
ncurses-dev \
Expand Down Expand Up @@ -165,10 +164,18 @@ RUN set -eux; \
mv file.c.new file.c; \
\
autoconf; \
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
{{ if is_alpine and env.version == "2.7" then ( -}}
export LIBS='-lucontext'; \
{{ if is_alpine and ( [ "2.7", "3.0" ] | index(env.version) ) then ( -}}
# fix builds on arm32v6/7 and s390x: https://github.com/docker-library/ruby/issues/308
# and don't break the other arches: https://github.com/docker-library/ruby/issues/365
apkArch="$(apk --print-arch)"; \
case "$apkArch" in \
s390x | armhf | armv7) \
apk add --no-cache libucontext-dev; \
export LIBS='-lucontext'; \
;; \
esac; \
{{ ) else "" end -}}
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
./configure \
--build="$gnuArch" \
--disable-install-doc \
Expand Down

0 comments on commit bda17e3

Please sign in to comment.