Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/3] go: patch to fix cross-compilation support
Date: Fri, 11 May 2018 13:09:28 +0200	[thread overview]
Message-ID: <20180511130928.6211a644@windsurf.home> (raw)
In-Reply-To: <20180511101020.10295-2-anisse@astier.eu>

Hello,

Thanks a lot Anisse for those patches!

On Fri, 11 May 2018 12:10:18 +0200, Anisse Astier wrote:
> This patches the go toolchain with upstream-proposed patch by Angelo in
> order to fix cross-compilation when building a go toolchain for a target
> that has the same os and arch as host, but a different libc. This should
> fix the buildroot autobuild failures on x86_64 musl/uclibc targets.
> 
> This patch should go as soon as it's accepted or a similar upstream
> feature is merged.

The commit log of the patch that fixes the build issue should have a
reference to the autobuilder failure being fixed, such as:

Fixes:

  http://autobuild.buildroot.org/...

> I'm adding myself to the DEVELOPERS file in order to get CC-ed to future
> build failures.

This should be done as part of a separate patch.


> diff --git a/package/go/0001-cmd-dist-explicit-option-for-crosscompilation.patch b/package/go/0001-cmd-dist-explicit-option-for-crosscompilation.patch
> new file mode 100644
> index 0000000000..a779179609
> --- /dev/null
> +++ b/package/go/0001-cmd-dist-explicit-option-for-crosscompilation.patch
> @@ -0,0 +1,52 @@
> +From acb08e41dad7f0e642149449564f7276bca3ada4 Mon Sep 17 00:00:00 2001
> +From: Angelo Compagnucci <angelo.compagnucci@gmail.com>
> +Date: Tue, 8 May 2018 16:08:44 +0200
> +Subject: [PATCH] cmd/dist: explicit option for crosscompilation
> +
> +If GOHOSTOS == GOOS || GOHOSTARCH == GOARCH the go build system assume
> +it's not cross compiling and uses the same compiler for both
> +CC_FOR_TARGET and CC even if they are declared different. During go
> +compilation, this produces the error:
> +
> +fork/exec
> +/accts/mlweber1/rclinux/rc-buildroot-test/scripts/instance-2/output/build/host-go-1.10/bin/go:
> +no such file or directory
> +
> +cause the go binary produced is linked against a different libc and
> +cannot be run on the host machine.
> +
> +This is a problem in case the cross compilation mandates a different
> +toolchain for host and target like happens in cross compilation
> +environments like buildroot. This patch adds GO_ASSUME_CROSSCOMPILING
> +varible to assure that in case of cross compilation CC_FOR_TARGET can be
> +different from CC.
> +
> +Fixes #25177
> +
> +Change-Id: I4833c6d522407e29b039ca5660fd79df81e4b7ed

This should have your Signed-off-by as well.

Other than that, looks good to me. Could you respin a new version ?

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2018-05-11 11:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-11 10:10 [Buildroot] [PATCH 0/3] go package fixes Anisse Astier
2018-05-11 10:10 ` [Buildroot] [PATCH 1/3] go: patch to fix cross-compilation support Anisse Astier
2018-05-11 11:09   ` Thomas Petazzoni [this message]
2018-05-11 12:38     ` anisse at astier.eu
2018-05-11 12:55       ` Thomas Petazzoni
2018-05-11 10:10 ` [Buildroot] [PATCH 2/3] go: honor building with V=1 for debugging purposes Anisse Astier
2018-05-11 11:11   ` Thomas Petazzoni
2018-05-11 10:10 ` [Buildroot] [PATCH 3/3] go: bump to version 1.10.2 Anisse Astier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180511130928.6211a644@windsurf.home \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox