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

Daniel Thompson daniel.thompson at linaro.org
Wed Apr 24 14:36:06 UTC 2019


On Fri, Apr 12, 2019 at 10:45:07PM +0300, Adrian Bunk wrote:
> On Fri, Apr 12, 2019 at 01:30:46PM +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.
> >...
> 
> Why is this the only option for you?

Good point. Not the most accurate use of "must"... more "these
changes".

 
> The clean way to bootstrap go would be by building gccgo and using that 
> as starting point for the bootstrap.
> 
> Haven't tried how trivial or difficult it is to make that work,
> but it sounds more long-term maintainable than having different
> problems depending on what architecture and host distribution
> is used - it doesn't sound like a good idea to have to test
> and maintain all combinations, e.g. whether Go 1.6 on arm64
> in Ubuntu 16.04 manages to bootstrap the latest Go.

Source wise it should work (depending on your level of belief in the go
compatibility promise) since the go compiler is written in go-1.4 but I
agree that code generation bugs in old versions of go tools could make
things less predictable.

I'm suddenly a bit swamped so it could me a long time to look at but
using gccgo to bootstrap is not structurally much more complex than
bootstrapping with go-1.4 and certainly could be more flexible. Sounds
like "the right thing to do" so definitely worth a shot.


Thanks


Daniel.


> -- 
> 
>        "Is there not promise of rain?" Ling Tan asked suddenly out
>         of the darkness. There had been need of rain for many days.
>        "Only a promise," Lao Er said.
>                                        Pearl S. Buck - Dragon Seed
> 


More information about the Openembedded-core mailing list