Go 1.4 should build what it knows how to build.
GOHOSTOS and GOHOSTARCH are for the Go 1.5 build only.
Change-Id: Id0f367f03485100a896e61cfdace4ac44a22e16d
Reviewed-on: https://go-review.googlesource.com/2818
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
echo "Set \$GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." >&2
fi
rm -f cmd/dist/dist
-GOROOT="$GOROOT_BOOTSTRAP" GOOS="$GOHOSTOS" GOARCH="$GOHOSTARCH" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
+GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
# -e doesn't propagate out of eval, so check success by hand.
eval $(./cmd/dist/dist env -p || echo FAIL=true)
if not exist "%GOROOT_BOOTSTRAP%\bin\go.exe" goto bootstrapfail
setlocal
set GOROOT=%GOROOT_BOOTSTRAP%
-set GOOS=%GOHOSTOS%
-set GOARCH=%GOHOSTARCH%
+set GOOS=
+set GOARCH=
"%GOROOT_BOOTSTRAP%\bin\go" build -o cmd\dist\dist.exe .\cmd\dist
endlocal
if errorlevel 1 goto fail
exit bootstrap
}
rm -f cmd/dist/dist
-GOROOT=$GOROOT_BOOTSTRAP GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist ./cmd/dist
+GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist ./cmd/dist
eval `{./cmd/dist/dist env -9}
echo