From e44d4fcb96cc437c7839cc997d44390c91328e8c Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 6 Jun 2021 19:28:02 +0200 Subject: crossbuild.bash: disable CGO build-without-openssl.bash also disables CGO, so this makes it more real-world-y. But the real reason is that disabling CGO hopefully fixes this travis ci build failure: +GOOS=darwin +GOARCH=arm64 +go build -tags without_openssl /home/travis/.gimme/versions/go1.13.15.linux.amd64/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /usr/bin/ld: unrecognized option '-pagezero_size' /usr/bin/ld: use the --help option for usage information collect2: error: ld returned 1 exit status The command "./crossbuild.bash" exited with 2. --- crossbuild.bash | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crossbuild.bash') diff --git a/crossbuild.bash b/crossbuild.bash index 0f3963f..2510bb0 100755 --- a/crossbuild.bash +++ b/crossbuild.bash @@ -1,4 +1,6 @@ #!/bin/bash -eu +# +# Build on all supported architectures & operating systems cd "$(dirname "$0")" @@ -7,6 +9,10 @@ B="go build -tags without_openssl" set -x +export CGO_ENABLED=0 + +GOOS=linux GOARCH=amd64 $B + # See https://github.com/golang/go/wiki/GoArm GOOS=linux GOARCH=arm GOARM=7 $B GOOS=linux GOARCH=arm64 $B -- cgit v1.2.3