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

- Template gcc-go.patch to substitute gcc_go_version and eliminate
  multiple similar patches each with hardcoded gcc go binary name.
  gcc-go.patch inserts gcc-go binary name e.g. go-8 to compensate
  for current lack of gcc-go update-alternatives usage.
  * add gcc-go.patch
  * drop gcc6-go.patch
  * drop gcc7-go.patch

- For SLE-12 set gcc_go_version to 8 to bootstrap using gcc8-go.
  gcc6-go and gcc7-go no longer successfully bootstrap go1.17 or
  go1.18 on SLE-12 aarch64 ppc64le or s390x.
  * gcc6-go fails with errors e.g. libnoder.a(_go_.o):(.toc+0x0):
    undefined reference to `__go_pimt__I4_DiagFrN4_boolee3

OBS-URL: https://build.opensuse.org/request/show/967639
OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/go1.18?expand=0&rev=12
This commit is contained in:
Jeff Kowalczyk 2022-04-08 05:20:19 +00:00 committed by Git OBS Bridge
parent b2fd8d8342
commit 1aaefbd14a

View File

@ -2,7 +2,7 @@ Index: go/src/cmd/dist/buildtool.go
===================================================================
--- go.orig/src/cmd/dist/buildtool.go
+++ go/src/cmd/dist/buildtool.go
@@ -190,7 +190,7 @@ func bootstrapBuildTools() {
@@ -205,7 +205,7 @@ func bootstrapBuildTools() {
// 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{
@ -24,7 +24,7 @@ Index: go/src/make.bash
# tried for all "go" in $PATH. $HOME/go1.4 by default.
set -e
@@ -162,8 +162,8 @@
@@ -176,8 +176,8 @@
fi
fi
done; unset IFS
@ -35,7 +35,7 @@ Index: go/src/make.bash
echo "Set \$GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." >&2
exit 1
fi
@@ -181,7 +181,7 @@
@@ -195,7 +195,7 @@
exit 1
fi
rm -f cmd/dist/dist
@ -48,7 +48,7 @@ Index: go/src/make.rc
===================================================================
--- go.orig/src/make.rc
+++ go/src/make.rc
@@ -52,7 +52,7 @@ GOROOT = `{cd .. && pwd}
@@ -60,7 +60,7 @@ GOROOT = `{cd .. && pwd}
if(! ~ $#GOROOT_BOOTSTRAP 1)
GOROOT_BOOTSTRAP = $home/go1.4
for(p in $path){
@ -57,7 +57,7 @@ Index: go/src/make.rc
if(go_exe = `{path=$p whatis go}){
goroot = `{GOROOT='' $go_exe env GOROOT}
if(! ~ $goroot $GOROOT){
@@ -61,7 +61,7 @@ for(p in $path){
@@ -73,7 +73,7 @@ for(p in $path){
}
}
}
@ -66,7 +66,7 @@ Index: go/src/make.rc
echo 'ERROR: Cannot find '$GOROOT_BOOTSTRAP'/bin/go.' >[1=2]
echo 'Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.' >[1=2]
exit bootstrap
@@ -75,7 +75,7 @@ if(~ $GOROOT_BOOTSTRAP $GOROOT){
@@ -87,7 +87,7 @@ if(~ $GOROOT_BOOTSTRAP $GOROOT){
echo 'Building Go cmd/dist using '^$GOROOT_BOOTSTRAP
if(~ $#vflag 1)
echo cmd/dist