Accepting request 994190 from home:jfkw:branches:devel:languages:go

- Rebase gcc-go.patch onto upstream changes in go/src/make.bash and
  go/src/make.rc. Used for SLE-12 go bootstrap builds with gcc8.

OBS-URL: https://build.opensuse.org/request/show/994190
OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/go1.19?expand=0&rev=5
This commit is contained in:
Jeff Kowalczyk 2022-08-09 20:25:31 +00:00 committed by Git OBS Bridge
parent 6ed8b4e6d6
commit 2824ec4817
2 changed files with 21 additions and 13 deletions

View File

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

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Aug 9 05:56:23 UTC 2022 - Jeff Kowalczyk <jkowalczyk@suse.com>
- Rebase gcc-go.patch onto upstream changes in go/src/make.bash and
go/src/make.rc. Used for SLE-12 go bootstrap builds with gcc8.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Aug 2 17:19:11 UTC 2022 - Jeff Kowalczyk <jkowalczyk@suse.com> Tue Aug 2 17:19:11 UTC 2022 - Jeff Kowalczyk <jkowalczyk@suse.com>