Skip to content

Commit

Permalink
Work around inconsistent -mbranch-protection in Ruby 3.3.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
sengi committed Feb 22, 2024
1 parent 7720477 commit b514b18
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions base.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM --platform=$TARGETPLATFORM public.ecr.aws/lts/ubuntu:22.04_stable AS builder
ARG TARGETARCH

SHELL ["/bin/bash", "-euo", "pipefail", "-c"]

Expand Down Expand Up @@ -36,6 +37,10 @@ RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dear
WORKDIR /usr/src/ruby
RUN set -x; \
MAKEFLAGS=-j"$(nproc)"; export MAKEFLAGS; \
if [[ "$RUBY_VERSION" = "3.3.0" && "$TARGETARCH" = "arm64" ]]; then; \
: "workaround for https://bugs.ruby-lang.org/issues/20085"; \
ASFLAGS="-mbranch-protection=pac-ret"; export ASFLAGS; \
fi; \
ruby_tarball="ruby-${RUBY_VERSION}.tar.gz"; \
curl -fsSLO "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR}/${ruby_tarball}"; \
echo "${RUBY_CHECKSUM} ${ruby_tarball}" | sha256sum --check --strict --status; \
Expand Down

0 comments on commit b514b18

Please sign in to comment.