Skip to content

Commit ece63d4

Browse files
authored
Merge pull request #511 from infosiftr/jit-arches
Adjust "--enable-jit" to be properly conditional
2 parents 58d11af + c0bec38 commit ece63d4

File tree

11 files changed

+61
-10
lines changed

11 files changed

+61
-10
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
git clone --depth 1 https://github.com/docker-library/bashbrew.git -b master ~/bashbrew
2626
strategy="$(~/bashbrew/scripts/github-actions/generate.sh)"
2727
strategy="$(~/bashbrew/scripts/github-actions/munge-i386.sh -c <<<"$strategy")"
28+
strategy="$(jq -c '.matrix.include |= [ .[] | select(.name | (test("i386") | not) or test("alpine")) ]' <<<"$strategy")" # Ubuntu no longer supports i386 (so we can only build test Alpine there; qemu-user-static is too slow for other arches)
2829
jq . <<<"$strategy" # sanity check / debugging aid
2930
echo "::set-output name=strategy::$strategy"
3031

3.8-rc/alpine/Dockerfile

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

3.8-rc/ubuntu/Dockerfile

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

3.8/alpine/Dockerfile

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

3.8/ubuntu/Dockerfile

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

3.9-rc/alpine/Dockerfile

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

3.9-rc/ubuntu/Dockerfile

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

3.9/alpine/Dockerfile

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

3.9/ubuntu/Dockerfile

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

Dockerfile-alpine.template

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,18 @@ RUN set -eux; \
132132
hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \
133133
buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
134134
dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \
135+
# JIT is only supported on amd64 (until 24.x+1, where it will support arm64 as well); https://github.com/erlang/otp/blob/OTP-24.0.5/erts/configure#L21694-L21709 / https://github.com/erlang/otp/pull/4869
136+
jitFlag=; \
137+
case "$dpkgArch" in \
138+
amd64) jitFlag='--enable-jit' ;; \
139+
esac; \
135140
./configure \
136141
--host="$hostArch" \
137142
--build="$buildArch" \
138143
--disable-dynamic-ssl-lib \
139144
--disable-hipe \
140145
--disable-sctp \
141146
--disable-silent-rules \
142-
--enable-jit \
143147
--enable-clock-gettime \
144148
--enable-hybrid-heap \
145149
--enable-kernel-poll \
@@ -165,6 +169,7 @@ RUN set -eux; \
165169
--without-ssh \
166170
--without-tftp \
167171
--without-wx \
172+
$jitFlag \
168173
; \
169174
# Compile & install Erlang/OTP
170175
make -j "$(getconf _NPROCESSORS_ONLN)" GEN_OPT_FLGS="-O2 -fno-strict-aliasing"; \

Dockerfile-ubuntu.template

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,18 @@ RUN set -eux; \
139139
hostArch="$(dpkg-architecture --query DEB_HOST_GNU_TYPE)"; \
140140
buildArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \
141141
dpkgArch="$(dpkg --print-architecture)"; dpkgArch="${dpkgArch##*-}"; \
142+
# JIT is only supported on amd64 (until 24.x+1, where it will support arm64 as well); https://github.com/erlang/otp/blob/OTP-24.0.5/erts/configure#L21694-L21709 / https://github.com/erlang/otp/pull/4869
143+
jitFlag=; \
144+
case "$dpkgArch" in \
145+
amd64) jitFlag='--enable-jit' ;; \
146+
esac; \
142147
./configure \
143148
--host="$hostArch" \
144149
--build="$buildArch" \
145150
--disable-dynamic-ssl-lib \
146151
--disable-hipe \
147152
--disable-sctp \
148153
--disable-silent-rules \
149-
--enable-jit \
150154
--enable-clock-gettime \
151155
--enable-hybrid-heap \
152156
--enable-kernel-poll \
@@ -172,6 +176,7 @@ RUN set -eux; \
172176
--without-ssh \
173177
--without-tftp \
174178
--without-wx \
179+
$jitFlag \
175180
; \
176181
# Compile & install Erlang/OTP
177182
make -j "$(getconf _NPROCESSORS_ONLN)" GEN_OPT_FLGS="-O2 -fno-strict-aliasing"; \

0 commit comments

Comments
 (0)