Accepting request 429444 from home:jordimassaguerpla:d:l:g:go_update_gcc6
- update to gcc6-go for Factory - build with gcc-go for aarch64, ppc64le and ppc64, but for x86_64 always use go1.4, as it should be according to https://golang.org/doc/install/source#go14 OBS-URL: https://build.opensuse.org/request/show/429444 OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/go?expand=0&rev=267
This commit is contained in:
parent
f96a74a648
commit
2097ece516
58
gcc6-go.patch
Normal file
58
gcc6-go.patch
Normal file
@ -0,0 +1,58 @@
|
||||
diff --git a/src/make.bash b/src/make.bash
|
||||
index 2531ca4..12f1aa1 100755
|
||||
--- a/src/make.bash
|
||||
+++ b/src/make.bash
|
||||
@@ -112,8 +112,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
|
||||
@@ -123,7 +123,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 6016204..2223092 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
|
||||
diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go
|
||||
index 20d9535..26cfb20 100644
|
||||
--- a/src/cmd/dist/buildtool.go
|
||||
+++ b/src/cmd/dist/buildtool.go
|
||||
@@ -111,7 +111,7 @@ func bootstrapBuildTools() {
|
||||
os.Setenv("GOHOSTARCH", "")
|
||||
|
||||
// Run Go 1.4 to build binaries.
|
||||
- run(workspace, ShowOutput|CheckExit, pathf("%s/bin/go", goroot_bootstrap), "install", "-v", "bootstrap/...")
|
||||
+ run(workspace, ShowOutput|CheckExit, pathf("%s/bin/go-6", goroot_bootstrap), "install", "-v", "bootstrap/...")
|
||||
|
||||
// Copy binaries into tool binary directory.
|
||||
for _, name := range bootstrapDirs {
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 21 15:35:51 UTC 2016 - jmassaguerpla@suse.com
|
||||
|
||||
- update to gcc6-go for Factory
|
||||
- build with gcc-go for aarch64, ppc64le and ppc64, but for x86_64
|
||||
always use go1.4, as it should be according to
|
||||
https://golang.org/doc/install/source#go14
|
||||
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 30 14:38:11 UTC 2016 - jmassaguerpla@suse.com
|
||||
|
||||
|
19
go.spec
19
go.spec
@ -16,21 +16,13 @@
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} > 1320
|
||||
%define with_gccgo 1
|
||||
%else
|
||||
%if 0%{?suse_version} == 1315 && 0%{?is_opensuse}
|
||||
%define with_gccgo 1
|
||||
%else
|
||||
# The fallback bootstrap method via go1.4 doesn't work
|
||||
# for aarch64 nor ppc64le because go 1.4 did not support that architecture.
|
||||
%ifarch aarch64 ppc64le
|
||||
%ifarch aarch64 ppc64le ppc64
|
||||
%define with_gccgo 1
|
||||
%else
|
||||
%define with_gccgo 0
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%define go_api 1.6
|
||||
|
||||
@ -84,10 +76,15 @@ Patch6: armv6l.patch
|
||||
Patch7: fix_certificates_lookup.patch
|
||||
# PATCH-FIX-UPSTREAM marguerite@opensuse.org - find /usr/bin/go-5 when bootstrapping with gcc5-go
|
||||
Patch8: gcc5-go.patch
|
||||
Patch9: gcc6-go.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
# boostrap
|
||||
%if %{with_gccgo}
|
||||
%if 0%{?suse_version} > 1320
|
||||
BuildRequires: gcc6-go
|
||||
%else
|
||||
BuildRequires: gcc5-go
|
||||
%endif
|
||||
%else
|
||||
BuildRequires: go1.4
|
||||
%endif
|
||||
@ -147,8 +144,12 @@ Go examples and documentation.
|
||||
%endif
|
||||
%patch7 -p1
|
||||
%if %{with_gccgo}
|
||||
%if 0%{?suse_version} > 1320
|
||||
%patch9 -p1
|
||||
%else
|
||||
%patch8 -p1
|
||||
%endif
|
||||
%endif
|
||||
cp %{SOURCE4} .
|
||||
|
||||
# setup go_arch (BSD-like scheme)
|
||||
|
Loading…
Reference in New Issue
Block a user