Browse Source

Update go bootstrap

master
mid-kid 1 year ago
parent
commit
000ee95b2a
  1. 1
      go/build.sh
  2. 18
      go/build_bootstrap.sh
  3. 22
      go/build_go.sh
  4. 31
      go/build_go19.sh
  5. 4
      go/download.sh
  6. 3
      go/download.sha256

1
go/build.sh

@ -4,4 +4,5 @@ set -eu
export MAKEFLAGS="-j${NPROC:-$(nproc)}"
[ ! -d build/install-bootstrap ] && ./build_bootstrap.sh
[ ! -d build/install-go19 ] && ./build_go19.sh
[ ! -d build/install-go ] && ./build_go.sh

18
go/build_bootstrap.sh

@ -14,10 +14,18 @@ cd "go1.4-bootstrap-$version_bootstrap"
# Build and install
(cd src; ./make.bash)
rm -rf pkg/obj src/cmd src/internal src/builtin
find src -type f \( ! -name "*.go" \) -delete
find src -type f \( -name "*_test.go" -o -name "*_test_*.go" \) -delete
find src -type d -name "testdata" -exec rm -r {} +
find src -type d -empty -delete
find src -type f \( ! -name '*.go' \
-a ! -name '*.c' \
-a ! -name '*.h' \
-a ! -name '*.s' \
-a ! -name '*.S' \
-a ! -name 'p256_asm_table.bin' \
\) -print -delete
find src -type f -name '*_test.go' -print -delete
find src -type d -empty -print -delete
find pkg -type f -name '*.a' -print -delete
find pkg -type d -empty -print -delete
mkdir -p "$dir_install"
cp -at "$dir_install" bin pkg src

22
go/build_go.sh

@ -1,7 +1,7 @@
#!/bin/sh
set -eu
version_go=1.15
version_go=1.21.0
dir_download="$PWD/download"
mkdir -p build; cd build
@ -13,11 +13,19 @@ tar xf "$dir_download/go$version_go.src.tar.gz" -C "go$version_go" --strip-compo
cd "go$version_go"
# Build and install
(cd src; GOROOT_BOOTSTRAP="$PWD/../../install-bootstrap" ./make.bash)
rm -rf pkg/obj src/cmd src/builtin
find src -type f \( ! -name "*.go" -a ! -name "*.s" -a ! -name "*.h" \) -delete
find src -type f \( -name "*_test.go" -o -name "*_test_*.go" \) -delete
find src -type d -name "testdata" -exec rm -r {} +
find src -type d -empty -delete
(cd src; GOROOT_BOOTSTRAP="$PWD/../../install-go19" ./make.bash)
find src -type f \( ! -name '*.go' \
-a ! -name '*.c' \
-a ! -name '*.h' \
-a ! -name '*.s' \
-a ! -name '*.S' \
-a ! -name 'p256_asm_table.bin' \
\) -print -delete
find src -type f -name '*_test.go' -print -delete
find src -type d -empty -print -delete
find pkg -type f -name '*.a' -print -delete
find pkg -type d -empty -print -delete
mkdir -p "$dir_install"
cp -at "$dir_install" bin pkg src

31
go/build_go19.sh

@ -0,0 +1,31 @@
#!/bin/sh
set -eu
version_go19=1.19.12
dir_download="$PWD/download"
mkdir -p build; cd build
dir_install="$PWD/install-go19"
# Prepare source
mkdir -p "go$version_go19"
tar xf "$dir_download/go$version_go19.src.tar.gz" -C "go$version_go19" --strip-components 1
cd "go$version_go19"
# Build and install
(cd src; GOROOT_BOOTSTRAP="$PWD/../../install-bootstrap" ./make.bash)
find src -type f \( ! -name '*.go' \
-a ! -name '*.c' \
-a ! -name '*.h' \
-a ! -name '*.s' \
-a ! -name '*.S' \
-a ! -name 'p256_asm_table.bin' \
\) -print -delete
find src -type f -name '*_test.go' -print -delete
find src -type d -empty -print -delete
find pkg -type f -name '*.a' -print -delete
find pkg -type d -empty -print -delete
mkdir -p "$dir_install"
cp -at "$dir_install" bin pkg src

4
go/download.sh

@ -1,13 +1,15 @@
#!/bin/sh
set -eu
version_go=1.15 # https://golang.org/dl/
version_go=1.21.0 # https://golang.org/dl/
version_go19=1.19.12
version_bootstrap=20171003 # https://golang.org/doc/install/source#go14
mkdir -p download
cd download
wget -c "https://dl.google.com/go/go$version_go.src.tar.gz"
wget -c "https://dl.google.com/go/go$version_go19.src.tar.gz"
wget -c "https://dl.google.com/go/go1.4-bootstrap-$version_bootstrap.tar.gz"
sha256sum -c ../download.sha256

3
go/download.sha256

@ -1,2 +1,3 @@
69438f7ed4f532154ffaf878f3dfd83747e7a00b70b3556eddabf7aaee28ac3a go1.15.src.tar.gz
ee5d50e0a7fd74ba1b137cb879609aaaef9880bf72b5d1742100e38ae72bb557 go1.19.12.src.tar.gz
818d46ede85682dd551ad378ef37a4d247006f12ec59b5b755601d2ce114369a go1.21.0.src.tar.gz
f4ff5b5eb3a3cae1c993723f3eab519c5bae18866b5e5f96fe1102f0cb5c3e52 go1.4-bootstrap-20171003.tar.gz

Loading…
Cancel
Save