2022-06-11 03:08:58 +02:00
|
|
|
Index: go/src/cmd/dist/buildtool.go
|
|
|
|
===================================================================
|
|
|
|
--- go.orig/src/cmd/dist/buildtool.go
|
|
|
|
+++ go/src/cmd/dist/buildtool.go
|
2022-08-09 22:25:31 +02:00
|
|
|
@@ -210,7 +210,7 @@
|
2022-06-11 03:08:58 +02:00
|
|
|
// only applies to the final cmd/go binary, but that's OK: if this is Go 1.10
|
|
|
|
// or later we don't need to disable inlining to work around bugs in the Go 1.4 compiler.
|
|
|
|
cmd := []string{
|
|
|
|
- pathf("%s/bin/go", goroot_bootstrap),
|
|
|
|
+ pathf("%s/bin/go-$gcc_go_version", goroot_bootstrap),
|
|
|
|
"install",
|
|
|
|
"-gcflags=-l",
|
2022-08-09 22:25:31 +02:00
|
|
|
"-tags=math_big_pure_go compiler_bootstrap purego",
|
2022-06-11 03:08:58 +02:00
|
|
|
Index: go/src/make.bash
|
|
|
|
===================================================================
|
|
|
|
--- go.orig/src/make.bash
|
|
|
|
+++ go/src/make.bash
|
2022-08-09 22:25:31 +02:00
|
|
|
@@ -68,7 +68,7 @@
|
2022-06-11 03:08:58 +02:00
|
|
|
# time goes when these scripts run.
|
|
|
|
#
|
|
|
|
# GOROOT_BOOTSTRAP: A working Go tree >= Go 1.4 for bootstrap.
|
|
|
|
-# If $GOROOT_BOOTSTRAP/bin/go is missing, $(go env GOROOT) is
|
|
|
|
+# If $GOROOT_BOOTSTRAP/bin/go-$gcc_go_version is missing, $(go env GOROOT) is
|
|
|
|
# tried for all "go" in $PATH. $HOME/go1.4 by default.
|
|
|
|
|
|
|
|
set -e
|
2022-08-09 22:25:31 +02:00
|
|
|
@@ -179,8 +179,8 @@
|
2022-06-11 03:08:58 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done; unset IFS
|
|
|
|
-if [ ! -x "$GOROOT_BOOTSTRAP/bin/go" ]; then
|
|
|
|
- echo "ERROR: Cannot find $GOROOT_BOOTSTRAP/bin/go." >&2
|
|
|
|
+if [ ! -x "$GOROOT_BOOTSTRAP/bin/go-$gcc_go_version" ]; then
|
|
|
|
+ echo "ERROR: Cannot find $GOROOT_BOOTSTRAP/bin/go-$gcc_go_version." >&2
|
|
|
|
echo "Set \$GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
2022-08-09 22:25:31 +02:00
|
|
|
@@ -198,7 +198,7 @@
|
2022-06-11 03:08:58 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
rm -f cmd/dist/dist
|
2022-08-09 22:25:31 +02:00
|
|
|
-GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off GOEXPERIMENT="" GOENV=off GOFLAGS="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
|
|
|
|
+GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" GO111MODULE=off GOEXPERIMENT="" GOENV=off GOFLAGS="" "$GOROOT_BOOTSTRAP/bin/go-$gcc_go_version" build -o cmd/dist/dist ./cmd/dist
|
2022-06-11 03:08:58 +02:00
|
|
|
|
|
|
|
# -e doesn't propagate out of eval, so check success by hand.
|
|
|
|
eval $(./cmd/dist/dist env -p || echo FAIL=true)
|
|
|
|
Index: go/src/make.rc
|
|
|
|
===================================================================
|
|
|
|
--- go.orig/src/make.rc
|
|
|
|
+++ go/src/make.rc
|
2022-08-09 22:25:31 +02:00
|
|
|
@@ -57,7 +57,7 @@
|
2022-06-11 03:08:58 +02:00
|
|
|
GOROOT_BOOTSTRAP = $home/$d
|
|
|
|
}
|
|
|
|
for(p in $path){
|
|
|
|
- if(! test -x $GOROOT_BOOTSTRAP/bin/go){
|
|
|
|
+ if(! test -x $GOROOT_BOOTSTRAP/bin/go-$gcc_go_version){
|
|
|
|
if(go_exe = `{path=$p whatis go}){
|
|
|
|
goroot = `{GOROOT='' $go_exe env GOROOT}
|
|
|
|
if(! ~ $goroot $GOROOT){
|
2022-08-09 22:25:31 +02:00
|
|
|
@@ -70,8 +70,8 @@
|
2022-06-11 03:08:58 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
-if(! test -x $GOROOT_BOOTSTRAP/bin/go){
|
2022-08-09 22:25:31 +02:00
|
|
|
- echo 'ERROR: Cannot find '$GOROOT_BOOTSTRAP'/bin/go.' >[1=2]
|
2022-06-11 03:08:58 +02:00
|
|
|
+if(! test -x $GOROOT_BOOTSTRAP/bin/go-$gcc_go_version){
|
2022-08-09 22:25:31 +02:00
|
|
|
+ echo 'ERROR: Cannot find '$GOROOT_BOOTSTRAP'/bin/go-$gcc_go_version.' >[1=2]
|
2022-06-11 03:08:58 +02:00
|
|
|
echo 'Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.' >[1=2]
|
|
|
|
exit bootstrap
|
2022-08-09 22:25:31 +02:00
|
|
|
}
|
|
|
|
@@ -84,7 +84,7 @@
|
2022-06-11 03:08:58 +02:00
|
|
|
echo 'Building Go cmd/dist using '^$GOROOT_BOOTSTRAP
|
|
|
|
if(~ $#vflag 1)
|
|
|
|
echo cmd/dist
|
2022-08-09 22:25:31 +02:00
|
|
|
-GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' GOEXPERIMENT='' GO111MODULE=off GOENV=off GOFLAGS='' $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist ./cmd/dist
|
|
|
|
+GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' GOEXPERIMENT='' GO111MODULE=off GOENV=off GOFLAGS='' $GOROOT_BOOTSTRAP/bin/go-$gcc_go_version build -o cmd/dist/dist ./cmd/dist
|
2022-06-11 03:08:58 +02:00
|
|
|
|
|
|
|
eval `{./cmd/dist/dist env -9}
|
|
|
|
if(~ $#vflag 1)
|