diff --git a/src/cmd/go/internal/imports/build.go b/src/cmd/go/internal/imports/build.go index 53fa1967f742e..0f20a8786e17f 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 0b8e5d2330e1e..7c71d7e6e4a16 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"}