blob: 85e42f7660f30e0baa6a36ac03bc087e68c88500 [file] [log] [blame]
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06001From 31ff609cc3d3bfcc2f2257fda1dbaafaec31eb0b Mon Sep 17 00:00:00 2001
Andrew Geissler595f6302022-01-24 19:11:47 +00002From: Alex Kube <alexander.j.kube@gmail.com>
3Date: Wed, 23 Oct 2019 21:17:16 +0430
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06004Subject: [PATCH 4/9] make.bash: override CC when building dist and
5 go_bootstrap
Andrew Geissler595f6302022-01-24 19:11:47 +00006
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>
Andrew Geissler595f6302022-01-24 19:11:47 +000016---
17 src/make.bash | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
Patrick Williams92b42cb2022-09-03 06:53:57 -050020diff --git a/src/make.bash b/src/make.bash
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060021index c07f39b..6ca7242 100755
Andrew Geissler595f6302022-01-24 19:11:47 +000022--- a/src/make.bash
23+++ b/src/make.bash
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060024@@ -194,7 +194,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then
Andrew Geissler595f6302022-01-24 19:11:47 +000025 exit 1
26 fi
27 rm -f cmd/dist/dist
Patrick Williams92b42cb2022-09-03 06:53:57 -050028-GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off GOEXPERIMENT="" GOENV=off GOFLAGS="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
29+CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off GOEXPERIMENT="" GOENV=off GOFLAGS="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
Andrew Geissler595f6302022-01-24 19:11:47 +000030
31 # -e doesn't propagate out of eval, so check success by hand.
32 eval $(./cmd/dist/dist env -p || echo FAIL=true)
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060033@@ -219,7 +219,7 @@ fi
Andrew Geissler595f6302022-01-24 19:11:47 +000034 # Run dist bootstrap to complete make.bash.
35 # Bootstrap installs a proper cmd/dist, built with the new toolchain.
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060036 # Throw ours, built with the bootstrap toolchain, away after bootstrap.
Andrew Geissler595f6302022-01-24 19:11:47 +000037-./cmd/dist/dist bootstrap -a $vflag $GO_DISTFLAGS "$@"
38+CC="${BUILD_CC:-${CC}}" ./cmd/dist/dist bootstrap -a $vflag $GO_DISTFLAGS "$@"
39 rm -f ./cmd/dist/dist
40
41 # DO NOT ADD ANY NEW CODE HERE.
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060042--
432.30.2
44