[OE-core] [PATCH 0/2] Define GO386 for go cross-compilation

Paul Barker pbarker at toganlabs.com
Fri Oct 13 19:25:27 UTC 2017


These changes resolve the "illegal instruction" errors seen when running go
binaries on qemux86 by ensuring that the GO386 environment variable is exported
and set to an appropriate value. This variable in turn controls the floating
point instructions emitted by the go compiler for x86 platforms and must be set
to "387" for platforms which do not support sse2 instructions.

The go_map_386 function is initially implemented to recognise the two x86
tunings defined in oe-core which support sse2 instructions: "core2" and
"corei7". This can be extended later if additional tunings need to be recognised
to support x86 targets defined in other layers.

My hope is that these patches are suitable for inclusion in the rocko branch
(after the 2.4.0 release now). If not then please flag this and I'll look for
alternative solutions. I don't think that leaving all go binaries as broken on
qemux86 if they happen to use floating point operations is a valid option for
the rocko branch.

Paul Barker (2):
  goarch.bbclass: Define HOST_GO386 and TARGET_GO386
  go: Export correct GO386 value for target

 meta/classes/goarch.bbclass                    | 11 +++++++++++
 meta/recipes-devtools/go/go-cross-canadian.inc |  1 +
 meta/recipes-devtools/go/go-cross.inc          |  2 ++
 meta/recipes-devtools/go/go-runtime.inc        |  1 +
 meta/recipes-devtools/go/go-target.inc         |  1 +
 5 files changed, 16 insertions(+)

-- 
2.7.4




More information about the Openembedded-core mailing list