[OE-core] [PATCH] go: Allow bootstrapping using host go compiler

Richard Purdie richard.purdie at linuxfoundation.org
Fri Apr 12 12:39:52 UTC 2019


On Fri, 2019-04-12 at 13:30 +0100, Daniel Thompson wrote:
> Currently go-native bootstraps without any dependency on the host go
> compiler by building go-1.4 (the last version written in C) and using
> that to build a more recent version of go. This does not work on host
> architectures, such as arm64, that are not supported by go-1.4. To
> support these host architectures we must rely on an existing host go
> compiler and use that to build go-native instead.
> 
> Rather than add arm64 specific code that forces the use of the host
> go
> compiler, we use an architecture neutral approach based on adopting
> the
> host go compiler if it is both recent enough and the output of `go
> env
> GOROOT` passes basic sanity testing.
> 
> Signed-off-by: Daniel Thompson <daniel.thompson at linaro.org>
> ---
>  meta/conf/bitbake.conf                 |  4 +++
>  meta/recipes-devtools/go/go-native.inc | 38
> ++++++++++++++++++++++++--
>  2 files changed, 39 insertions(+), 3 deletions(-)

Whilst this is quite a creative approach it isn't deterministic and I
can see this introducing bugs which are hard to track down :(

I think we need to make this a specific configuration option.

Cheers,

Richard



More information about the Openembedded-core mailing list