sh-3.2# CGO_ENABLED=0 GOARCH=arm GOOS=linux ./make.bash
# Building C bootstrap tool.
cmd/dist
# Building compilers and Go bootstrap tool for host, darwin/amd64.
lib9
libbio
libmach
misc/pprof
cmd/addr2line
cmd/cov
cmd/nm
cmd/objdump
cmd/pack
cmd/prof
cmd/cc
cmd/gc
cmd/6l
cmd/5l
/usr/local/go/src/cmd/5l/../ld/lib.c:661:9: error: no case matching constant switch condition '53'
[-Werror]
switch(the char){
^~~~~~~
1 error generated.
go tool dist: FAILED: gcc -Wall -Wstrict-prototypes -Wno-sign-compare -Wno-missing-braces -Wno-parentheses -Wno-unknown-pragmas -Wno-switch -Wno-comment -Werror -fno-common -ggdb -pipe -O2 -mmacosx-version-min=10.6 -c -m64 -I /usr/local/go/include -I /usr/local/go/src/cmd/5l -o /usr/local/go/pkg/obj/cmd/5l/lib.o /usr/local/go/src/cmd/5l/../ld/lib.c
就只有arm不行。
下面这些都 可以正常执行:
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux ./make.bash
CGO_ENABLED=0 GOARCH= amd64 GOOS=windows ./make.bash