aboutsummaryrefslogtreecommitdiff
path: root/libgo/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/configure.ac')
-rw-r--r--libgo/configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/libgo/configure.ac b/libgo/configure.ac
index 0469b89..d651827 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -194,6 +194,8 @@ is_m68k=no
mips_abi=unknown
is_ppc=no
is_ppc64=no
+is_s390=no
+is_s390x=no
is_sparc=no
is_sparc64=no
is_x86_64=no
@@ -271,6 +273,18 @@ changequote([,])dnl
GOARCH=ppc64
fi
;;
+ s390*-*-*)
+ AC_COMPILE_IFELSE([
+#if defined(__s390x__)
+#error 64-bit
+#endif],
+[is_s390=yes], [is_s390x=yes])
+ if test "$is_s390" = "yes"; then
+ GOARCH=s390
+ else
+ GOARCH=s390x
+ fi
+ ;;
sparc*-*-*)
AC_COMPILE_IFELSE([
#if defined(__sparcv9) || defined(__arch64__)
@@ -296,6 +310,8 @@ AM_CONDITIONAL(LIBGO_IS_MIPSN64, test $mips_abi = n64)
AM_CONDITIONAL(LIBGO_IS_MIPSO64, test $mips_abi = o64)
AM_CONDITIONAL(LIBGO_IS_PPC, test $is_ppc = yes)
AM_CONDITIONAL(LIBGO_IS_PPC64, test $is_ppc64 = yes)
+AM_CONDITIONAL(LIBGO_IS_S390, test $is_s390 = yes)
+AM_CONDITIONAL(LIBGO_IS_S390X, test $is_s390x = yes)
AM_CONDITIONAL(LIBGO_IS_SPARC, test $is_sparc = yes)
AM_CONDITIONAL(LIBGO_IS_SPARC64, test $is_sparc64 = yes)
AM_CONDITIONAL(LIBGO_IS_X86_64, test $is_x86_64 = yes)