From 486cda309f09b11e8f96a91bcebfc5daf85bd07d Mon Sep 17 00:00:00 2001 From: Dominik Honnef Date: Tue, 1 Jul 2014 16:24:49 +0200 Subject: [PATCH] go: build for all supported OSs --- srcpkgs/go/template | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/srcpkgs/go/template b/srcpkgs/go/template index 9d430ab6155..d7e739e4bf3 100644 --- a/srcpkgs/go/template +++ b/srcpkgs/go/template @@ -36,21 +36,25 @@ do_build() { export GOROOT=$PWD export GOROOT_FINAL="/usr/lib/go" - export GOOS=linux + export GOOS= + export GOARCH= export GOPATH=/tmp mkdir -p $GOPATH/src cd src - # TODO We could very well also build windows and darwin - # cross-compilers here, at no added complexity - - # Build ARM, x86 and x86_64 compilers - for arch in arm 386 amd64; do - export GOARCH=$arch - bash make.bash --no-clean + GOOS=linux + GOARCH=arm + bash make.bash --no-clean + for os in darwin freebsd linux windows; do + for arch in 386 amd64; do + GOARCH=$arch + GOOS=$os + bash make.bash --no-clean + done done + GOOS=linux GOARCH=$targetarch hg clone -u release-branch.go${version} \