blob: 4f2a46c6cec2a87727fc408e557c84999fd14023 [file] [log] [blame]
Brad Bishop1d80a2e2019-11-15 16:35:03 -05001From f05ef3ded52b98537c10efd0b15cd9612471524d Mon Sep 17 00:00:00 2001
2From: Alex Kube <alexander.j.kube@gmail.com>
3Date: Wed, 23 Oct 2019 21:17:16 +0430
4Subject: [PATCH 5/9] make.bash: override CC when building dist and
5 go_bootstrap
6
7for handling OE cross-canadian builds.
8
9Adapted to Go 1.13 from patches originally submitted to
10the meta/recipes-devtools/go tree by
11Matt Madison <matt@madison.systems>.
12
13Upstream-Status: Inappropriate [OE specific]
14
15Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
16---
17 src/make.bash | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20diff --git a/src/make.bash b/src/make.bash
21index 92d1481..0c2822f 100755
22--- a/src/make.bash
23+++ b/src/make.bash
24@@ -177,7 +177,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then
25 exit 1
26 fi
27 rm -f cmd/dist/dist
28-GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
29+CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
30
31 # -e doesn't propagate out of eval, so check success by hand.
32 eval $(./cmd/dist/dist env -p || echo FAIL=true)
33@@ -208,7 +208,7 @@ fi
34 # Run dist bootstrap to complete make.bash.
35 # Bootstrap installs a proper cmd/dist, built with the new toolchain.
36 # Throw ours, built with Go 1.4, away after bootstrap.
37-./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
38+CC="${BUILD_CC:-${CC}}" ./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
39 rm -f ./cmd/dist/dist
40
41 # DO NOT ADD ANY NEW CODE HERE.
42--
432.17.1 (Apple Git-112)
44