diff options
| author | Xiaodong Liu <liuxiaodong@loongson.cn> | 2021-08-15 15:53:05 +0800 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-05-01 00:05:20 +0000 |
| commit | edab07d09f1dcee58395602054ffb1cd03490dd8 (patch) | |
| tree | ccd59a656aa921946259f4967dde24f9670cb040 /src | |
| parent | fd6c556dc82253722a7f7b9f554a1892b0ede36e (diff) | |
| download | go-edab07d09f1dcee58395602054ffb1cd03490dd8.tar.xz | |
cmd/dist: support dist tool for loong64
Contributors to the loong64 port are:
Weining Lu <luweining@loongson.cn>
Lei Wang <wanglei@loongson.cn>
Lingqin Gong <gonglingqin@loongson.cn>
Xiaolin Zhao <zhaoxiaolin@loongson.cn>
Meidan Li <limeidan@loongson.cn>
Xiaojuan Zhai <zhaixiaojuan@loongson.cn>
Qiyuan Pu <puqiyuan@loongson.cn>
Guoqi Chen <chenguoqi@loongson.cn>
This port has been updated to Go 1.15.6:
https://github.com/loongson/go
Updates #46229
Change-Id: I61dca43680d8e5bd3198a38577450a53f405a987
Reviewed-on: https://go-review.googlesource.com/c/go/+/342307
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/dist/build.go | 3 | ||||
| -rw-r--r-- | src/cmd/dist/buildtool.go | 2 | ||||
| -rw-r--r-- | src/cmd/dist/main.go | 2 | ||||
| -rw-r--r-- | src/cmd/dist/test.go | 4 |
4 files changed, 9 insertions, 2 deletions
diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go index bbaf595421..c19714c456 100644 --- a/src/cmd/dist/build.go +++ b/src/cmd/dist/build.go @@ -64,6 +64,7 @@ var okgoarch = []string{ "amd64", "arm", "arm64", + "loong64", "mips", "mipsle", "mips64", @@ -1554,6 +1555,7 @@ var cgoEnabled = map[string]bool{ "linux/amd64": true, "linux/arm": true, "linux/arm64": true, + "linux/loong64": true, "linux/ppc64": false, "linux/ppc64le": true, "linux/mips": true, @@ -1593,6 +1595,7 @@ var cgoEnabled = map[string]bool{ // filtered out of cgoEnabled for 'dist list'. See golang.org/issue/28944 var incomplete = map[string]bool{ "linux/sparc64": true, + "linux/loong64": true, } // List of platforms which are first class ports. See golang.org/issue/38874. diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go index 79ccf2b167..6450601476 100644 --- a/src/cmd/dist/buildtool.go +++ b/src/cmd/dist/buildtool.go @@ -87,6 +87,8 @@ var ignorePrefixes = []string{ var ignoreSuffixes = []string{ "_arm64.s", "_arm64.go", + "_loong64.s", + "_loong64.go", "_riscv64.s", "_riscv64.go", "_wasm.s", diff --git a/src/cmd/dist/main.go b/src/cmd/dist/main.go index 212d5cbe45..2651ecb05f 100644 --- a/src/cmd/dist/main.go +++ b/src/cmd/dist/main.go @@ -133,6 +133,8 @@ func main() { if elfIsLittleEndian(os.Args[0]) { gohostarch = "mipsle" } + case strings.Contains(out, "loongarch64"): + gohostarch = "loong64" case strings.Contains(out, "riscv64"): gohostarch = "riscv64" case strings.Contains(out, "s390x"): diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go index 7c8f1ea46d..afe4b3aebb 100644 --- a/src/cmd/dist/test.go +++ b/src/cmd/dist/test.go @@ -1035,7 +1035,7 @@ func (t *tester) extLink() bool { "darwin-amd64", "darwin-arm64", "dragonfly-amd64", "freebsd-386", "freebsd-amd64", "freebsd-arm", - "linux-386", "linux-amd64", "linux-arm", "linux-arm64", "linux-ppc64le", "linux-mips64", "linux-mips64le", "linux-mips", "linux-mipsle", "linux-riscv64", "linux-s390x", + "linux-386", "linux-amd64", "linux-arm", "linux-arm64", "linux-loong64", "linux-ppc64le", "linux-mips64", "linux-mips64le", "linux-mips", "linux-mipsle", "linux-riscv64", "linux-s390x", "netbsd-386", "netbsd-amd64", "openbsd-386", "openbsd-amd64", "windows-386", "windows-amd64": @@ -1061,7 +1061,7 @@ func (t *tester) internalLink() bool { // Internally linking cgo is incomplete on some architectures. // https://golang.org/issue/10373 // https://golang.org/issue/14449 - if goarch == "mips64" || goarch == "mips64le" || goarch == "mips" || goarch == "mipsle" || goarch == "riscv64" { + if goarch == "loong64" || goarch == "mips64" || goarch == "mips64le" || goarch == "mips" || goarch == "mipsle" || goarch == "riscv64" { return false } if goos == "aix" { |
