Hasn't been necessary in Go for a long time [1], so we should take
advantage of that. For an example of the advantages, the 'micro' editor
went from 15MB to 11MB on disk.
[1] https://honnef.co/posts/2016/10/go-and-strip/
This checks if gcc-go-tools have been specified in host deps
and if so, use gccgo to build (gcc-go-tools conflicts with go).
Also, since gccgo is not a multi-compiler, we need to override GCCGO
to get cross-builds. The gccgo for target is always installed, as
it's a part of our cross-toolchains.
[ci skip]
This is necessary so that crossbuilds to unsupported architectures
are not actually attempted. There is a default archs set which
covers all architectures supported by the official compiler,
and setting it in the template can be used to restrict it more.
Also, add missing GOARCHs. These are irrelevant to whether we
can currently build for that arch or not. Just keep it around
as a list of potential archs to support. These are taken from
gccgo, and in case support for anything is added in the official
compiler, they should match.
This adds the build profiles for ppc64 targets as well as
modifications in other parts of the infra.
These targets are supported:
- ppc64le (glibc little endian elfv2)
- ppc64le-musl (musl little endian)
- ppc64-musl (musl big endian)
ELFv1 targets are explicitly not supported at this point.
Big endian musl supports ppc 970 or newer, while little endian
targets are set to a generic powerpc64le which effectively means
POWER8 and newer. Tuning is always set for POWER9, which is the
most likely target hardware. We also make sure AltiVec is always
on, because it is supported on all hardware we target.
[ci skip]
Go 1.5 doesn't permit our use of GOBIN anymore, breaking
cross-compilation (for details, see
https://github.com/golang/go/issues/9769)
In retrospect, I'm not sure why we set GOBIN in the first place;
GOPATH/bin should suffice.
Closes#2337