From 5b7b390a3330a387a2c875c7c7a53b6e5ae8128c Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Sun, 13 Sep 2020 10:32:45 +1000 Subject: [PATCH] Force static linking --- scripts/xcompile.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/xcompile.sh b/scripts/xcompile.sh index 93b3516..4f640ba 100755 --- a/scripts/xcompile.sh +++ b/scripts/xcompile.sh @@ -3,9 +3,10 @@ # This assumes that gonative and gox is installed as per the 'one time setup' instructions # at https://github.com/inconshreveable/gonative -gox -ldflags "${LDFLAGS}" -output="build/yq_{{.OS}}_{{.Arch}}" + +CGO_ENABLED=0 gox -ldflags "${LDFLAGS}" -output="build/yq_{{.OS}}_{{.Arch}}" # include non-default linux builds too -gox -ldflags "${LDFLAGS}" -os=linux -output="build/yq_{{.OS}}_{{.Arch}}" +CGO_ENABLED=0 gox -ldflags "${LDFLAGS}" -os=linux -output="build/yq_{{.OS}}_{{.Arch}}" cd build rhash -r -a . -P -o checksums