In the file make.bat found in go/src (after unzipping tar), there is a gcc compile command even before a check for CGO_ENABLED ever is used. This messes up the bootstrap tool build.
For security reasons I cannot install GCC on Windows via cygwin or ming. However, the compiles are for various .c files which makes me unsure about what to do next.
I've tinkered about with the source code and the environment variables, especially CGO_ENABLED, which should have been all I needed. However, the make.bat haas that irritating little c compile that seems to be throwing me off.
This is the make.bat file and the compile that's throwing me off:
:: CGO_ENABLED: Controls cgo usage during the build. Set it to 1
:: to include all cgo related files, .c and .go file with "cgo"
:: build directive, in the build. Set it to 0 to ignore them.
@echo off
:: Keep environment variables within this script
:: unless invoked with --no-local.
if x%1==x--no-local goto nolocal
if x%2==x--no-local goto nolocal
setlocal
:nolocal
set GOBUILDFAIL=0
if exist make.bat goto ok
echo Must run make.bat from Go src directory.
goto fail
:ok
:: Clean old generated file that will cause problems in the build.
del /F ".\pkguntimeuntime_defs.go" 2>NUL
:: Grab default GOROOT_FINAL and set GOROOT for build.
:: The expression %VAR:\=\\% means to take %VAR%
:: and apply the substitution \ = \\, escaping the
:: backslashes. Then we wrap that in quotes to create
:: a C string.
cd ..
set GOROOT=%CD%
cd src
if "x%GOROOT_FINAL%"=="x" set GOROOT_FINAL=%GOROOT%
set DEFGOROOT=-DGOROOT_FINAL="\"%GOROOT_FINAL:\=\\%\""
echo # Building C bootstrap tool.
echo cmd/dist/*.c
if not exist ..\bin\tool mkdir ..\bin\tool
:: Windows has no glob expansion, so spell out cmd/dist/*.c.
gcc -O2 -Wall -Werror -o cmd/dist/dist.exe -Icmd/dist %DEFGOROOT% cmd/dist/buf.c cmd/dist/build.c cmd/dist/buildgc.c cmd/dist/buildgo.c cmd/dist/buildruntime.c cmd/dist/main.c cmd/dist/windows.c cmd/dist/arm.c
if errorlevel 1 goto fail
.\cmd\dist\dist env -wp >env.bat
if errorlevel 1 goto fail
call env.bat
del env.bat
echo.
The final result is just a standard gcc error :
Building C bootstrap tool.
cmd/dist/*.c
"gcc" is not recognized as...