diff options
| author | Matt Madison <matt@madison.systems> | 2017-09-12 09:50:31 -0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-12 23:55:29 +0100 |
| commit | 6255c002af95ba4481d96741bea59e3db7c663df (patch) | |
| tree | ccc117fdfc71e55f29d767efc7e61833691a287c /meta/recipes-devtools/go/go-1.8/set-gotooldir-during-bootstrap.patch | |
| parent | d7f07283dec4a77c293318cdfee4566fe21cd3c2 (diff) | |
| download | poky-6255c002af95ba4481d96741bea59e3db7c663df.tar.gz | |
go-cross-canadian: add recipe
Enable cross-canadian builds of the Go toolchain. This
requires an additional patch to the Go source to allow us
to use the native GOTOOLDIR during the bootstrap phase.
(From OE-Core rev: 9daa02f63a0d53ab90a515f2bd3e783187c9415b)
Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/go/go-1.8/set-gotooldir-during-bootstrap.patch')
| -rw-r--r-- | meta/recipes-devtools/go/go-1.8/set-gotooldir-during-bootstrap.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-1.8/set-gotooldir-during-bootstrap.patch b/meta/recipes-devtools/go/go-1.8/set-gotooldir-during-bootstrap.patch new file mode 100644 index 0000000000..4b5e424d96 --- /dev/null +++ b/meta/recipes-devtools/go/go-1.8/set-gotooldir-during-bootstrap.patch | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | Set GOTOOLDIR during bootstrap | ||
| 2 | |||
| 3 | Signed-off-by: Matt Madison <matt@madison.systems> | ||
| 4 | Upstream-Status: Pending | ||
| 5 | |||
| 6 | Index: go/src/make.bash | ||
| 7 | =================================================================== | ||
| 8 | --- go.orig/src/make.bash | ||
| 9 | +++ go/src/make.bash | ||
| 10 | @@ -172,10 +172,11 @@ if [ "$do_host_build" = "yes" ]; then | ||
| 11 | mv cmd/dist/dist "$GOTOOLDIR"/dist | ||
| 12 | echo | ||
| 13 | |||
| 14 | + GOTOOLDIR_BOOTSTRAP="${GOTOOLDIR_BOOTSTRAP:-$GOTOOLDIR}" | ||
| 15 | echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH." | ||
| 16 | # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however, | ||
| 17 | # use the host compiler, CC, from `cmd/dist/dist env` instead. | ||
| 18 | - CC=$CC GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH \ | ||
| 19 | + CC=$CC GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH GOTOOLDIR="$GOTOOLDIR_BOOTSTRAP" \ | ||
| 20 | "$GOTOOLDIR"/go_bootstrap install -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd | ||
| 21 | echo | ||
| 22 | fi | ||
