Skip to content

Commit

Permalink
Adjust Erlang HiPE compilation to be conditional based on architecture
Browse files Browse the repository at this point in the history
HiPE is only supported on a limited set of architectures, so our `./configure` flags should reflect that (this causing us build failures on several architectures: https://doi-janky.infosiftr.net/job/multiarch/view/images/view/rabbitmq/).

I've successfully tested this change on `arm32v7`, `amd64`, `ppc64le`, and `s390x`.
  • Loading branch information
tianon committed Mar 28, 2019
1 parent 40e8718 commit b7fe20f
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 8 deletions.
8 changes: 7 additions & 1 deletion 3.7-rc/alpine/Dockerfile
Expand Up @@ -106,14 +106,20 @@ RUN set -eux; \
CFLAGS="$(dpkg-buildflags --get CFLAGS)"; export CFLAGS; \
hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \
buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \
case "$dpkgArch" in \
# https://salsa.debian.org/erlang-team/packages/erlang/blob/9e3466473f1c75f6f6866c9957f6c4f535c12c70/debian/control#L40 (HiPE supports a limited set of architectures)
amd64 | i386 | ppc64el) hipe='--enable-hipe' ;; \
*) hipe='--disable-hipe' ;; \
esac; \
./configure \
--host="$hostArch" \
--build="$buildArch" \
$hipe \
--disable-dynamic-ssl-lib \
--disable-sctp \
--disable-silent-rules \
--enable-clock-gettime \
--enable-hipe \
--enable-hybrid-heap \
--enable-kernel-poll \
--enable-shared-zlib \
Expand Down
8 changes: 7 additions & 1 deletion 3.7-rc/ubuntu/Dockerfile
Expand Up @@ -111,14 +111,20 @@ RUN set -eux; \
CFLAGS="$(dpkg-buildflags --get CFLAGS)"; export CFLAGS; \
hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \
buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \
case "$dpkgArch" in \
# https://salsa.debian.org/erlang-team/packages/erlang/blob/9e3466473f1c75f6f6866c9957f6c4f535c12c70/debian/control#L40 (HiPE supports a limited set of architectures)
amd64 | i386 | ppc64el) hipe='--enable-hipe' ;; \
*) hipe='--disable-hipe' ;; \
esac; \
./configure \
--host="$hostArch" \
--build="$buildArch" \
$hipe \
--disable-dynamic-ssl-lib \
--disable-sctp \
--disable-silent-rules \
--enable-clock-gettime \
--enable-hipe \
--enable-hybrid-heap \
--enable-kernel-poll \
--enable-shared-zlib \
Expand Down
8 changes: 7 additions & 1 deletion 3.7/alpine/Dockerfile
Expand Up @@ -106,14 +106,20 @@ RUN set -eux; \
CFLAGS="$(dpkg-buildflags --get CFLAGS)"; export CFLAGS; \
hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \
buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \
case "$dpkgArch" in \
# https://salsa.debian.org/erlang-team/packages/erlang/blob/9e3466473f1c75f6f6866c9957f6c4f535c12c70/debian/control#L40 (HiPE supports a limited set of architectures)
amd64 | i386 | ppc64el) hipe='--enable-hipe' ;; \
*) hipe='--disable-hipe' ;; \
esac; \
./configure \
--host="$hostArch" \
--build="$buildArch" \
$hipe \
--disable-dynamic-ssl-lib \
--disable-sctp \
--disable-silent-rules \
--enable-clock-gettime \
--enable-hipe \
--enable-hybrid-heap \
--enable-kernel-poll \
--enable-shared-zlib \
Expand Down
8 changes: 7 additions & 1 deletion 3.7/ubuntu/Dockerfile
Expand Up @@ -111,14 +111,20 @@ RUN set -eux; \
CFLAGS="$(dpkg-buildflags --get CFLAGS)"; export CFLAGS; \
hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \
buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \
case "$dpkgArch" in \
# https://salsa.debian.org/erlang-team/packages/erlang/blob/9e3466473f1c75f6f6866c9957f6c4f535c12c70/debian/control#L40 (HiPE supports a limited set of architectures)
amd64 | i386 | ppc64el) hipe='--enable-hipe' ;; \
*) hipe='--disable-hipe' ;; \
esac; \
./configure \
--host="$hostArch" \
--build="$buildArch" \
$hipe \
--disable-dynamic-ssl-lib \
--disable-sctp \
--disable-silent-rules \
--enable-clock-gettime \
--enable-hipe \
--enable-hybrid-heap \
--enable-kernel-poll \
--enable-shared-zlib \
Expand Down
8 changes: 7 additions & 1 deletion 3.8-rc/alpine/Dockerfile
Expand Up @@ -106,14 +106,20 @@ RUN set -eux; \
CFLAGS="$(dpkg-buildflags --get CFLAGS)"; export CFLAGS; \
hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \
buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \
case "$dpkgArch" in \
# https://salsa.debian.org/erlang-team/packages/erlang/blob/9e3466473f1c75f6f6866c9957f6c4f535c12c70/debian/control#L40 (HiPE supports a limited set of architectures)
amd64 | i386 | ppc64el) hipe='--enable-hipe' ;; \
*) hipe='--disable-hipe' ;; \
esac; \
./configure \
--host="$hostArch" \
--build="$buildArch" \
$hipe \
--disable-dynamic-ssl-lib \
--disable-sctp \
--disable-silent-rules \
--enable-clock-gettime \
--enable-hipe \
--enable-hybrid-heap \
--enable-kernel-poll \
--enable-shared-zlib \
Expand Down
8 changes: 7 additions & 1 deletion 3.8-rc/ubuntu/Dockerfile
Expand Up @@ -111,14 +111,20 @@ RUN set -eux; \
CFLAGS="$(dpkg-buildflags --get CFLAGS)"; export CFLAGS; \
hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \
buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \
case "$dpkgArch" in \
# https://salsa.debian.org/erlang-team/packages/erlang/blob/9e3466473f1c75f6f6866c9957f6c4f535c12c70/debian/control#L40 (HiPE supports a limited set of architectures)
amd64 | i386 | ppc64el) hipe='--enable-hipe' ;; \
*) hipe='--disable-hipe' ;; \
esac; \
./configure \
--host="$hostArch" \
--build="$buildArch" \
$hipe \
--disable-dynamic-ssl-lib \
--disable-sctp \
--disable-silent-rules \
--enable-clock-gettime \
--enable-hipe \
--enable-hybrid-heap \
--enable-kernel-poll \
--enable-shared-zlib \
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile-alpine.template
Expand Up @@ -106,14 +106,20 @@ RUN set -eux; \
CFLAGS="$(dpkg-buildflags --get CFLAGS)"; export CFLAGS; \
hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \
buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \
case "$dpkgArch" in \
# https://salsa.debian.org/erlang-team/packages/erlang/blob/9e3466473f1c75f6f6866c9957f6c4f535c12c70/debian/control#L40 (HiPE supports a limited set of architectures)
amd64 | i386 | ppc64el) hipe='--enable-hipe' ;; \
*) hipe='--disable-hipe' ;; \
esac; \
./configure \
--host="$hostArch" \
--build="$buildArch" \
$hipe \
--disable-dynamic-ssl-lib \
--disable-sctp \
--disable-silent-rules \
--enable-clock-gettime \
--enable-hipe \
--enable-hybrid-heap \
--enable-kernel-poll \
--enable-shared-zlib \
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile-ubuntu.template
Expand Up @@ -111,14 +111,20 @@ RUN set -eux; \
CFLAGS="$(dpkg-buildflags --get CFLAGS)"; export CFLAGS; \
hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \
buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \
case "$dpkgArch" in \
# https://salsa.debian.org/erlang-team/packages/erlang/blob/9e3466473f1c75f6f6866c9957f6c4f535c12c70/debian/control#L40 (HiPE supports a limited set of architectures)
amd64 | i386 | ppc64el) hipe='--enable-hipe' ;; \
*) hipe='--disable-hipe' ;; \
esac; \
./configure \
--host="$hostArch" \
--build="$buildArch" \
$hipe \
--disable-dynamic-ssl-lib \
--disable-sctp \
--disable-silent-rules \
--enable-clock-gettime \
--enable-hipe \
--enable-hybrid-heap \
--enable-kernel-poll \
--enable-shared-zlib \
Expand Down

0 comments on commit b7fe20f

Please sign in to comment.