go/build: Set GOARCH on arm64 systems.
I am reliably informed that the architecture name and letter for the plan9/inferno compilers for 64-bit ARM systems will be "arm64" and "7" respectively, so let's get that bit in nice and early. From Michael Hudson-Doyle. https://codereview.appspot.com/34830045/ From-SVN: r206374
This commit is contained in:
parent
96066ce19b
commit
71d0d50aa3
23
libgo/configure
vendored
23
libgo/configure
vendored
@ -647,6 +647,8 @@ LIBGO_IS_MIPS_FALSE
|
||||
LIBGO_IS_MIPS_TRUE
|
||||
LIBGO_IS_M68K_FALSE
|
||||
LIBGO_IS_M68K_TRUE
|
||||
LIBGO_IS_ARM64_FALSE
|
||||
LIBGO_IS_ARM64_TRUE
|
||||
LIBGO_IS_ARM_FALSE
|
||||
LIBGO_IS_ARM_TRUE
|
||||
LIBGO_IS_ALPHA_FALSE
|
||||
@ -11113,7 +11115,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 11116 "configure"
|
||||
#line 11118 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -11219,7 +11221,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<_LT_EOF
|
||||
#line 11222 "configure"
|
||||
#line 11224 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -13592,6 +13594,7 @@ esac
|
||||
is_386=no
|
||||
is_alpha=no
|
||||
is_arm=no
|
||||
is_arm64=no
|
||||
is_m68k=no
|
||||
mips_abi=unknown
|
||||
is_ppc=no
|
||||
@ -13605,6 +13608,10 @@ case ${host} in
|
||||
is_alpha=yes
|
||||
GOARCH=alpha
|
||||
;;
|
||||
aarch64-*-*)
|
||||
is_arm64=yes
|
||||
GOARCH=arm64
|
||||
;;
|
||||
arm*-*-* | strongarm*-*-* | ep9312*-*-* | xscale-*-*)
|
||||
is_arm=yes
|
||||
GOARCH=arm
|
||||
@ -13756,6 +13763,14 @@ else
|
||||
LIBGO_IS_ARM_FALSE=
|
||||
fi
|
||||
|
||||
if test $is_arm64 = yes; then
|
||||
LIBGO_IS_ARM64_TRUE=
|
||||
LIBGO_IS_ARM64_FALSE='#'
|
||||
else
|
||||
LIBGO_IS_ARM64_TRUE='#'
|
||||
LIBGO_IS_ARM64_FALSE=
|
||||
fi
|
||||
|
||||
if test $is_m68k = yes; then
|
||||
LIBGO_IS_M68K_TRUE=
|
||||
LIBGO_IS_M68K_FALSE='#'
|
||||
@ -15538,6 +15553,10 @@ if test -z "${LIBGO_IS_ARM_TRUE}" && test -z "${LIBGO_IS_ARM_FALSE}"; then
|
||||
as_fn_error "conditional \"LIBGO_IS_ARM\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${LIBGO_IS_ARM64_TRUE}" && test -z "${LIBGO_IS_ARM64_FALSE}"; then
|
||||
as_fn_error "conditional \"LIBGO_IS_ARM64\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
fi
|
||||
if test -z "${LIBGO_IS_M68K_TRUE}" && test -z "${LIBGO_IS_M68K_FALSE}"; then
|
||||
as_fn_error "conditional \"LIBGO_IS_M68K\" was never defined.
|
||||
Usually this means the macro was only invoked conditionally." "$LINENO" 5
|
||||
|
@ -174,6 +174,7 @@ dnl N.B. Keep in sync with gcc/testsuite/go.test/go-test.exp (go-set-goarch).
|
||||
is_386=no
|
||||
is_alpha=no
|
||||
is_arm=no
|
||||
is_arm64=no
|
||||
is_m68k=no
|
||||
mips_abi=unknown
|
||||
is_ppc=no
|
||||
@ -187,6 +188,10 @@ case ${host} in
|
||||
is_alpha=yes
|
||||
GOARCH=alpha
|
||||
;;
|
||||
aarch64-*-*)
|
||||
is_arm64=yes
|
||||
GOARCH=arm64
|
||||
;;
|
||||
arm*-*-* | strongarm*-*-* | ep9312*-*-* | xscale-*-*)
|
||||
is_arm=yes
|
||||
GOARCH=arm
|
||||
@ -267,6 +272,7 @@ esac
|
||||
AM_CONDITIONAL(LIBGO_IS_386, test $is_386 = yes)
|
||||
AM_CONDITIONAL(LIBGO_IS_ALPHA, test $is_alpha = yes)
|
||||
AM_CONDITIONAL(LIBGO_IS_ARM, test $is_arm = yes)
|
||||
AM_CONDITIONAL(LIBGO_IS_ARM64, test $is_arm64 = yes)
|
||||
AM_CONDITIONAL(LIBGO_IS_M68K, test $is_m68k = yes)
|
||||
AM_CONDITIONAL(LIBGO_IS_MIPS, test $mips_abi != unknown)
|
||||
AM_CONDITIONAL(LIBGO_IS_MIPSO32, test $mips_abi = o32)
|
||||
|
@ -1211,6 +1211,8 @@ func ArchChar(goarch string) (string, error) {
|
||||
return "6", nil
|
||||
case "arm":
|
||||
return "5", nil
|
||||
case "arm64":
|
||||
return "7", nil
|
||||
}
|
||||
return "", errors.New("unsupported GOARCH " + goarch)
|
||||
}
|
||||
|
@ -360,7 +360,7 @@ func allowed(pkg string) map[string]bool {
|
||||
|
||||
var bools = []bool{false, true}
|
||||
var geese = []string{"darwin", "dragonfly", "freebsd", "linux", "netbsd", "openbsd", "plan9", "windows"}
|
||||
var goarches = []string{"386", "amd64", "arm"}
|
||||
var goarches = []string{"386", "amd64", "arm", "arm64"}
|
||||
|
||||
type osPkg struct {
|
||||
goos, pkg string
|
||||
|
@ -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 arm64 alpha m68k mipso32 mipsn32 mipsn64 mipso64 ppc ppc64 sparc sparc64 "
|
||||
|
@ -185,5 +185,5 @@ func Version() string {
|
||||
const GOOS string = theGoos
|
||||
|
||||
// GOARCH is the running program's architecture target:
|
||||
// 386, amd64, or arm.
|
||||
// 386, amd64, arm or arm64.
|
||||
const GOARCH string = theGoarch
|
||||
|
Loading…
Reference in New Issue
Block a user