From: Ross Burton Date: Mon, 25 Jul 2022 15:53:44 +0000 (+0100) Subject: oeqa/gotoolchain: set CGO_ENABLED=1 X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~3499 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19be072619d39267df44f23c4c8b64f3808f6148;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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 ] Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/selftest/cases/gotoolchain.py b/meta/lib/oeqa/selftest/cases/gotoolchain.py index 345f533379c..978898b86f1 100644 --- a/meta/lib/oeqa/selftest/cases/gotoolchain.py +++ b/meta/lib/oeqa/selftest/cases/gotoolchain.py @@ -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