Commit 5b147122 authored by Vladimir Stefanovic's avatar Vladimir Stefanovic Committed by Brad Fitzpatrick

cmd/dist: add support for GOARCH=mips{,le}

Change-Id: I6e24d22eada190e9aa2adc161be7a753c8e5054b
Reviewed-on: https://go-review.googlesource.com/31514
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
parent 241dccc4
......@@ -9,6 +9,7 @@ import (
"cmd/compile/internal/arm"
"cmd/compile/internal/arm64"
"cmd/compile/internal/gc"
"cmd/compile/internal/mips"
"cmd/compile/internal/mips64"
"cmd/compile/internal/ppc64"
"cmd/compile/internal/s390x"
......@@ -36,6 +37,8 @@ func main() {
arm.Init()
case "arm64":
arm64.Init()
case "mips", "mipsle":
mips.Init()
case "mips64", "mips64le":
mips64.Init()
case "ppc64", "ppc64le":
......
......@@ -1107,6 +1107,8 @@ var cgoEnabled = map[string]bool{
"linux/arm64": true,
"linux/ppc64": false,
"linux/ppc64le": true,
"linux/mips": false,
"linux/mipsle": false,
"linux/mips64": true,
"linux/mips64le": true,
"linux/s390x": true,
......
......@@ -37,6 +37,7 @@ var bootstrapDirs = []string{
"cmd/compile/internal/arm",
"cmd/compile/internal/arm64",
"cmd/compile/internal/gc",
"cmd/compile/internal/mips",
"cmd/compile/internal/mips64",
"cmd/compile/internal/ppc64",
"cmd/compile/internal/s390x",
......@@ -59,6 +60,7 @@ var bootstrapDirs = []string{
"cmd/link/internal/arm",
"cmd/link/internal/arm64",
"cmd/link/internal/ld",
"cmd/link/internal/mips",
"cmd/link/internal/mips64",
"cmd/link/internal/ppc64",
"cmd/link/internal/s390x",
......
......@@ -445,6 +445,11 @@ func main() {
if elfIsLittleEndian(os.Args[0]) {
gohostarch = "mips64le"
}
case strings.Contains(out, "mips"):
gohostarch = "mips"
if elfIsLittleEndian(os.Args[0]) {
gohostarch = "mipsle"
}
case strings.Contains(out, "s390x"):
gohostarch = "s390x"
case gohostos == "darwin":
......
......@@ -10,6 +10,7 @@ import (
"cmd/link/internal/arm"
"cmd/link/internal/arm64"
"cmd/link/internal/ld"
"cmd/link/internal/mips"
"cmd/link/internal/mips64"
"cmd/link/internal/ppc64"
"cmd/link/internal/s390x"
......@@ -45,6 +46,8 @@ func main() {
arm.Init()
case "arm64":
arm64.Init()
case "mips", "mipsle":
mips.Init()
case "mips64", "mips64le":
mips64.Init()
case "ppc64", "ppc64le":
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment