diff --git a/SOURCES/golang-1.15-ppc64-linker.patch b/SOURCES/golang-1.15-ppc64-linker.patch new file mode 100644 index 00000000..3be215ab --- /dev/null +++ b/SOURCES/golang-1.15-ppc64-linker.patch @@ -0,0 +1,47 @@ +--- src/cmd/link/internal/ld/config.go 2020-12-17 09:49:29.870000000 +0100 ++++ src/cmd/link/internal/ld/config.go 2020-12-17 09:52:41.550000000 +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", "ppc64", "ppc64le": + 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" + } + if iscgo && objabi.GOOS == "android" { +@@ -265,8 +265,6 @@ + switch { + case objabi.GOARCH == "riscv64": + Exitf("external linking not supported for %s/riscv64", objabi.GOOS) +- case objabi.GOARCH == "ppc64" && objabi.GOOS != "aix": +- Exitf("external linking not supported for %s/ppc64", objabi.GOOS) + } + } + } diff --git a/SPECS/golang.spec b/SPECS/golang.spec index 01c52c53..acdf743a 100644 --- a/SPECS/golang.spec +++ b/SPECS/golang.spec @@ -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-1.14-ppc64-linker.patch +Patch3: golang-1.15-ppc64-linker.patch # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4