summaryrefslogtreecommitdiff
path: root/dev-lang/go-bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/go-bootstrap')
-rw-r--r--dev-lang/go-bootstrap/Manifest1
-rwxr-xr-xdev-lang/go-bootstrap/files/make-go-bootstraps55
2 files changed, 56 insertions, 0 deletions
diff --git a/dev-lang/go-bootstrap/Manifest b/dev-lang/go-bootstrap/Manifest
index 96a7962e70e5..800878a2c3f3 100644
--- a/dev-lang/go-bootstrap/Manifest
+++ b/dev-lang/go-bootstrap/Manifest
@@ -1,3 +1,4 @@
+AUX make-go-bootstraps 1424 BLAKE2B 422a3db136f81941ddbdc8c47996daad345c44e03086b80f72f026c734dcbfb0ebb34c24a83dad204024dd1931a057813510654500e61c297f3cfef5d255d615 SHA512 682f9797ef1f693f7e5fe661b267b731bbec2144a7661d87ddeeabafcbb93929cd413de3ffbc892940c9582e1b589d50622561a2245dc279f5e88319f5ae4197
DIST go-1.20.14-darwin-amd64-bootstrap.tbz 94549781 BLAKE2B 604d6b183b6be19f98f330a73fd07db1824442b14c3870447340e628b3fd13c87972d9a192f888e329b1d0337a48d66651f35c0237e4a5a609091e73385925d7 SHA512 ef2b179a096319dca8cd3907ad7c9d80bc61d409ce198a323073fbceb3b6ab3f5752eaeeb8f37f9287ba1c009f5e37da341e359228d0509ab766340f61a10c68
DIST go-1.20.14-darwin-arm64-bootstrap.tbz 92159553 BLAKE2B 28a95dafd3126e95fd997744ca20385bf634c3bc08be5698bc314c8e902e261d66ebae754492997562ba3bd2635f68ad8173cbd84aa6e59bcf38fe0c2cd35a65 SHA512 1f39a132037f9b1141cac752c20c34da0f87583dba9094965ffb7f65015d3d5273a1b63201e1f68e00d436aa1b1d79972f6f50a195a3d5799f012fb3fbaa20b6
DIST go-1.20.14-linux-386-bootstrap.tbz 96003553 BLAKE2B c3a07e7dd840387281b065aebd216fa0cdd1c2e7bc71cce63f4a0fd7fa2ce1848f2b3b91c2506bea1a5b747ca7eece9aff08fe67dcf6b63f8afcc4a92e382f6b SHA512 236423e5b65078afd7a44f83f91f0b2bf11c78871d01adce942651ec24d02ae96021dfdb00640034dff9b43c636b1975402b68955bf6572c680dfbbb9bdb266e
diff --git a/dev-lang/go-bootstrap/files/make-go-bootstraps b/dev-lang/go-bootstrap/files/make-go-bootstraps
new file mode 100755
index 000000000000..a929fd988377
--- /dev/null
+++ b/dev-lang/go-bootstrap/files/make-go-bootstraps
@@ -0,0 +1,55 @@
+#!/bin/bash
+set -e
+
+# This creates go bootstrap tarballs for the version of go currently
+# installed on your system.
+# It should be run as part of bumping dev-lang/go when a newer version
+# of go is required for bootstrapping.
+# Make sure the version of go required for bootstrapping is installed
+# then run this script.
+# The script will output the location where the bootstrap tarballs are
+# stored.
+# Next, update the GO_BV variable in the new version of the dev-lang/go
+# ebuild to the version in the bootstrap tarballs file name.
+
+go_tuples=(
+ darwin-amd64
+ darwin-arm64
+ linux-386
+ linux-amd64
+ linux-arm
+ linux-arm64
+ linux-loong64
+ linux-mips
+ linux-mipsle
+ linux-mips64
+ linux-mips64le
+ linux-ppc64
+ linux-ppc64le
+ linux-riscv64
+ linux-s390x
+ solaris-amd64
+)
+
+go_version=$(go version)
+go_version=${go_version##*go}
+go_version=${go_version%% *}
+build_path=$(mktemp -d /tmp/go-bootstraps-XXXXXX)
+pushd "${build_path}"
+git clone https://github.com/golang/go.git
+cd go
+git checkout go"${go_version}"
+cd src
+for tuple in ${go_tuples[@]}; do
+ printf "Building go version %s bootstrap tarball for %s\n" "${go_version}" "${tuple}"
+ GOOS=${tuple%%-*} GOARCH=${tuple##*-} ./bootstrap.bash
+ rm -fr ../../go-${tuple}-bootstrap
+done
+cd ../..
+rm -fr go
+for f in *tbz; do
+ mv "${f}" "${f/go/go-${go_version}}"
+ done
+popd
+mv "${build_path}" "${build_path%-*}"
+printf "The bootstrap tarballs are stored in %s\n" "${build_path%-*}"