aboutsummaryrefslogtreecommitdiff
path: root/libgo/configure
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2014-11-04 22:39:30 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2014-11-04 22:39:30 +0000
commit1fec5f5274d7e232b75fc400321ed64be46766c3 (patch)
tree770354d65e888c2d5026ac0f9759649f58da3104 /libgo/configure
parentf6166a42cc539777393886b6ead213818e8a57af (diff)
downloadgcc-1fec5f5274d7e232b75fc400321ed64be46766c3.zip
gcc-1fec5f5274d7e232b75fc400321ed64be46766c3.tar.gz
gcc-1fec5f5274d7e232b75fc400321ed64be46766c3.tar.bz2
libgo: add s390 support
From Dominik Vogt. * libgo/go/syscall/libcall_linux_s390.go: New file for s390 support. * libgo/go/syscall/syscall_linux_s390.go: Ditto. * libgo/go/syscall/libcall_linux_s390x.go: New file for s390x support. * libgo/go/syscall/syscall_linux_s390x.go: Ditto. * libgo/go/runtime/pprof/pprof.go (printStackRecord): Support s390 and s390x. * libgo/runtime/runtime.c (runtime_cputicks): Add support for s390 and s390x * libgo/mksysinfo.sh: Ditto. (upcase_fields): New helper function * libgo/go/debug/elf/file.go (applyRelocations): Implement relocations on s390x. (applyRelocationsS390x): Ditto. (DWARF): Ditto. * libgo/go/debug/elf/elf.go (R_390): New constants for S390 relocations. (r390Strings): Ditto. (String): Helper function for S390 relocations. (GoString): Ditto. * libgo/go/reflect/makefuncgo_s390.go: New file. (S390MakeFuncStubGo): Implementation of s390 abi. * libgo/go/reflect/makefuncgo_s390x.go: New file. (S390xMakeFuncStubGo): Implementation of s390x abi. * libgo/go/reflect/makefunc_s390.c: New file. (makeFuncStub): s390 and s390x specific implementation of function. * libgo/go/reflect/makefunc.go (MakeFunc): Add support for s390 and s390x. (makeMethodValue): Ditto. (makeValueMethod): Ditto. * libgo/Makefile.am (go_reflect_makefunc_s_file): Ditto. (go_reflect_makefunc_file): Ditto. * libgo/go/reflect/makefunc_dummy.c: Ditto. * libgo/runtime/runtime.h (__go_makefunc_can_recover): Export prototype for use in makefunc_s390.c. (__go_makefunc_returning): Ditto. * libgo/go/syscall/exec_linux.go (forkAndExecInChild): Fix order of the arguments of the clone system call for s390[x]. * libgo/configure.ac (is_s390): New variable. (is_s390x): Ditto (LIBGO_IS_S390): Ditto. (LIBGO_IS_S390X): Ditto. (GOARCH): Support s390 and s390x. * libgo/go/go/build/build.go (cgoEnabled): Ditto. * libgo/go/go/build/syslist.go (goarchList): Ditto. From-SVN: r217106
Diffstat (limited to 'libgo/configure')
-rwxr-xr-xlibgo/configure54
1 files changed, 52 insertions, 2 deletions
diff --git a/libgo/configure b/libgo/configure
index 7984e86..68161f6 100755
--- a/libgo/configure
+++ b/libgo/configure
@@ -631,6 +631,10 @@ LIBGO_IS_SPARC64_FALSE
LIBGO_IS_SPARC64_TRUE
LIBGO_IS_SPARC_FALSE
LIBGO_IS_SPARC_TRUE
+LIBGO_IS_S390X_FALSE
+LIBGO_IS_S390X_TRUE
+LIBGO_IS_S390_FALSE
+LIBGO_IS_S390_TRUE
LIBGO_IS_PPC64_FALSE
LIBGO_IS_PPC64_TRUE
LIBGO_IS_PPC_FALSE
@@ -11118,7 +11122,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11121 "configure"
+#line 11125 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11224,7 +11228,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11227 "configure"
+#line 11231 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13620,6 +13624,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
@@ -13739,6 +13745,26 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
GOARCH=ppc64
fi
;;
+ s390*-*-*)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if defined(__s390x__)
+#error 64-bit
+#endif
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ is_s390=yes
+else
+ is_s390x=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test "$is_s390" = "yes"; then
+ GOARCH=s390
+ else
+ GOARCH=s390x
+ fi
+ ;;
sparc*-*-*)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13856,6 +13882,22 @@ else
LIBGO_IS_PPC64_FALSE=
fi
+ if test $is_s390 = yes; then
+ LIBGO_IS_S390_TRUE=
+ LIBGO_IS_S390_FALSE='#'
+else
+ LIBGO_IS_S390_TRUE='#'
+ LIBGO_IS_S390_FALSE=
+fi
+
+ if test $is_s390x = yes; then
+ LIBGO_IS_S390X_TRUE=
+ LIBGO_IS_S390X_FALSE='#'
+else
+ LIBGO_IS_S390X_TRUE='#'
+ LIBGO_IS_S390X_FALSE=
+fi
+
if test $is_sparc = yes; then
LIBGO_IS_SPARC_TRUE=
LIBGO_IS_SPARC_FALSE='#'
@@ -15630,6 +15672,14 @@ if test -z "${LIBGO_IS_PPC64_TRUE}" && test -z "${LIBGO_IS_PPC64_FALSE}"; then
as_fn_error "conditional \"LIBGO_IS_PPC64\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${LIBGO_IS_S390_TRUE}" && test -z "${LIBGO_IS_S390_FALSE}"; then
+ as_fn_error "conditional \"LIBGO_IS_S390\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${LIBGO_IS_S390X_TRUE}" && test -z "${LIBGO_IS_S390X_FALSE}"; then
+ as_fn_error "conditional \"LIBGO_IS_S390X\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${LIBGO_IS_SPARC_TRUE}" && test -z "${LIBGO_IS_SPARC_FALSE}"; then
as_fn_error "conditional \"LIBGO_IS_SPARC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5