]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/dist, go/types: add support for GOARCH=sparc64
authorTobias Klauser <tklauser@distanz.ch>
Thu, 30 Aug 2018 08:23:54 +0000 (10:23 +0200)
committerTobias Klauser <tobias.klauser@gmail.com>
Fri, 7 Sep 2018 13:15:45 +0000 (13:15 +0000)
This is needed in addition to CL 102555 in order to be able to generate
Go type definitions for linux/sparc64 in the golang.org/x/sys/unix
package.

Change-Id: I928185e320572fecb0c89396f871ea16cba8b9a6
Reviewed-on: https://go-review.googlesource.com/132155
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/dist/build.go
src/cmd/vet/all/main.go
src/go/types/sizes.go

index d4f9dc4fbb5f41256f00fea2a5cca3c6bf8a3912..b27d3aac4de032fc4f7154e8d93592e4dfcaf6d2 100644 (file)
@@ -69,6 +69,7 @@ var okgoarch = []string{
        "ppc64le",
        "riscv64",
        "s390x",
+       "sparc64",
        "wasm",
 }
 
@@ -1407,6 +1408,7 @@ var cgoEnabled = map[string]bool{
        "linux/mips64le":  true,
        "linux/riscv64":   true,
        "linux/s390x":     true,
+       "linux/sparc64":   true,
        "android/386":     true,
        "android/amd64":   true,
        "android/arm":     true,
index e7fe4edc2a41db6dccc700aac2bdaf839867c7b2..24dfafd7bf67a1af7b19bc8babaf7ab6b1d0e7a8 100644 (file)
@@ -192,9 +192,9 @@ func vetPlatforms(pp []platform) {
 }
 
 func (p platform) vet() {
-       if p.os == "linux" && p.arch == "riscv64" {
-               // TODO(tklauser): enable as soon as the riscv64 port has fully landed
-               fmt.Println("skipping linux/riscv64")
+       if p.os == "linux" && (p.arch == "riscv64" || p.arch == "sparc64") {
+               // TODO(tklauser): enable as soon as these ports have fully landed
+               fmt.Printf("skipping %s/%s\n", p.os, p.arch)
                return
        }
 
index 7b5410167f99bc0304a35f336fd55b226849bf6d..f890c303774ae16d43b99663a8f7bab715dc0587 100644 (file)
@@ -169,6 +169,7 @@ var gcArchSizes = map[string]*StdSizes{
        "ppc64le":  {8, 8},
        "riscv64":  {8, 8},
        "s390x":    {8, 8},
+       "sparc64":  {8, 8},
        "wasm":     {8, 8},
        // When adding more architectures here,
        // update the doc string of SizesFor below.
@@ -179,7 +180,7 @@ var gcArchSizes = map[string]*StdSizes{
 //
 // Supported architectures for compiler "gc":
 // "386", "arm", "arm64", "amd64", "amd64p32", "mips", "mipsle",
-// "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm".
+// "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "sparc64", "wasm".
 func SizesFor(compiler, arch string) Sizes {
        if compiler != "gc" {
                return nil