Browse Source

golang update patch for 1.14 on ppc64 linker for big endian

Signed-off-by: basebuilder_pel7ppc64bebuilder0 <basebuilder@powerel.org>
master
basebuilder_pel7ppc64bebuilder0 5 years ago
parent
commit
f0b900296b
  1. 66
      SOURCES/golang-ppc64-linker.patch
  2. 5
      SPECS/golang.spec

66
SOURCES/golang-ppc64-linker.patch

@ -1,66 +0,0 @@ @@ -1,66 +0,0 @@
--- src/cmd/link/internal/ld/config.go 2019-11-18 12:11:12.010000000 +0100
+++ src/cmd/link/internal/ld/config.go 2019-11-18 12:16:23.420000000 +0100
@@ -70,7 +70,7 @@
*mode = BuildModeCArchive
case "c-shared":
switch objabi.GOARCH {
- case "386", "amd64", "arm", "arm64", "ppc64le", "s390x":
+ case "386", "amd64", "arm", "arm64", "ppc64", "ppc64le", "s390x":
default:
return badmode()
}
@@ -79,7 +79,7 @@
switch objabi.GOOS {
case "linux":
switch objabi.GOARCH {
- case "386", "amd64", "arm", "arm64", "ppc64le", "s390x":
+ case "386", "amd64", "arm", "arm64", "ppc64", "ppc64le", "s390x":
default:
return badmode()
}
@@ -91,7 +91,7 @@
switch objabi.GOOS {
case "linux":
switch objabi.GOARCH {
- case "386", "amd64", "arm", "arm64", "s390x", "ppc64le":
+ case "386", "amd64", "arm", "arm64", "s390x", "ppc64le", "ppc64":
default:
return badmode()
}
@@ -186,7 +186,7 @@
// Internally linking cgo is incomplete on some architectures.
// https://golang.org/issue/14449
// https://golang.org/issue/21961
- if iscgo && ctxt.Arch.InFamily(sys.MIPS64, sys.MIPS, sys.PPC64) {
+ if iscgo && ctxt.Arch.InFamily(sys.MIPS64, sys.MIPS) {
return true, objabi.GOARCH + " does not support internal cgo"
}
@@ -241,9 +241,6 @@
}
ctxt.LinkMode = LinkInternal
case "1":
- if objabi.GOARCH == "ppc64" && objabi.GOOS != "aix" {
- 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 {
@@ -255,17 +252,10 @@
} else {
ctxt.LinkMode = LinkInternal
}
- if objabi.GOARCH == "ppc64" && objabi.GOOS != "aix" && 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" && objabi.GOOS != "aix" {
- Exitf("external linking not supported for %s/ppc64", objabi.GOOS)
- }
}
}

5
SPECS/golang.spec

@ -227,7 +227,7 @@ Requires: go-srpm-macros @@ -227,7 +227,7 @@ Requires: go-srpm-macros

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
Patch3: golang-ppc64-linker.patch
Patch3: golang-1.14-ppc64-linker.patch

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

%patch1 -p1
%patch2 -p1
%ifarch ppc64
%patch3 -p0
%endif

cp %{SOURCE1} ./src/runtime/


Loading…
Cancel
Save