diff options
author | limeidan <limeidan@loongson.cn> | 2022-08-25 11:14:15 +0800 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2023-04-12 20:06:37 +0000 |
commit | b3a194aad63d476543be27a935849bd8e3f9534b (patch) | |
tree | 18e187a57ab1069f26edb13affaa20ffd336f555 | |
parent | 313ce55a866b20f22ea68d6b4359ebd0c4489ada (diff) | |
download | go-git-b3a194aad63d476543be27a935849bd8e3f9534b.tar.gz |
cmd/internal/sys, cmd/dist, misc/cgo/testcshared: enable c-shared feature and test on loong64
Linux kernel on loong64 has no Dup2 syscall support, so we use Dup3 to replace it like arm64 and riscv64.
Updates #53301
Fixes #58784
Change-Id: I4e0be140a71b86f4626ed39d76cf3ac78f842018
Reviewed-on: https://go-review.googlesource.com/c/go/+/425478
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: WANG Xuerui <git@xen0n.name>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: xiaodong liu <teaofmoli@gmail.com>
Reviewed-by: WANG Xuerui <git@xen0n.name>
-rw-r--r-- | misc/cgo/testcshared/testdata/libgo2/dup2.go | 2 | ||||
-rw-r--r-- | misc/cgo/testcshared/testdata/libgo2/dup3.go | 2 | ||||
-rw-r--r-- | src/cmd/dist/test.go | 2 | ||||
-rw-r--r-- | src/internal/platform/supported.go | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/misc/cgo/testcshared/testdata/libgo2/dup2.go b/misc/cgo/testcshared/testdata/libgo2/dup2.go index ef86083a03..d50e0c42ab 100644 --- a/misc/cgo/testcshared/testdata/libgo2/dup2.go +++ b/misc/cgo/testcshared/testdata/libgo2/dup2.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build darwin || dragonfly || freebsd || (linux && !arm64 && !riscv64) || netbsd || openbsd +//go:build darwin || dragonfly || freebsd || (linux && !arm64 && !loong64 && !riscv64) || netbsd || openbsd package main diff --git a/misc/cgo/testcshared/testdata/libgo2/dup3.go b/misc/cgo/testcshared/testdata/libgo2/dup3.go index 913c4bbaca..ec4b5a73ec 100644 --- a/misc/cgo/testcshared/testdata/libgo2/dup3.go +++ b/misc/cgo/testcshared/testdata/libgo2/dup3.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (linux && arm64) || (linux && riscv64) +//go:build (linux && arm64) || (linux && loong64) || (linux && riscv64) package main diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go index b7c200af36..f58b49e028 100644 --- a/src/cmd/dist/test.go +++ b/src/cmd/dist/test.go @@ -1716,7 +1716,7 @@ func buildModeSupported(compiler, buildmode, goos, goarch string) bool { case "c-shared": switch platform { - case "linux/amd64", "linux/arm", "linux/arm64", "linux/386", "linux/ppc64le", "linux/riscv64", "linux/s390x", + case "linux/amd64", "linux/arm", "linux/arm64", "linux/loong64", "linux/386", "linux/ppc64le", "linux/riscv64", "linux/s390x", "android/amd64", "android/arm", "android/arm64", "android/386", "freebsd/amd64", "darwin/amd64", "darwin/arm64", diff --git a/src/internal/platform/supported.go b/src/internal/platform/supported.go index 7039c76774..01524fbcd7 100644 --- a/src/internal/platform/supported.go +++ b/src/internal/platform/supported.go @@ -157,7 +157,7 @@ func BuildModeSupported(compiler, buildmode, goos, goarch string) bool { case "c-shared": switch platform { - case "linux/amd64", "linux/arm", "linux/arm64", "linux/386", "linux/ppc64le", "linux/riscv64", "linux/s390x", + case "linux/amd64", "linux/arm", "linux/arm64", "linux/loong64", "linux/386", "linux/ppc64le", "linux/riscv64", "linux/s390x", "android/amd64", "android/arm", "android/arm64", "android/386", "freebsd/amd64", "darwin/amd64", "darwin/arm64", |