1
0
Fork 0
mirror of https://github.com/docker-library/ruby.git synced 2022-11-09 11:41:34 -05:00

Limit ucontext linking to specific arches

This commit is contained in:
Joe Ferguson 2021-10-27 15:33:46 -07:00
parent 4d6eafa077
commit bda17e37f4
7 changed files with 47 additions and 12 deletions

View file

@ -51,7 +51,6 @@ RUN set -eux; \
libffi-dev \ libffi-dev \
libxml2-dev \ libxml2-dev \
libxslt-dev \ libxslt-dev \
libucontext-dev \
linux-headers \ linux-headers \
make \ make \
ncurses-dev \ ncurses-dev \

View file

@ -51,7 +51,6 @@ RUN set -eux; \
libffi-dev \ libffi-dev \
libxml2-dev \ libxml2-dev \
libxslt-dev \ libxslt-dev \
libucontext-dev \
linux-headers \ linux-headers \
make \ make \
ncurses-dev \ ncurses-dev \

View file

@ -51,7 +51,6 @@ RUN set -eux; \
libffi-dev \ libffi-dev \
libxml2-dev \ libxml2-dev \
libxslt-dev \ libxslt-dev \
libucontext-dev \
linux-headers \ linux-headers \
make \ make \
ncurses-dev \ ncurses-dev \
@ -97,8 +96,16 @@ RUN set -eux; \
mv file.c.new file.c; \ mv file.c.new file.c; \
\ \
autoconf; \ autoconf; \
# 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; \
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
export LIBS='-lucontext'; \
./configure \ ./configure \
--build="$gnuArch" \ --build="$gnuArch" \
--disable-install-doc \ --disable-install-doc \

View file

@ -51,7 +51,6 @@ RUN set -eux; \
libffi-dev \ libffi-dev \
libxml2-dev \ libxml2-dev \
libxslt-dev \ libxslt-dev \
libucontext-dev \
linux-headers \ linux-headers \
make \ make \
ncurses-dev \ ncurses-dev \
@ -97,8 +96,16 @@ RUN set -eux; \
mv file.c.new file.c; \ mv file.c.new file.c; \
\ \
autoconf; \ autoconf; \
# 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; \
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
export LIBS='-lucontext'; \
./configure \ ./configure \
--build="$gnuArch" \ --build="$gnuArch" \
--disable-install-doc \ --disable-install-doc \

View file

@ -51,7 +51,6 @@ RUN set -eux; \
libffi-dev \ libffi-dev \
libxml2-dev \ libxml2-dev \
libxslt-dev \ libxslt-dev \
libucontext-dev \
linux-headers \ linux-headers \
make \ make \
ncurses-dev \ ncurses-dev \
@ -97,6 +96,15 @@ RUN set -eux; \
mv file.c.new file.c; \ mv file.c.new file.c; \
\ \
autoconf; \ autoconf; \
# 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; \
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
./configure \ ./configure \
--build="$gnuArch" \ --build="$gnuArch" \

View file

@ -51,7 +51,6 @@ RUN set -eux; \
libffi-dev \ libffi-dev \
libxml2-dev \ libxml2-dev \
libxslt-dev \ libxslt-dev \
libucontext-dev \
linux-headers \ linux-headers \
make \ make \
ncurses-dev \ ncurses-dev \
@ -97,6 +96,15 @@ RUN set -eux; \
mv file.c.new file.c; \ mv file.c.new file.c; \
\ \
autoconf; \ autoconf; \
# 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; \
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
./configure \ ./configure \
--build="$gnuArch" \ --build="$gnuArch" \

View file

@ -76,7 +76,6 @@ RUN set -eux; \
libffi-dev \ libffi-dev \
libxml2-dev \ libxml2-dev \
libxslt-dev \ libxslt-dev \
libucontext-dev \
linux-headers \ linux-headers \
make \ make \
ncurses-dev \ ncurses-dev \
@ -165,10 +164,18 @@ RUN set -eux; \
mv file.c.new file.c; \ mv file.c.new file.c; \
\ \
autoconf; \ autoconf; \
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ {{ if is_alpine and ( [ "2.7", "3.0" ] | index(env.version) ) then ( -}}
{{ if is_alpine and env.version == "2.7" then ( -}} # fix builds on arm32v6/7 and s390x: https://github.com/docker-library/ruby/issues/308
export LIBS='-lucontext'; \ # 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 -}} {{ ) else "" end -}}
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
./configure \ ./configure \
--build="$gnuArch" \ --build="$gnuArch" \
--disable-install-doc \ --disable-install-doc \