# Bootstrapping arm64 Go on Plan 9

# in -arm64- bootstrap dir
cd $GOROOT
GOROOT_BOOTSTRAP=`{pwd}


# in upstream dir
GOROOT=`{pwd}
fn nogoenv {
	GO111MODULE=off GOENV=off GOOS=() GOARCH=() GOEXPERIMENT=() GOFLAGS=() $*
}

cd $upstream/src
GOROOT=$GOROOT_BOOTSTRAP nogoenv $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist
./cmd/dist
GOTOOLDIR = $upstream/pkg/tool/plan9_arm64
mkdir -p $GOTOOLDIR
cp ./cmd/dist/dist $upstream/pkg/tool/plan9_arm64/
git/compat
go version > $GOROOT/VERSION
go version > $GOROOT_BOOTSTRAP/VERSION
./cmd/dist/dist bootstrap -a -v
# sip coffee