Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame^] | 1 | From 153e2dda6103fd9dd871be4bb495a8da5328301e Mon Sep 17 00:00:00 2001 |
| 2 | From: Alex Kube <alexander.j.kube@gmail.com> |
| 3 | Date: Wed, 23 Oct 2019 21:17:16 +0430 |
| 4 | Subject: [PATCH] make.bash: override CC when building dist and go_bootstrap |
| 5 | |
| 6 | for handling OE cross-canadian builds. |
| 7 | |
| 8 | Adapted to Go 1.13 from patches originally submitted to |
| 9 | the meta/recipes-devtools/go tree by |
| 10 | Matt Madison <matt@madison.systems>. |
| 11 | |
| 12 | Upstream-Status: Inappropriate [OE specific] |
| 13 | |
| 14 | Signed-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 | |
| 20 | diff --git a/src/make.bash b/src/make.bash |
| 21 | index 7986125..dd67029 100755 |
| 22 | --- a/src/make.bash |
| 23 | +++ b/src/make.bash |
| 24 | @@ -181,7 +181,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 | @@ -206,7 +206,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 -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. |