Re: [go-nuts] go executable cross-compiled for arm5 works on amd64 (and arm5)

2017-02-16 Thread Dan Kortschak
Thank you. Yes, I had forgotten I'd installed that (needed for kernel building for the very same arm5 device). Dan On Thu, 2017-02-16 at 21:31 +1300, Michael Hudson-Doyle wrote: > Do you have qemu-user-static or a similarly named package installed? > Then > the magic of binfmt_misc may be invokin

Re: [go-nuts] go executable cross-compiled for arm5 works on amd64 (and arm5)

2017-02-16 Thread Michael Hudson-Doyle
Do you have qemu-user-static or a similarly named package installed? Then the magic of binfmt_misc may be invoking it. For me: $ cat /proc/sys/fs/binfmt_misc/qemu-arm enabled interpreter /usr/bin/qemu-arm-static flags: OC offset 0 magic 7f454c460101010002002800 mask ff0

[go-nuts] go executable cross-compiled for arm5 works on amd64 (and arm5)

2017-02-15 Thread Dan Kortschak
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="" GO