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 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 20 | --- a/src/make.bash |
| 21 | +++ b/src/make.bash |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame^] | 22 | @@ -195,7 +195,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 23 | 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 Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame^] | 31 | @@ -220,7 +220,7 @@ fi |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 32 | # 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. |