diff options
Diffstat (limited to 'meta/recipes-devtools/go/go/0004-make.bash-override-CC-when-building-dist-and-go_boot.patch')
-rw-r--r-- | meta/recipes-devtools/go/go/0004-make.bash-override-CC-when-building-dist-and-go_boot.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-devtools/go/go/0004-make.bash-override-CC-when-building-dist-and-go_boot.patch b/meta/recipes-devtools/go/go/0004-make.bash-override-CC-when-building-dist-and-go_boot.patch new file mode 100644 index 0000000000..8889aef1cf --- /dev/null +++ b/meta/recipes-devtools/go/go/0004-make.bash-override-CC-when-building-dist-and-go_boot.patch @@ -0,0 +1,45 @@ +From 9f59e46991074d3e3c4d00f3971e62bfcd707167 Mon Sep 17 00:00:00 2001 +From: Alex Kube <alexander.j.kube@gmail.com> +Date: Wed, 23 Oct 2019 21:17:16 +0430 +Subject: [PATCH 4/9] make.bash: override CC when building dist and + go_bootstrap + +for handling OE cross-canadian builds. + +Adapted to Go 1.13 from patches originally submitted to +the meta/recipes-devtools/go tree by +Matt Madison <matt@madison.systems>. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com> +Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> +--- + src/make.bash | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/make.bash b/src/make.bash +index 76ad51624a..074e129a24 100755 +--- a/src/make.bash ++++ b/src/make.bash +@@ -198,7 +198,7 @@ if [[ "$GOROOT_BOOTSTRAP" == "$GOROOT" ]]; then + exit 1 + fi + rm -f cmd/dist/dist +-GOROOT="$GOROOT_BOOTSTRAP" nogoenv "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist ++CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" nogoenv "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist + + # -e doesn't propagate out of eval, so check success by hand. + eval $(./cmd/dist/dist env -p || echo FAIL=true) +@@ -223,7 +223,7 @@ fi + # Run dist bootstrap to complete make.bash. + # Bootstrap installs a proper cmd/dist, built with the new toolchain. + # Throw ours, built with the bootstrap toolchain, away after bootstrap. +-./cmd/dist/dist bootstrap -a $vflag $GO_DISTFLAGS "$@" ++CC="${BUILD_CC:-${CC}}" ./cmd/dist/dist bootstrap -a $vflag $GO_DISTFLAGS "$@" + rm -f ./cmd/dist/dist + + # DO NOT ADD ANY NEW CODE HERE. +-- +2.44.0 + |