1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
diff -upr go.orig/src/cmd/go/internal/load/pkg.go go/src/cmd/go/internal/load/pkg.go
--- go.orig/src/cmd/go/internal/load/pkg.go 2018-08-24 22:38:35.000000000 +0200
+++ go/src/cmd/go/internal/load/pkg.go 2018-09-06 22:18:36.756408760 +0200
@@ -1578,7 +1578,7 @@ func LinkerDeps(p *Package) []string {
func externalLinkingForced(p *Package) bool {
// Some targets must use external linking even inside GOROOT.
switch cfg.BuildContext.GOOS {
- case "android":
+ case "android", "linux":
return true
case "darwin":
switch cfg.BuildContext.GOARCH {
diff -upr go.orig/src/cmd/go/internal/work/init.go go/src/cmd/go/internal/work/init.go
--- go.orig/src/cmd/go/internal/work/init.go 2018-08-24 22:38:35.000000000 +0200
+++ go/src/cmd/go/internal/work/init.go 2018-09-06 22:18:03.942821296 +0200
@@ -123,7 +123,8 @@ func buildModeInit() {
ldBuildmode = "c-shared"
case "default":
switch platform {
- case "android/arm", "android/arm64", "android/amd64", "android/386":
+ case "linux/amd64", "linux/arm", "linux/arm64", "linux/386", "linux/ppc64le", "linux/s390x",
+ "android/amd64", "android/arm", "android/arm64", "android/386":
codegenArg = "-shared"
ldBuildmode = "pie"
case "darwin/arm", "darwin/arm64":
|