From 0bec3590d8996526627072f926d9f9b2d686cf61 Mon Sep 17 00:00:00 2001 From: Jan Schintag <43986265+jschintag@users.noreply.github.com> Date: Wed, 24 May 2023 20:10:12 +0200 Subject: [PATCH] MULTIARCH-3441: Enable builds for s390x (#1) (#2) - Update the .goreleaser.yaml to include s390x - Update the cross build for s390x - Link gcc to s390x-linux-gnu-gcc binary On s390x go compiler seems to expect the gcc binary at s390x-linux-gnu-gcc binary. However on rhel it is not installed there. Signed-off-by: Jan Schintag --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index 04a90d551..0f9014e06 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,6 +32,13 @@ RUN set -ex \ && ln -f /usr/local/go/bin/go /usr/bin/go \ && ln /usr/bin/gcc /usr/bin/s390x-linux-gnu-gcc +################################################################################# +# Link gcc to /usr/bin/s390x-linux-gnu-gcc as go requires it on s390x +RUN ARCH=$(arch | sed 's|x86_64|amd64|g') \ + && [ "${ARCH}" == "s390x" ] \ + && ln /usr/bin/gcc /usr/bin/s390x-linux-gnu-gcc \ + || echo "Not running on s390x, skip linking gcc binary" + WORKDIR /build ENTRYPOINT ["make"] CMD []