blob: f0f564044b2e59d703e6fd71926711a09b5fb509 [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From aae74d1045ca03306ba4159206ee3bac72bcdfbb Mon Sep 17 00:00:00 2001
2From: Matt Madison <matt@madison.systems>
3Date: Wed, 13 Sep 2017 08:23:23 -0700
4Subject: [PATCH 6/7] make.bash: add GOTOOLDIR_BOOTSTRAP environment variable
5
6For cross-canadian builds, we need to use the native
7GOTOOLDIR during the bootstrap phase, so provide a way
8to pass that setting into the build script.
9
10Upstream-Status: Pending
11
12Signed-off-by: Matt Madison <matt@madison.systems>
13---
14 src/make.bash | 3 ++-
15 1 file changed, 2 insertions(+), 1 deletion(-)
16
17diff --git a/src/make.bash b/src/make.bash
18index 9553623..2e6fb05 100755
19--- a/src/make.bash
20+++ b/src/make.bash
21@@ -172,10 +172,11 @@ if [ "$do_host_build" = "yes" ]; then
22 mv cmd/dist/dist "$GOTOOLDIR"/dist
23 echo
24
25+ GOTOOLDIR_BOOTSTRAP="${GOTOOLDIR_BOOTSTRAP:-$GOTOOLDIR}"
26 echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH."
27 # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however,
28 # use the host compiler, CC, from `cmd/dist/dist env` instead.
29- CC=$CC GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH \
30+ CC=$CC GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH GOTOOLDIR="$GOTOOLDIR_BOOTSTRAP" \
31 "$GOTOOLDIR"/go_bootstrap install -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd
32 echo
33 fi
34--
352.7.4
36