Skip to content

Commit

Permalink
MULTIARCH-3441: Enable builds for s390x (#1) (#2)
Browse files Browse the repository at this point in the history
- 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 <jan.schintag@de.ibm.com>
  • Loading branch information
jschintag authored and prb112 committed May 24, 2023
1 parent 407325d commit 0bec359
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 []
Expand Down

0 comments on commit 0bec359

Please sign in to comment.