]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
oeqa/gotoolchain: set CGO_ENABLED=1
authorRoss Burton <ross.burton@arm.com>
Mon, 25 Jul 2022 15:53:44 +0000 (16:53 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 25 Jul 2022 21:57:54 +0000 (22:57 +0100)
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 ]

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/gotoolchain.py

index 345f533379cc8ca812baecdffcd00fec0f6423d2..978898b86f17a77aea3501420271bc4968f2caa8 100644 (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