diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go index 8a3db32ad3..de9733e1c7 100644 --- a/src/cmd/dist/buildtool.go +++ b/src/cmd/dist/buildtool.go @@ -164,7 +164,7 @@ func bootstrapBuildTools() { // Use the math_big_pure_go build tag to disable the assembly in math/big // which may contain unsupported instructions. cmd := []string{ - pathf("%s/bin/go", goroot_bootstrap), + "go", "install", "-gcflags=-l", "-tags=math_big_pure_go", diff --git a/src/make.bat b/src/make.bat index bf25b95..a4e3bf1 100644 --- a/src/make.bat +++ b/src/make.bat @@ -67,8 +67,7 @@ if x%3==x-v set vflag=-v if x%4==x-v set vflag=-v if not exist ..\bin\tool mkdir ..\bin\tool -if "x%GOROOT_BOOTSTRAP%"=="x" set GOROOT_BOOTSTRAP=%HOMEDRIVE%%HOMEPATH%\Go1.4 -if not exist "%GOROOT_BOOTSTRAP%\bin\go.exe" goto bootstrapfail +if not exist "%GOROOT_BOOTSTRAP%\..\..\bin\go.exe" goto bootstrapfail echo Building Go cmd/dist using %GOROOT_BOOTSTRAP% if x%vflag==x-v echo cmd/dist setlocal @@ -76,7 +75,7 @@ set GOROOT=%GOROOT_BOOTSTRAP% set GOOS= set GOARCH= set GOBIN= -"%GOROOT_BOOTSTRAP%\bin\go" build -o cmd\dist\dist.exe .\cmd\dist +go build -o cmd\dist\dist.exe .\cmd\dist endlocal if errorlevel 1 goto fail .\cmd\dist\dist env -w -p >env.bat @@ -120,7 +119,7 @@ copy cmd\dist\dist.exe "%GOTOOLDIR%\" goto end :bootstrapfail -echo ERROR: Cannot find %GOROOT_BOOTSTRAP%\bin\go.exe +echo ERROR: Cannot find go.exe echo "Set GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." :fail