This patch introduces aarch64 as a Go architecture.

  Matthias
# DP: Introduce aarch64 goarch.

--- a/src/libgo/go/go/build/syslist.go
+++ a/src/libgo/go/go/build/syslist.go
@@ -5,4 +5,4 @@
 package build
 
 const goosList = "darwin dragonfly freebsd linux netbsd openbsd plan9 windows 
solaris "
-const goarchList = "386 amd64 arm alpha m68k mipso32 mipsn32 mipsn64 mipso64 
ppc ppc64 sparc sparc64 "
+const goarchList = "386 amd64 arm aarch64 alpha m68k mipso32 mipsn32 mipsn64 
mipso64 ppc ppc64 sparc sparc64 "
--- a/src/libgo/configure.ac
+++ a/src/libgo/configure.ac
@@ -172,6 +172,7 @@
 
 dnl N.B. Keep in sync with gcc/testsuite/go.test/go-test.exp (go-set-goarch).
 is_386=no
+is_aarch64=no
 is_alpha=no
 is_arm=no
 is_m68k=no
@@ -183,6 +184,10 @@
 is_x86_64=no
 GOARCH=unknown
 case ${host} in
+  aarch64*-*-*)
+    is_aarch64=yes
+    GOARCH=aarch64
+    ;;
   alpha*-*-*)
     is_alpha=yes
     GOARCH=alpha
@@ -265,6 +270,7 @@
     ;;
 esac
 AM_CONDITIONAL(LIBGO_IS_386, test $is_386 = yes)
+AM_CONDITIONAL(LIBGO_IS_AARCH64, test $is_aarch64 = yes)
 AM_CONDITIONAL(LIBGO_IS_ALPHA, test $is_alpha = yes)
 AM_CONDITIONAL(LIBGO_IS_ARM, test $is_arm = yes)
 AM_CONDITIONAL(LIBGO_IS_M68K, test $is_m68k = yes)
--- a/src/gcc/testsuite/go.test/go-test.exp
+++ a/src/gcc/testsuite/go.test/go-test.exp
@@ -187,6 +187,9 @@
     global target_triplet
 
     switch -glob $target_triplet {
+       "aarch64*-*-*" {
+           set goarch "aarch64"
+       }
        "alpha*-*-*" {
            set goarch "alpha"
        }

Reply via email to