1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
diff --git a/src/cmd/dist/build.c b/src/cmd/dist/build.c
index e4b8b58..04bf6cf 100644
--- a/src/cmd/dist/build.c
+++ b/src/cmd/dist/build.c
@@ -39,7 +39,7 @@ static void dopack(char*, char*, char**, int);
static char *findgoversion(void);
// The known architecture letters.
-static char *gochars = "566899";
+static char *gochars = "5667899";
// The known architectures.
static char *okgoarch[] = {
@@ -47,6 +47,7 @@ static char *okgoarch[] = {
"arm",
"amd64",
"amd64p32",
+ "arm64",
"386",
"ppc64",
"ppc64le",
diff --git a/src/cmd/dist/buildgc.c b/src/cmd/dist/buildgc.c
index 64434d5..c0302eb 100644
--- a/src/cmd/dist/buildgc.c
+++ b/src/cmd/dist/buildgc.c
@@ -73,7 +73,7 @@ xatoi(char *s, char **end)
return val;
}
-// mkanames reads [5689].out.h and writes anames[5689].c
+// mkanames reads [56789].out.h and writes anames[56789].c
// The format is much the same as the Go opcodes above.
// It also writes out cnames array for C_* constants and the dnames
// array for D_* constants.
diff --git a/src/cmd/dist/unix.c b/src/cmd/dist/unix.c
index 0fd17c1..6b2e675 100644
--- a/src/cmd/dist/unix.c
+++ b/src/cmd/dist/unix.c
@@ -708,6 +708,8 @@ main(int argc, char **argv)
gohostarch = "386";
else if(contains(u.machine, "arm"))
gohostarch = "arm";
+ else if(contains(u.machine, "aarch64"))
+ gohostarch = "arm64";
else if(contains(u.machine, "ppc64le"))
gohostarch = "ppc64le";
else if(contains(u.machine, "ppc64"))
diff --git a/src/go/build/build.go b/src/go/build/build.go
index 12c20e5..c62425a 100644
--- a/src/go/build/build.go
+++ b/src/go/build/build.go
@@ -1386,6 +1386,8 @@ func ArchChar(goarch string) (string, error) {
return "6", nil
case "arm":
return "5", nil
+ case "arm64":
+ return "7", nil
case "ppc64", "ppc64le":
return "9", nil
}
diff --git a/src/go/build/syslist.go b/src/go/build/syslist.go
index 9246cbf..e84a066 100644
--- a/src/go/build/syslist.go
+++ b/src/go/build/syslist.go
@@ -5,4 +5,4 @@
package build
const goosList = "android darwin dragonfly freebsd linux nacl netbsd openbsd plan9 solaris windows "
-const goarchList = "386 amd64 amd64p32 arm ppc64 ppc64le "
+const goarchList = "386 amd64 amd64p32 arm arm64 ppc64 ppc64le "
|