From d09ca2cb8ec5306f20b527266ce161bd9292cad4 Mon Sep 17 00:00:00 2001 From: Xiaodong Liu Date: Sun, 15 Aug 2021 15:57:43 +0800 Subject: [PATCH] cmd/go/internal: configure go tool workflow for loong64 Contributors to the loong64 port are: Weining Lu Lei Wang Lingqin Gong Xiaolin Zhao Meidan Li Xiaojuan Zhai Qiyuan Pu Guoqi Chen This port has been updated to Go 1.15.6: https://github.com/loongson/go Updates #46229 Change-Id: I6b537a7d842b0683586917fe7ea7cd4d70d888de Reviewed-on: https://go-review.googlesource.com/c/go/+/342308 TryBot-Result: Gopher Robot Run-TryBot: Ian Lance Taylor Reviewed-by: David Chase Reviewed-by: Bryan Mills Auto-Submit: Ian Lance Taylor --- src/cmd/go/internal/imports/build.go | 1 + src/cmd/go/internal/work/exec.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/cmd/go/internal/imports/build.go b/src/cmd/go/internal/imports/build.go index 53fa1967f7..0f20a8786e 100644 --- a/src/cmd/go/internal/imports/build.go +++ b/src/cmd/go/internal/imports/build.go @@ -328,6 +328,7 @@ var KnownArch = map[string]bool{ "mips64le": true, "mips64p32": true, "mips64p32le": true, + "loong64": true, "ppc": true, "riscv": true, "riscv64": true, diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go index 0b8e5d2330..7c71d7e6e4 100644 --- a/src/cmd/go/internal/work/exec.go +++ b/src/cmd/go/internal/work/exec.go @@ -2654,6 +2654,8 @@ func (b *Builder) gccArchArgs() []string { } else if cfg.GOMIPS == "softfloat" { return append(args, "-msoft-float") } + case "loong64": + return []string{"-mabi=lp64d"} case "ppc64": if cfg.Goos == "aix" { return []string{"-maix64"}