All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC, v2, 1/4] package/go: fixing crosscompilation settings
@ 2017-10-19 17:20 Christian Stewart
  2017-10-19 19:54 ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Christian Stewart @ 2017-10-19 17:20 UTC (permalink / raw)
  To: buildroot

Hi all,

On Mon, 16 Oct 2017 19:08:45 +0200, Angelo Compagnucci
<angelo.compagnucci@gmail.com> wrote:
> This patch fixes a bug with the BR2_TOOLCHAIN_HAS_THREADS variable
> handling which causes CGO_ENABLED to be always 0.
>
> Furthermore, it fixes the cross compilation options for the go compiler:
> setting CGO_ENABLED should be done only for the target compiler not the
> host one.

Tested, works fine. Signing off on the first commit in the series only.

Signed-off-by: Christian Stewart <christian@paral.in>

Best,
Christian Stewart

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [RFC, v2, 1/4] package/go: fixing crosscompilation settings
  2017-10-19 17:20 [Buildroot] [RFC, v2, 1/4] package/go: fixing crosscompilation settings Christian Stewart
@ 2017-10-19 19:54 ` Thomas Petazzoni
  2017-10-19 20:17   ` Christian Stewart
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni @ 2017-10-19 19:54 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 19 Oct 2017 13:20:14 -0400, Christian Stewart wrote:

> Tested, works fine. Signing off on the first commit in the series only.
> 
> Signed-off-by: Christian Stewart <christian@paral.in>

So, this should be a Tested-by I guess.

Signed-off-by is added if you wrote the code or convey the code.
Tested-by is if you tested it without necessarily looking at the
code/reviewing it, Acked-by if you agree with it (it's a strong
statement), Reviewed-by if you reviewed it (it's somewhat weaker than
Acked-by).

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [RFC, v2, 1/4] package/go: fixing crosscompilation settings
  2017-10-19 19:54 ` Thomas Petazzoni
@ 2017-10-19 20:17   ` Christian Stewart
  0 siblings, 0 replies; 7+ messages in thread
From: Christian Stewart @ 2017-10-19 20:17 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On Thu, Oct 19, 2017 at 3:54 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Signed-off-by is added if you wrote the code or convey the code.
> Tested-by is if you tested it without necessarily looking at the
> code/reviewing it, Acked-by if you agree with it (it's a strong
> statement), Reviewed-by if you reviewed it (it's somewhat weaker than
> Acked-by).

Ah, my bad. In that case:

Acked-by: Christian Stewart <christian@paral.in>

The fix looks correct.

Best,
Christian

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [RFC v2 1/4] package/go: fixing crosscompilation settings
  2017-10-21 19:51 ` Thomas Petazzoni
  2017-10-22 22:48   ` Peter Korsgaard
@ 2017-10-25  7:41   ` Peter Korsgaard
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2017-10-25  7:41 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Hello,
 > On Mon, 16 Oct 2017 19:08:45 +0200, Angelo Compagnucci wrote:
 >> This patch fixes a bug with the BR2_TOOLCHAIN_HAS_THREADS variable
 >> handling which causes CGO_ENABLED to be always 0.
 >> 
 >> Furthermore, it fixes the cross compilation options for the go compiler:
 >> setting CGO_ENABLED should be done only for the target compiler not the
 >> host one.
 >> 
 >> Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
 >> ---
 >> package/go/go.mk | 14 ++++++++------
 >> 1 file changed, 8 insertions(+), 6 deletions(-)

 > Thanks applied the patch, with Christian's Acked-by.

Committed to 2017.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [RFC v2 1/4] package/go: fixing crosscompilation settings
  2017-10-21 19:51 ` Thomas Petazzoni
@ 2017-10-22 22:48   ` Peter Korsgaard
  2017-10-25  7:41   ` Peter Korsgaard
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2017-10-22 22:48 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Hello,
 > On Mon, 16 Oct 2017 19:08:45 +0200, Angelo Compagnucci wrote:
 >> This patch fixes a bug with the BR2_TOOLCHAIN_HAS_THREADS variable
 >> handling which causes CGO_ENABLED to be always 0.
 >> 
 >> Furthermore, it fixes the cross compilation options for the go compiler:
 >> setting CGO_ENABLED should be done only for the target compiler not the
 >> host one.
 >> 
 >> Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
 >> ---
 >> package/go/go.mk | 14 ++++++++------
 >> 1 file changed, 8 insertions(+), 6 deletions(-)

 > Thanks applied the patch, with Christian's Acked-by.

