chicken > egg > chicken > egg > chicken > egg > chicken > egg > chicken > egg >
relevant quote:
Install Go compiler binaries for bootstrap
The Go toolchain is written in Go. To build it, you need a Go compiler installed. The scripts that do the initial build of the tools look for a "go" command in $PATH, so as long as you have Go installed in your system and configured in your $PATH, you are ready to build Go from source. Or if you prefer you can set $GOROOT_BOOTSTRAP to the root of a Go installation to use to build the new Go toolchain; $GOROOT_BOOTSTRAP/bin/go should be the go command to use.
There are four possible ways to obtain a bootstrap toolchain:
Download a recent binary release of Go.
Cross-compile a toolchain using a system with a working Go installation.
Use gccgo.
Compile a toolchain from Go 1.4, the last Go release with a compiler written in C.
These approaches are detailed below.
@selea @kmj
i'm not 100% sure the newer releases use no new features but in theory:
the last c release was 1.4, so you should be fine with using 1.8 to build 1.19. just make sure the tests are run as a sanity check, which happens automatically if you build with ./all.bash
otherwise you'd have to build multiple versions, which is quite fast though.
also you should be able to cross-compile as long as the architecture and os are supported, but i never done that :) it's usually done by just setting GOOS and GOARCH, but the whole compiler might need some extra flags.
Yeah I tried it. But I got errors that it required go 1.17 and nog 1.8 :p
I can see why it is nice :) my case is very special thou ;)
@selea @kmj
TL;DR:
GOROOT_BOOTSTRAP=path/to/go1.8 ./all.bash
should be your first try.