]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commit
package/go: Build host tools with host CC
authorGeoff Levand <geoff@infradead.org>
Thu, 26 May 2016 18:21:32 +0000 (18:21 +0000)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 26 May 2016 19:03:53 +0000 (21:03 +0200)
commit60c5c96ae109dcea48e0997b5e6e6645ac9b8629
treebbedb3f8002e0bec36507d1f4fd2ce4708b20d19
parentb5630ad7125d30cb5d65de49cc2f120bb5cf62ec
package/go: Build host tools with host CC

The go build system doesn't have the notion of cross compiling, but just the
notion of architecture.  When the host and target architectures are different
it expects to be given a target cross compiler in CC_FOR_TARGET.  When the
architectures are the same it will use CC_FOR_TARGET for both host and target
compilation.  To work around this limitation build and install a set of
compiler and tool binaries built with CC_FOR_TARGET set to the host compiler.
Also, the go build system is not compatible with ccache, so use
HOSTCC_NOCCACHE.  See https://github.com/golang/go/issues/11685.

Fixes build errors like these:

  host/usr/bin/go: No such file or directory

  http://autobuild.buildroot.net/results/6664189a6f3a815978e8d0a1d7ef408ca47e2874/

Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/go/go.mk