summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/go/go-1.16/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/go/go-1.16/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch')
-rw-r--r--meta/recipes-devtools/go/go-1.16/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go-1.16/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch b/meta/recipes-devtools/go/go-1.16/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
new file mode 100644
index 0000000000..59c12d9546
--- /dev/null
+++ b/meta/recipes-devtools/go/go-1.16/0005-make.bash-override-CC-when-building-dist-and-go_boot.patch
@@ -0,0 +1,39 @@
1From f05ef3ded52b98537c10efd0b15cd9612471524d 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 5/9] make.bash: override CC when building dist and
5 go_bootstrap
6
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>
16---
17 src/make.bash | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20--- a/src/make.bash
21+++ b/src/make.bash
22@@ -178,7 +178,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ];
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)
31@@ -209,7 +209,7 @@ fi
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 $buildall $vflag $GO_DISTFLAGS "$@"
36+CC="${BUILD_CC:-${CC}}" ./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
37 rm -f ./cmd/dist/dist
38
39 # DO NOT ADD ANY NEW CODE HERE.