package/go-bootstrap: Build host tools with host CC
authorGeoff Levand <geoff@infradead.org>
Thu, 19 May 2016 22:33:25 +0000 (22:33 +0000)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 4 Jul 2016 13:07:48 +0000 (15:07 +0200)
Use the host compiler when building host tools.

The go build system is not compatable with ccache, so use HOSTCC_NOCCACHE
here.  See https://github.com/golang/go/issues/11685.

Signed-off-by: Geoff Levand <geoff@infradead.org>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/go-bootstrap/go-bootstrap.mk

index 47f5013232f38186dd3635f08bf1dddde077cbf4..29f2b0333598f8eb714e86912bd5a3eae30a0900 100644 (file)
@@ -19,11 +19,14 @@ HOST_GO_BOOTSTRAP_DEPENDENCIES = toolchain
 
 HOST_GO_BOOTSTRAP_ROOT = $(HOST_DIR)/usr/lib/go-$(GO_BOOTSTRAP_VERSION)
 
+# The go build system is not compatable with ccache, so use HOSTCC_NOCCACHE
+# here.  See https://github.com/golang/go/issues/11685.
 HOST_GO_BOOTSTRAP_MAKE_ENV = \
        GOOS=linux \
        GOROOT_FINAL="$(HOST_GO_BOOTSTRAP_ROOT)" \
        GOROOT="$(@D)" \
        GOBIN="$(@D)/bin" \
+       CC=$(HOSTCC_NOCCACHE) \
        CGO_ENABLED=0
 
 define HOST_GO_BOOTSTRAP_BUILD_CMDS