]> Cypherpunks.ru repositories - gostls13.git/commitdiff
cmd/internal/sys, cmd/dist, misc/cgo/testcshared: enable c-shared feature and test...
authorlimeidan <limeidan@loongson.cn>
Thu, 25 Aug 2022 03:14:15 +0000 (11:14 +0800)
committerGopher Robot <gobot@golang.org>
Wed, 12 Apr 2023 20:06:37 +0000 (20:06 +0000)
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>
misc/cgo/testcshared/testdata/libgo2/dup2.go
misc/cgo/testcshared/testdata/libgo2/dup3.go
src/cmd/dist/test.go
src/internal/platform/supported.go

index ef86083a037316d0bd860c3d28c891b697333d5a..d50e0c42abef26536678f96b2b9253f30b5774dd 100644 (file)
@@ -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
 
index 913c4bbaca0dc3753365d45799e133ceec988653..ec4b5a73ec28b24999b3d89f7eac46e9956517db 100644 (file)
@@ -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
 
index b7c200af3657ad6465a32547de9cbfd2c8cc6df9..f58b49e0282d63e7f9dd24b4eb23ed12547d1467 100644 (file)
@@ -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",
index 7039c76774c97be672f53c62e7deb65224c8f246..01524fbcd77d1dd61e584c333b57be139c6755c8 100644 (file)
@@ -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",