Can someone explain to me why this works? I am cross-compiling for arm5, but the executable works on amd64.
$ cat hello.go package main import "fmt" func main() { fmt.Println("hello") } $ GOARCH=arm GOARM=5 go build hello.go $ ./hello hello $ go env GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/daniel" GORACE="" GOROOT="/home/daniel/go" GOTOOLDIR="/home/daniel/go/pkg/tool/linux_amd64" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix- map=/tmp/go-build014006335=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="1" $ go version go version go1.7.4 linux/amd64 The executable also works on the arm5 device. I'm not worried, but I don't understand how this works. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.