diff mbox

[3/9] package/go-bootstrap: Set CC to host CC

Message ID 14cc3c8334b20ed8b9f5510556a4b83dc4f85e55.1463010771.git.geoff@infradead.org
State Changes Requested
Headers show

Commit Message

Geoff Levand May 12, 2016, 12:08 a.m. UTC
Use the host compiler when building host tools.

Signed-off-by: Geoff Levand <geoff@infradead.org>
---
 package/go-bootstrap/go-bootstrap.mk | 1 +
 1 file changed, 1 insertion(+)

Comments

Thomas Petazzoni May 12, 2016, 1:28 p.m. UTC | #1
Hello,

On Thu, 12 May 2016 00:08:46 +0000, Geoff Levand wrote:

> diff --git a/package/go-bootstrap/go-bootstrap.mk b/package/go-bootstrap/go-bootstrap.mk
> index 1ced355..5dc839a 100644
> --- a/package/go-bootstrap/go-bootstrap.mk
> +++ b/package/go-bootstrap/go-bootstrap.mk
> @@ -20,6 +20,7 @@ HOST_GO_BOOTSTRAP_MAKE_ENV = \
>  	GOROOT_FINAL="$(HOST_GO_BOOTSTRAP_ROOT)" \
>  	GOROOT="$(@D)" \
>  	GOBIN="$(@D)/bin" \
> +	CC=$(HOSTCC_NOCCACHE) \

Why do you use HOSTCC_NOCCACHE instead of just HOSTCC ? Is the usage of
ccache a problem?

Thanks,

Thomas
Geoff Levand May 12, 2016, 4:53 p.m. UTC | #2
On Thu, 2016-05-12 at 15:28 +0200, Thomas Petazzoni wrote:
> On Thu, 12 May 2016 00:08:46 +0000, Geoff Levand wrote:
> 
> > diff --git a/package/go-bootstrap/go-bootstrap.mk b/package/go
> > -bootstrap/go-bootstrap.mk
> > index 1ced355..5dc839a 100644
> > --- a/package/go-bootstrap/go-bootstrap.mk
> > +++ b/package/go-bootstrap/go-bootstrap.mk
> > @@ -20,6 +20,7 @@ HOST_GO_BOOTSTRAP_MAKE_ENV = \
> >  	GOROOT_FINAL="$(HOST_GO_BOOTSTRAP_ROOT)" \
> >  	GOROOT="$(@D)" \
> >  	GOBIN="$(@D)/bin" \
> > +	CC=$(HOSTCC_NOCCACHE) \
> 
> Why do you use HOSTCC_NOCCACHE instead of just HOSTCC ? Is the usage
> of
> ccache a problem?
> 

Yes, it is generally known that the go build system is not compatible
with the use of ccache.

  https://github.com/golang/go/issues/11685

-Geoff
Thomas Petazzoni May 13, 2016, 1:30 p.m. UTC | #3
Hello,

On Thu, 12 May 2016 09:53:32 -0700, Geoff Levand wrote:

> Yes, it is generally known that the go build system is not compatible
> with the use of ccache.
> 
>   https://github.com/golang/go/issues/11685

OK. Then please improve the commit log to explain this, and add a
comment in the code that it is intentional to not use ccache because it
doesn't play well with Go's build system.

Thanks!

Thomas
diff mbox

Patch

diff --git a/package/go-bootstrap/go-bootstrap.mk b/package/go-bootstrap/go-bootstrap.mk
index 1ced355..5dc839a 100644
--- a/package/go-bootstrap/go-bootstrap.mk
+++ b/package/go-bootstrap/go-bootstrap.mk
@@ -20,6 +20,7 @@  HOST_GO_BOOTSTRAP_MAKE_ENV = \
 	GOROOT_FINAL="$(HOST_GO_BOOTSTRAP_ROOT)" \
 	GOROOT="$(@D)" \
 	GOBIN="$(@D)/bin" \
+	CC=$(HOSTCC_NOCCACHE) \
 	CGO_ENABLED=0
 
 define HOST_GO_BOOTSTRAP_BUILD_CMDS