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:

+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.
This commit is contained in:
Jakob Unterwurzacher 2021-06-06 19:28:02 +02:00
parent 17f859d3c4
commit e44d4fcb96
1 changed files with 6 additions and 0 deletions

View File

@ -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
GOOS=linux GOARCH=arm GOARM=7 $B
GOOS=linux GOARCH=arm64 $B