Committed to 2017.08.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [RFC v2 1/4] package/go: fixing crosscompilation settings
  2017-10-16 17:08 [Buildroot] [RFC v2 " Angelo Compagnucci
@ 2017-10-21 19:51 ` Thomas Petazzoni
  2017-10-22 22:48   ` Peter Korsgaard
  2017-10-25  7:41   ` Peter Korsgaard
  0 siblings, 2 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2017-10-21 19:51 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 16 Oct 2017 19:08:45 +0200, Angelo Compagnucci wrote:
> This patch fixes a bug with the BR2_TOOLCHAIN_HAS_THREADS variable
> handling which causes CGO_ENABLED to be always 0.
> 
> Furthermore, it fixes the cross compilation options for the go compiler:
> setting CGO_ENABLED should be done only for the target compiler not the
> host one.
> 
> Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
> ---
>  package/go/go.mk | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)

Thanks applied the patch, with Christian's Acked-by.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Buildroot] [RFC v2 1/4] package/go: fixing crosscompilation settings
@ 2017-10-16 17:08 Angelo Compagnucci
  2017-10-21 19:51 ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Angelo Compagnucci @ 2017-10-16 17:08 UTC (permalink / raw)
  To: buildroot

This patch fixes a bug with the BR2_TOOLCHAIN_HAS_THREADS variable
handling which causes CGO_ENABLED to be always 0.

Furthermore, it fixes the cross compilation options for the go compiler:
setting CGO_ENABLED should be done only for the target compiler not the
host one.

Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
---
 package/go/go.mk | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/package/go/go.mk b/package/go/go.mk
index 0781dff..6035164 100644
--- a/package/go/go.mk
+++ b/package/go/go.mk
@@ -52,7 +52,7 @@ HOST_GO_TARGET_ENV = \
 # set, build in cgo support for any go programs that may need it.  Note that
 # any target package needing cgo support must include
 # 'depends on BR2_TOOLCHAIN_HAS_THREADS' in its config file.
-ifeq (BR2_TOOLCHAIN_HAS_THREADS,y)
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
 HOST_GO_CGO_ENABLED = 1
 else
 HOST_GO_CGO_ENABLED = 0
@@ -74,8 +74,8 @@ HOST_GO_MAKE_ENV = \
 	GOARCH=$(GO_GOARCH) \
 	$(if $(GO_GOARM),GOARM=$(GO_GOARM)) \
 	GOOS=linux \
-	CGO_ENABLED=$(HOST_GO_CGO_ENABLED) \
-	CC=$(HOSTCC_NOCCACHE)
+	CC=$(HOSTCC_NOCCACHE) \
+	CXX=$(HOSTCXX_NOCCACHE)
 
 HOST_GO_TARGET_CC = \
 	CC_FOR_TARGET="$(TARGET_CC)" \
@@ -83,16 +83,18 @@ HOST_GO_TARGET_CC = \
 
 HOST_GO_HOST_CC = \
 	CC_FOR_TARGET=$(HOSTCC_NOCCACHE) \
-	CXX_FOR_TARGET=$(HOSTCC_NOCCACHE)
+	CXX_FOR_TARGET=$(HOSTCXX_NOCCACHE)
 
 HOST_GO_TMP = $(@D)/host-go-tmp
 
 define HOST_GO_BUILD_CMDS
-	cd $(@D)/src && $(HOST_GO_MAKE_ENV) $(HOST_GO_HOST_CC) ./make.bash
+	cd $(@D)/src && \
+		$(HOST_GO_MAKE_ENV) $(HOST_GO_HOST_CC) CGO_ENABLED=0 ./make.bash
 	mkdir -p $(HOST_GO_TMP)
 	mv $(@D)/pkg/tool $(HOST_GO_TMP)/
 	mv $(@D)/bin/ $(HOST_GO_TMP)/
-	cd $(@D)/src && $(HOST_GO_MAKE_ENV) $(HOST_GO_TARGET_CC) ./make.bash
+	cd $(@D)/src && \
+		$(HOST_GO_MAKE_ENV) $(HOST_GO_TARGET_CC) CGO_ENABLED=$(HOST_GO_CGO_ENABLED) ./make.bash
 endef
 
 define HOST_GO_INSTALL_CMDS
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-10-25  7:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-19 17:20 [Buildroot] [RFC, v2, 1/4] package/go: fixing crosscompilation settings Christian Stewart
2017-10-19 19:54 ` Thomas Petazzoni
2017-10-19 20:17   ` Christian Stewart
  -- strict thread matches above, loose matches on Subject: below --
2017-10-16 17:08 [Buildroot] [RFC v2 " Angelo Compagnucci
2017-10-21 19:51 ` Thomas Petazzoni
2017-10-22 22:48   ` Peter Korsgaard
2017-10-25  7:41   ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.