0005-make.bash-override-CC-when-building-dist-and-go_boot.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From f05ef3ded52b98537c10efd0b15cd9612471524d 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 5/9] make.bash: override CC when building dist and
  5. go_bootstrap
  6. for handling OE cross-canadian builds.
  7. Adapted to Go 1.13 from patches originally submitted to
  8. the meta/recipes-devtools/go tree by
  9. Matt Madison <matt@madison.systems>.
  10. Upstream-Status: Inappropriate [OE specific]
  11. Signed-off-by: Alexander J Kube <alexander.j.kube@gmail.com>
  12. ---
  13. src/make.bash | 4 ++--
  14. 1 file changed, 2 insertions(+), 2 deletions(-)
  15. diff --git a/src/make.bash b/src/make.bash
  16. index 92d1481..0c2822f 100755
  17. --- a/src/make.bash
  18. +++ b/src/make.bash
  19. @@ -177,7 +177,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then
  20. exit 1
  21. fi
  22. rm -f cmd/dist/dist
  23. -GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
  24. +CC="${BUILD_CC:-${CC}}" GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
  25. # -e doesn't propagate out of eval, so check success by hand.
  26. eval $(./cmd/dist/dist env -p || echo FAIL=true)
  27. @@ -208,7 +208,7 @@ fi
  28. # Run dist bootstrap to complete make.bash.
  29. # Bootstrap installs a proper cmd/dist, built with the new toolchain.
  30. # Throw ours, built with Go 1.4, away after bootstrap.
  31. -./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
  32. +CC="${BUILD_CC:-${CC}}" ./cmd/dist/dist bootstrap $buildall $vflag $GO_DISTFLAGS "$@"
  33. rm -f ./cmd/dist/dist
  34. # DO NOT ADD ANY NEW CODE HERE.
  35. --
  36. 2.17.1 (Apple Git-112)