Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #27 from linux-on-ibm-z/s390x-fix
Browse files Browse the repository at this point in the history
Enable CGO support for s390x platform
  • Loading branch information
k8s-ci-robot authored Mar 26, 2020
2 parents 1e80bc3 + 66c65f3 commit 73dc624
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions hack/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ go build \
-ldflags '-extldflags "-static"' \
-o /metrics-sidecar github.com/kubernetes-sigs/dashboard-metrics-scraper

elif [[ "$GOARCH" = "s390x" ]]; then

echo "Detected s390x. Setting additional variables.";

apt-get install -y gcc-s390x-linux-gnu

env CC=s390x-linux-gnu-gcc \
CGO_ENABLED=1 GOOS=linux \
go build \
-installsuffix 'static' \
-ldflags '-extldflags "-static"' \
-o /metrics-sidecar github.com/kubernetes-sigs/dashboard-metrics-scraper
else

echo "Build script building for ${GOARCH}";
Expand Down

0 comments on commit 73dc624

Please sign in to comment.