oeqa/gotoolchain: set CGO_ENABLED=1

In cross-compiles CGO_ENABLED=1 needs to be set explicitly, as otherwise
Go refuses to use it even if CC is already set.

This fixes the selftest on setups where the host and the SDK target
don't have matching architectures.

[ YOCTO #14859 ]

(From OE-Core rev: 19be072619d39267df44f23c4c8b64f3808f6148)

(From OE-Core rev: ebdc76b3c29fd4915bee39026f780172fdf8fa1a)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2022-08-25 14:37:49 +01:00
committed by Richard Purdie
parent d45b3be4bf
commit 79668237c9

View File

@@ -51,6 +51,7 @@ class oeGoToolchainSelfTest(OESelftestTestCase):
cmd = cmd + ". %s; " % self.env_SDK
cmd = cmd + "export GOPATH=%s; " % self.go_path
cmd = cmd + "export GOFLAGS=-modcacherw; "
cmd = cmd + "export CGO_ENABLED=1; "
cmd = cmd + "${CROSS_COMPILE}go %s" % gocmd
return runCmd(cmd).status