blob: 67a93939f5ec71dd7218ea1b96804a053365e982 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001From 16124d84648f4dfdfa4738c5660b5400b30bf9da Mon Sep 17 00:00:00 2001
2From: Matt Madison <matt@madison.systems>
3Date: Sat, 17 Feb 2018 06:32:45 -0800
4Subject: [PATCH 5/9] make.bash: override CC when building dist and
5 go_bootstrap
6
7for handling OE cross-canadian builds.
8
9Upstream-Status: Inappropriate [OE specific]
10
11Signed-off-by: Matt Madison <matt@madison.systems>
12---
13 src/make.bash | 4 ++--
14 1 file changed, 2 insertions(+), 2 deletions(-)
15
16diff --git a/src/make.bash b/src/make.bash
17index 93a5c43d11..3a63682bc4 100755
18--- a/src/make.bash
19+++ b/src/make.bash
20@@ -162,7 +162,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then
21 exit 1
22 fi
23 rm -f cmd/dist/dist
24-GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
25+CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
26
27 # -e doesn't propagate out of eval, so check success by hand.
28 eval $(./cmd/dist/dist env -p || echo FAIL=true)
29@@ -193,7 +193,7 @@ fi
30 # Run dist bootstrap to complete make.bash.
31 # Bootstrap installs a proper cmd/dist, built with the new toolchain.
32 # Throw ours, built with Go 1.4, away after bootstrap.
33-./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
34+CC="${BUILD_CC:-${CC}}" ./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
35 rm -f ./cmd/dist/dist
36
37 # DO NOT ADD ANY NEW CODE HERE.
38--
392.14.1
40