blob: a6937672f58d927219f2985923a7c86c8d07e650 [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001From 153e2dda6103fd9dd871be4bb495a8da5328301e 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] make.bash: override CC when building dist and go_bootstrap
5
6for handling OE cross-canadian builds.
7
8Adapted to Go 1.13 from patches originally submitted to
9the meta/recipes-devtools/go tree by
10Matt Madison <matt@madison.systems>.
11
12Upstream-Status: Inappropriate [OE specific]
13
14Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
15
16---
17 src/make.bash | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
Andrew Geissler595f6302022-01-24 19:11:47 +000020--- a/src/make.bash
21+++ b/src/make.bash
Patrick Williams03907ee2022-05-01 06:28:52 -050022@@ -195,7 +195,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ];
Andrew Geissler595f6302022-01-24 19:11:47 +000023 exit 1
24 fi
25 rm -f cmd/dist/dist
26-GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
27+CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
28
29 # -e doesn't propagate out of eval, so check success by hand.
30 eval $(./cmd/dist/dist env -p || echo FAIL=true)
Patrick Williams03907ee2022-05-01 06:28:52 -050031@@ -220,7 +220,7 @@ fi
Andrew Geissler595f6302022-01-24 19:11:47 +000032 # Run dist bootstrap to complete make.bash.
33 # Bootstrap installs a proper cmd/dist, built with the new toolchain.
34 # Throw ours, built with Go 1.4, away after bootstrap.
35-./cmd/dist/dist bootstrap -a $vflag $GO_DISTFLAGS "$@"
36+CC="${BUILD_CC:-${CC}}" ./cmd/dist/dist bootstrap -a $vflag $GO_DISTFLAGS "$@"
37 rm -f ./cmd/dist/dist
38
39 # DO NOT ADD ANY NEW CODE HERE.