basebuilder_pel7x64builder0
5 years ago
4 changed files with 147 additions and 27 deletions
@ -1,30 +1,66 @@ |
|||||||
--- src/cmd/link/internal/ld/config.go 2019-03-14 20:43:37.000000000 +0100 |
--- src/cmd/link/internal/ld/config.go 2019-11-18 12:11:12.010000000 +0100 |
||||||
+++ src/cmd/link/internal/ld/config.go 2019-03-20 23:50:07.660000000 +0100 |
+++ src/cmd/link/internal/ld/config.go 2019-11-18 12:16:23.420000000 +0100 |
||||||
@@ -247,9 +247,6 @@ |
@@ -70,7 +70,7 @@ |
||||||
} |
*mode = BuildModeCArchive |
||||||
ctxt.LinkMode = LinkInternal |
case "c-shared": |
||||||
case "1": |
switch objabi.GOARCH { |
||||||
- if objabi.GOARCH == "ppc64" { |
- 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) |
- Exitf("external linking requested via GO_EXTLINK_ENABLED but not supported for %s/ppc64", objabi.GOOS) |
||||||
- } |
- } |
||||||
ctxt.LinkMode = LinkExternal |
ctxt.LinkMode = LinkExternal |
||||||
default: |
default: |
||||||
if needed, _ := mustLinkExternal(ctxt); needed { |
if needed, _ := mustLinkExternal(ctxt); needed { |
||||||
@@ -261,17 +258,10 @@ |
@@ -255,17 +252,10 @@ |
||||||
} else { |
} else { |
||||||
ctxt.LinkMode = LinkInternal |
ctxt.LinkMode = LinkInternal |
||||||
} |
} |
||||||
- if objabi.GOARCH == "ppc64" && ctxt.LinkMode == LinkExternal { |
- if objabi.GOARCH == "ppc64" && objabi.GOOS != "aix" && ctxt.LinkMode == LinkExternal { |
||||||
- Exitf("external linking is not supported for %s/ppc64", objabi.GOOS) |
- Exitf("external linking is not supported for %s/ppc64", objabi.GOOS) |
||||||
- } |
- } |
||||||
} |
} |
||||||
case LinkInternal: |
case LinkInternal: |
||||||
if needed, reason := mustLinkExternal(ctxt); needed { |
if needed, reason := mustLinkExternal(ctxt); needed { |
||||||
Exitf("internal linking requested but external linking required: %s", reason) |
Exitf("internal linking requested but external linking required: %s", reason) |
||||||
} |
} |
||||||
- case LinkExternal: |
- case LinkExternal: |
||||||
- if objabi.GOARCH == "ppc64" { |
- if objabi.GOARCH == "ppc64" && objabi.GOOS != "aix" { |
||||||
- Exitf("external linking not supported for %s/ppc64", objabi.GOOS) |
- Exitf("external linking not supported for %s/ppc64", objabi.GOOS) |
||||||
- } |
- } |
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -0,0 +1,3 @@ |
|||||||
|
# there are ELF files in src which are testdata and shouldn't be modified |
||||||
|
-b /usr/lib/golang/src |
||||||
|
-b /usr/lib64/golang/src |
@ -0,0 +1,8 @@ |
|||||||
|
# Where to set GOPATH for builds. Like: |
||||||
|
# export GOPATH=$(pwd)/_build:%{gopath} |
||||||
|
%gopath %{_datadir}/gocode |
||||||
|
|
||||||
|
# for use like: |
||||||
|
# ExclusiveArch: %{go_arches} |
||||||
|
%go_arches %{ix86} x86_64 %{arm} aarch64 ppc64le |
||||||
|
|
Loading…
Reference in new issue