go/gcc6-go.patch
Jordi Massaguer f4a0ff5be5 Accepting request 509364 from home:jordimassaguerpla:branch:enable_gcc6_for_sle12_and_fix_s390x
- Simplify all the "ifdef suse_version" by removing versions which
  have reach eol (13.* 42.1 sle11*)

- Add gcc6-go.patch for sle12 and leap42.x and use binutils-gold
  except for s390x/s390
  Remove gcc5-go.patch cause we use gcc6 for sle12 and leap42.x and
  gcc7 for newer versions (factory)

OBS-URL: https://build.opensuse.org/request/show/509364
OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/go?expand=0&rev=290
2017-07-12 10:30:13 +00:00

68 lines
2.9 KiB
Diff

diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go
index b0b9b25..4a0b3fb 100644
--- a/src/cmd/dist/buildtool.go
+++ b/src/cmd/dist/buildtool.go
@@ -143,7 +143,7 @@ func bootstrapBuildTools() {
// https://groups.google.com/d/msg/golang-dev/Ss7mCKsvk8w/Gsq7VYI0AwAJ
// Use the math_big_pure_go build tag to disable the assembly in math/big
// which may contain unsupported instructions.
- run(workspace, ShowOutput|CheckExit, pathf("%s/bin/go", goroot_bootstrap), "install", "-gcflags=-l", "-tags=math_big_pure_go", "-v", "bootstrap/cmd/...")
+ run(workspace, ShowOutput|CheckExit, pathf("%s/bin/go-6", goroot_bootstrap), "install", "-gcflags=-l", "-tags=math_big_pure_go", "-v", "bootstrap/cmd/...")
// Copy binaries into tool binary directory.
for _, name := range bootstrapDirs {
diff --git a/src/make.bash b/src/make.bash
index 84aaab5..628b93e 100755
--- a/src/make.bash
+++ b/src/make.bash
@@ -41,7 +41,7 @@
# This is used by cgo. Default is CC.
#
# CXX_FOR_TARGET: Command line to run to compile C++ code for GOARCH.
-# This is used by cgo. Default is CXX, or, if that is not set,
+# This is used by cgo. Default is CXX, or, if that is not set,
# "g++" or "clang++".
#
# FC: Command line to run to compile Fortran code for GOARCH.
@@ -120,8 +120,8 @@ echo '##### Building Go bootstrap tool.'
echo cmd/dist
export GOROOT="$(cd .. && pwd)"
GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:-$HOME/go1.4}
-if [ ! -x "$GOROOT_BOOTSTRAP/bin/go" ]; then
- echo "ERROR: Cannot find $GOROOT_BOOTSTRAP/bin/go." >&2
+if [ ! -x "$GOROOT_BOOTSTRAP/bin/go-6" ]; then
+ echo "ERROR: Cannot find $GOROOT_BOOTSTRAP/bin/go-6." >&2
echo "Set \$GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." >&2
exit 1
fi
@@ -131,7 +131,7 @@ if [ "$GOROOT_BOOTSTRAP" == "$GOROOT" ]; then
exit 1
fi
rm -f cmd/dist/dist
-GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist
+GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go-6" build -o cmd/dist/dist ./cmd/dist
# -e doesn't propagate out of eval, so check success by hand.
eval $(./cmd/dist/dist env -p || echo FAIL=true)
diff --git a/src/make.rc b/src/make.rc
index ba3554c..6d40673 100755
--- a/src/make.rc
+++ b/src/make.rc
@@ -46,13 +46,13 @@ echo cmd/dist
GOROOT = `{cd .. && pwd}
if(! ~ $#GOROOT_BOOTSTRAP 1)
GOROOT_BOOTSTRAP = $home/go1.4
-if(! test -x $GOROOT_BOOTSTRAP/bin/go){
- echo 'ERROR: Cannot find '$GOROOT_BOOTSTRAP'/bin/go.' >[1=2]
+if(! test -x $GOROOT_BOOTSTRAP/bin/go-6){
+ echo 'ERROR: Cannot find '$GOROOT_BOOTSTRAP'/bin/go-6.' >[1=2]
echo 'Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.' >[1=2]
exit bootstrap
}
rm -f cmd/dist/dist
-GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist ./cmd/dist
+GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' $GOROOT_BOOTSTRAP/bin/go-6 build -o cmd/dist/dist ./cmd/dist
eval `{./cmd/dist/dist env -9}
echo