aboutsummaryrefslogtreecommitdiffstats
path: root/community/go/default-buildmode-pie.patch
blob: 96adcee50c399f7998240fbc097d0142f7aed2e8 (plain) (blame)
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
26
27
diff --git a/src/cmd/go/internal/work/init.go b/src/cmd/go/internal/work/init.go
index 7f894f5..a37cbf3 100644
--- a/src/cmd/go/internal/work/init.go
+++ b/src/cmd/go/internal/work/init.go
@@ -111,7 +111,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":
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
index f63c946..80ad134 100644
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -553,7 +553,7 @@ func (t *tester) registerTests() {
 		}
 
 		// ARM libgcc may be Thumb, which internal linking does not support.
-		if goarch == "arm" {
+		if goarch == "arm" || goarch == "s390x" {
 			break
 		}