From 46009c3754727a0df46adb7c051e777f1645562c Mon Sep 17 00:00:00 2001 From: raulcabello Date: Tue, 30 Nov 2021 15:32:33 +0100 Subject: [PATCH] Add s390x support Add symlink to s390x-linux-gnu-gcc (required by Go when building) Signed-off-by: thomasferrandiz --- Dockerfile.dapper | 8 +++++++- scripts/package | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 922c175d..362198c7 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -24,8 +24,12 @@ RUN zypper -n install cmake wget curl git less file libkmod2 libnl3-devel linux- # needed for ${!var} substitution RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh +RUN if [ ${ARCH} == "s390x" ]; then \ + ln -s /usr/bin/gcc /usr/bin/s390x-linux-gnu-gcc;\ + fi + # Install Go & tools -ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm64=arm64 GOLANG_ARCH=GOLANG_ARCH_${ARCH} \ +ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm64=arm64 GOLANG_ARCH_s390x=s390x GOLANG_ARCH=GOLANG_ARCH_${ARCH} \ GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash RUN wget -O - https://storage.googleapis.com/golang/go1.14.15.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local && \ go get github.com/rancher/trash && go get -u golang.org/x/lint/golint @@ -34,6 +38,7 @@ RUN wget -O - https://storage.googleapis.com/golang/go1.14.15.linux-${!GOLANG_AR # GRPC health probe ENV GRPC_HEALTH_PROBE_amd64=https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/v0.3.2/grpc_health_probe-linux-amd64 \ GRPC_HEALTH_PROBE_arm64=https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/v0.3.2/grpc_health_probe-linux-arm64 \ + GRPC_HEALTH_PROBE_s390x=https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/v0.3.2/grpc_health_probe-linux-s390x \ GRPC_HEALTH_PROBE=GRPC_HEALTH_PROBE_${ARCH} RUN wget ${!GRPC_HEALTH_PROBE} -O /usr/local/bin/grpc_health_probe && \ @@ -42,6 +47,7 @@ RUN wget ${!GRPC_HEALTH_PROBE} -O /usr/local/bin/grpc_health_probe && \ # protoc ENV PROTOC_amd64=https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protoc-3.7.1-linux-x86_64.zip \ PROTOC_arm64=https://github.com/protocolbuffers/protobuf/releases/download/v3.7.1/protoc-3.7.1-linux-aarch_64.zip \ + PROTOC_s390x=https://github.com/protocolbuffers/protobuf/releases/download/v3.18.1/protoc-3.18.1-linux-s390_64.zip \ PROTOC=PROTOC_${ARCH} RUN cd /usr/src && \ diff --git a/scripts/package b/scripts/package index 84ffd684..3831336e 100755 --- a/scripts/package +++ b/scripts/package @@ -14,6 +14,9 @@ case $(uname -m) in x86_64) ARCH=amd64 ;; + s390x) + ARCH=s390x + ;; *) echo "$(uname -a): unsupported architecture" exit 1