Browse Source

golang update to 1.12.1 and add ppc64 linker support

Signed-off-by: basebuilder_pel7ppc64bebuilder0 <basebuilder@powerel.org>
master
basebuilder_pel7ppc64bebuilder0 6 years ago
parent
commit
15b879c8cd
  1. 30
      SOURCES/golang-ppc64-linker.patch
  2. 8
      SPECS/golang.spec

30
SOURCES/golang-ppc64-linker.patch

@ -0,0 +1,30 @@
--- src/cmd/link/internal/ld/config.go 2019-03-14 20:43:37.000000000 +0100
+++ src/cmd/link/internal/ld/config.go 2019-03-20 23:50:07.660000000 +0100
@@ -247,9 +247,6 @@
}
ctxt.LinkMode = LinkInternal
case "1":
- if objabi.GOARCH == "ppc64" {
- Exitf("external linking requested via GO_EXTLINK_ENABLED but not supported for %s/ppc64", objabi.GOOS)
- }
ctxt.LinkMode = LinkExternal
default:
if needed, _ := mustLinkExternal(ctxt); needed {
@@ -261,17 +258,10 @@
} else {
ctxt.LinkMode = LinkInternal
}
- if objabi.GOARCH == "ppc64" && ctxt.LinkMode == LinkExternal {
- Exitf("external linking is not supported for %s/ppc64", objabi.GOOS)
- }
}
case LinkInternal:
if needed, reason := mustLinkExternal(ctxt); needed {
Exitf("internal linking requested but external linking required: %s", reason)
}
- case LinkExternal:
- if objabi.GOARCH == "ppc64" {
- Exitf("external linking not supported for %s/ppc64", objabi.GOOS)
- }
}
}

8
SPECS/golang.spec

@ -101,11 +101,11 @@
%global gohostarch s390x %global gohostarch s390x
%endif %endif


%global go_api 1.12 %global go_api 1.12.1
%global go_version 1.12 %global go_version 1.12.1


Name: golang Name: golang
Version: 1.12 Version: 1.12.1
Release: 1%{?dist} Release: 1%{?dist}
Summary: The Go Programming Language Summary: The Go Programming Language
# source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain # source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain
@ -183,6 +183,7 @@ Requires: go-srpm-macros


Patch1: 0001-Don-t-use-the-bundled-tzdata-at-runtime-except-for-t.patch Patch1: 0001-Don-t-use-the-bundled-tzdata-at-runtime-except-for-t.patch
Patch2: 0002-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch Patch2: 0002-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch
Patch3: golang-ppc64-linker.patch


# Having documentation separate was broken # Having documentation separate was broken
Obsoletes: %{name}-docs < 1.1-4 Obsoletes: %{name}-docs < 1.1-4
@ -308,6 +309,7 @@ Requires: %{name} = %{version}-%{release}


%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p0


cp %{SOURCE1} ./src/runtime/ cp %{SOURCE1} ./src/runtime/



Loading…
Cancel
Save