]> code.ossystems Code Review - openembedded-core.git/commit
go.bbclass: Export more GO* environment variables
authorMark Asselstine <mark.asselstine@windriver.com>
Mon, 18 Mar 2019 15:21:52 +0000 (11:21 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 10 Apr 2019 12:46:08 +0000 (13:46 +0100)
commit6300c4a83f7c8fc88702798ffe25bd6d57091673
tree82056faf859aa6212b3349e43ef9500f0908f2c7
parentd204398d40cbbea5a6b58a36fc289d569f2eb304
go.bbclass: Export more GO* environment variables

Currently we are not doing a good job of consolidating GO environment
variables used by the go build system in the go.bbclass, instead we
are relying on the individual GO recipe authors to perform the
exports. This can result in inconsistent build results and often
binaries that are not properly cross compiled, resulting in segfaults
when the applications are run on the target.

For example the GO documentation recommends that the environment
include a value assigned to GOARM when cross building for ARMv5, ARMv6
and ARMv7 (https://github.com/golang/go/wiki/GoArm).

In order to avoid polluting the build scripts with unnecessary
exports, such as run.do_compile, we attempt to only export variables
when they apply to a specific arch.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/go.bbclass