From 79654fc6a1b0767a478b115fba93a2ee914c95a7 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Mon, 2 May 2016 13:53:27 -0400 Subject: go: add go-cross 1.6 Introduce the 1.6 go release, and port patches to apply to this version. Existing versions (1.5) are not removed, so this is not a forced update. Signed-off-by: Bruce Ashfield --- .../go-1.6/split-host-and-target-build.patch | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 recipes-devtools/go-cross/go-1.6/split-host-and-target-build.patch (limited to 'recipes-devtools/go-cross/go-1.6/split-host-and-target-build.patch') diff --git a/recipes-devtools/go-cross/go-1.6/split-host-and-target-build.patch b/recipes-devtools/go-cross/go-1.6/split-host-and-target-build.patch new file mode 100644 index 00000000..85fb240a --- /dev/null +++ b/recipes-devtools/go-cross/go-1.6/split-host-and-target-build.patch @@ -0,0 +1,58 @@ +Index: go/src/make.bash +=================================================================== +--- go.orig/src/make.bash ++++ go/src/make.bash +@@ -143,12 +143,23 @@ if [ "$1" = "--no-clean" ]; then + buildall="" + shift + fi +-./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap +-# Delay move of dist tool to now, because bootstrap may clear tool directory. +-mv cmd/dist/dist "$GOTOOLDIR"/dist +-echo + +-if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then ++do_host_build="yes" ++do_target_build="yes" ++if [ "$1" = "--target-only" ]; then ++ do_host_build="no" ++ shift ++elif [ "$1" = "--host-only" ]; then ++ do_target_build="no" ++ shift ++fi ++ ++if [ "$do_host_build" = "yes" ]; then ++ ./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap ++ # Delay move of dist tool to now, because bootstrap may clear tool directory. ++ mv cmd/dist/dist "$GOTOOLDIR"/dist ++ echo ++ + echo "##### Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH." + # CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however, + # use the host compiler, CC, from `cmd/dist/dist env` instead. +@@ -157,11 +168,20 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH + echo + fi + +-echo "##### Building packages and commands for $GOOS/$GOARCH." +-CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std cmd +-echo ++if [ "$do_target_build" = "yes" ]; then ++ GO_INSTALL="${GO_TARGET_INSTALL:-std cmd}" ++ echo "##### Building packages and commands for $GOOS/$GOARCH." ++ if [ "$GOHOSTOS" = "$GOOS" -a "$GOHOSTARCH" = "$GOARCH" -a "$do_host_build" = "yes" ]; then ++ rm -rf ./host-tools ++ mkdir ./host-tools ++ mv "$GOTOOLDIR"/* ./host-tools ++ GOTOOLDIR="$PWD/host-tools" ++ fi ++ GOTOOLDIR="$GOTOOLDIR" CC="$CC_FOR_TARGET" "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v ${GO_INSTALL} ++ echo + +-rm -f "$GOTOOLDIR"/go_bootstrap ++ rm -f "$GOTOOLDIR"/go_bootstrap ++fi + + if [ "$1" != "--no-banner" ]; then + "$GOTOOLDIR"/dist banner -- cgit v1.2.3-54-g00ecf