If I run the gotoolchain selftest on an aarch64 host with MACHINE=qemux86-64, the test fails: AssertionError: Command 'cd /tmp/SDKQAg7yt6cs3/go/src/github.com/direnv/direnv; . /tmp/SDKQAg7yt6cs3/environment-setup-core2-64-poky-linux; export GOPATH=/tmp/SDKQAg7yt6cs3/go; ${CROSS_COMPILE}go build' returned non-zero exit status 2: go: downloading github.com/BurntSushi/toml v0.3.1 go: downloading golang.org/x/mod v0.4.0 go: downloading github.com/direnv/go-dotenv v0.0.0-20181227095604-4cce6d1a66f7 go: downloading github.com/mattn/go-isatty v0.0.12 go: downloading golang.org/x/sys v0.0.0-20200116001909-b77594299b42 # github.com/direnv/direnv cannot find package runtime/cgo (using -importcfg) /tmp/SDKQAg7yt6cs3/sysroots/aarch64-pokysdk-linux/usr/lib/x86_64-poky-linux/go/pkg/tool/linux_arm64/link: cannot open file : open : no such file or directory
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14860 is another Go/SDK issue.
CGO_ENABLED=1 needed to be set. Patch on the list.
Fixed in 19be072619d39267df44f23c4c8b64f3808f6148.