aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-01-24 23:42:22 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-01-24 23:42:22 +0000
commitca11cc98b9daa5e5514b17c24563b49cdcbdc58c (patch)
treed68735895798976d2d62e7deab3a8b9b61b97a32 /libgo
parente8ba94fc1fe2d7d96bfc2fa5293c1bb0b86a5b52 (diff)
downloadgcc-ca11cc98b9daa5e5514b17c24563b49cdcbdc58c.zip
gcc-ca11cc98b9daa5e5514b17c24563b49cdcbdc58c.tar.gz
gcc-ca11cc98b9daa5e5514b17c24563b49cdcbdc58c.tar.bz2
Recognize m68k, mips, PPC. Don't require arch syscall files to exist.
From-SVN: r169185
Diffstat (limited to 'libgo')
-rw-r--r--libgo/Makefile.am4
-rw-r--r--libgo/Makefile.in6
-rw-r--r--libgo/configure147
-rw-r--r--libgo/configure.ac61
-rw-r--r--libgo/go/debug/proc/regs_rtems_386.go5
-rw-r--r--libgo/go/debug/proc/regs_rtems_amd64.go5
-rw-r--r--libgo/go/debug/proc/regs_solaris_386.go5
-rw-r--r--libgo/go/debug/proc/regs_solaris_amd64.go5
-rw-r--r--libgo/go/debug/proc/regs_solaris_sparc.go5
-rw-r--r--libgo/go/debug/proc/regs_solaris_sparc64.go5
-rw-r--r--libgo/syscalls/syscall_rtems_386.go7
-rw-r--r--libgo/syscalls/syscall_rtems_amd64.go7
-rw-r--r--libgo/syscalls/syscall_rtems_sparc.go7
-rw-r--r--libgo/testsuite/Makefile.in2
14 files changed, 200 insertions, 71 deletions
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index 254a805..0ed2d63 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -957,7 +957,7 @@ go_debug_pe_files = \
go_debug_proc_files = \
go/debug/proc/proc.go \
go/debug/proc/proc_$(GOOS).go \
- go/debug/proc/regs_$(GOOS)_$(GOARCH).go
+ $(GO_DEBUG_PROC_REGS_OS_ARCH_FILE)
go_encoding_ascii85_files = \
go/encoding/ascii85/ascii85.go
@@ -1189,7 +1189,7 @@ go_syscall_files = \
syscalls/syscall_unix.go \
syscalls/stringbyte.go \
syscalls/syscall_$(GOOS).go \
- syscalls/syscall_$(GOOS)_$(GOARCH).go \
+ $(GO_SYSCALLS_SYSCALL_OS_ARCH_FILE) \
syscalls/sysfile_posix.go \
sysinfo.go \
syscall_arch.go
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index 83cdf66..36a6850 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -354,6 +354,8 @@ GOARCH = @GOARCH@
GOC = @GOC@
GOCFLAGS = $(CFLAGS)
GOOS = @GOOS@
+GO_DEBUG_PROC_REGS_OS_ARCH_FILE = @GO_DEBUG_PROC_REGS_OS_ARCH_FILE@
+GO_SYSCALLS_SYSCALL_OS_ARCH_FILE = @GO_SYSCALLS_SYSCALL_OS_ARCH_FILE@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@@ -1352,7 +1354,7 @@ go_debug_pe_files = \
go_debug_proc_files = \
go/debug/proc/proc.go \
go/debug/proc/proc_$(GOOS).go \
- go/debug/proc/regs_$(GOOS)_$(GOARCH).go
+ $(GO_DEBUG_PROC_REGS_OS_ARCH_FILE)
go_encoding_ascii85_files = \
go/encoding/ascii85/ascii85.go
@@ -1558,7 +1560,7 @@ go_syscall_files = \
syscalls/syscall_unix.go \
syscalls/stringbyte.go \
syscalls/syscall_$(GOOS).go \
- syscalls/syscall_$(GOOS)_$(GOARCH).go \
+ $(GO_SYSCALLS_SYSCALL_OS_ARCH_FILE) \
syscalls/sysfile_posix.go \
sysinfo.go \
syscall_arch.go
diff --git a/libgo/configure b/libgo/configure
index edc6c1a..dc5ad3f 100644
--- a/libgo/configure
+++ b/libgo/configure
@@ -612,6 +612,8 @@ MATH_LIBS
USING_SPLIT_STACK_FALSE
USING_SPLIT_STACK_TRUE
SPLIT_STACK
+GO_DEBUG_PROC_REGS_OS_ARCH_FILE
+GO_SYSCALLS_SYSCALL_OS_ARCH_FILE
GOARCH
LIBGO_IS_X86_64_FALSE
LIBGO_IS_X86_64_TRUE
@@ -619,6 +621,16 @@ LIBGO_IS_SPARC64_FALSE
LIBGO_IS_SPARC64_TRUE
LIBGO_IS_SPARC_FALSE
LIBGO_IS_SPARC_TRUE
+LIBGO_IS_PPC64_FALSE
+LIBGO_IS_PPC64_TRUE
+LIBGO_IS_PPC_FALSE
+LIBGO_IS_PPC_TRUE
+LIBGO_IS_MIPS64_FALSE
+LIBGO_IS_MIPS64_TRUE
+LIBGO_IS_MIPS_FALSE
+LIBGO_IS_MIPS_TRUE
+LIBGO_IS_M68K_FALSE
+LIBGO_IS_M68K_TRUE
LIBGO_IS_ARM_FALSE
LIBGO_IS_ARM_TRUE
LIBGO_IS_386_FALSE
@@ -10878,7 +10890,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10881 "configure"
+#line 10893 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10984,7 +10996,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10987 "configure"
+#line 10999 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -13252,11 +13264,20 @@ fi
is_386=no
is_arm=no
+is_m68k=no
+is_mips=no
+is_mips64=no
+is_ppc=no
+is_ppc64=no
is_sparc=no
is_sparc64=no
is_x86_64=no
GOARCH=unknown
case ${host} in
+ arm*-*-* | strongarm*-*-* | ep9312*-*-* | xscale-*-*)
+ is_arm=yes
+ GOARCH=arm
+ ;;
i[34567]86-*-* | x86_64-*-*)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -13272,16 +13293,54 @@ else
fi
rm -f conftest.err conftest.$ac_ext
if test "$is_386" = "yes"; then
- is_386=yes
GOARCH=386
else
- is_x86_64=yes
GOARCH=amd64
fi
;;
- arm*-*-* | strongarm*-*-* | ep9312*-*-* | xscale-*-*)
- is_arm=yes
- GOARCH=arm
+ m68k*-*-*)
+ is_m68k=yes
+ GOARCH=m68k
+ ;;
+ mips*-*-*)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef __mips64
+#error 64-bit
+#endif
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ is_mips=yes
+else
+ is_mips64=yes
+fi
+rm -f conftest.err conftest.$ac_ext
+ if test "$is_mips" = "yes"; then
+ GOARCH=mips
+ else
+ GOARCH=mips64
+ fi
+ ;;
+ rs6000*-*-* | powerpc*-*-*)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef _ARCH_PPC64
+#error 64-bit
+#endif
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ is_ppc=yes
+else
+ is_ppc64=yes
+fi
+rm -f conftest.err conftest.$ac_ext
+ if test "$is_ppc" = "yes"; then
+ GOARCH=ppc
+ else
+ GOARCH=ppc64
+ fi
;;
sparc*-*-*)
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -13298,10 +13357,8 @@ else
fi
rm -f conftest.err conftest.$ac_ext
if test "$is_sparc" = "yes"; then
- is_sparc=yes
GOARCH=sparc
else
- is_sparc64=yes
GOARCH=sparc64
fi
;;
@@ -13322,6 +13379,46 @@ else
LIBGO_IS_ARM_FALSE=
fi
+ if test $is_m68k = yes; then
+ LIBGO_IS_M68K_TRUE=
+ LIBGO_IS_M68K_FALSE='#'
+else
+ LIBGO_IS_M68K_TRUE='#'
+ LIBGO_IS_M68K_FALSE=
+fi
+
+ if test $is_mips = yes; then
+ LIBGO_IS_MIPS_TRUE=
+ LIBGO_IS_MIPS_FALSE='#'
+else
+ LIBGO_IS_MIPS_TRUE='#'
+ LIBGO_IS_MIPS_FALSE=
+fi
+
+ if test $is_mips64 = yes; then
+ LIBGO_IS_MIPS64_TRUE=
+ LIBGO_IS_MIPS64_FALSE='#'
+else
+ LIBGO_IS_MIPS64_TRUE='#'
+ LIBGO_IS_MIPS64_FALSE=
+fi
+
+ if test $is_ppc = yes; then
+ LIBGO_IS_PPC_TRUE=
+ LIBGO_IS_PPC_FALSE='#'
+else
+ LIBGO_IS_PPC_TRUE='#'
+ LIBGO_IS_PPC_FALSE=
+fi
+
+ if test $is_ppc64 = yes; then
+ LIBGO_IS_PPC64_TRUE=
+ LIBGO_IS_PPC64_FALSE='#'
+else
+ LIBGO_IS_PPC64_TRUE='#'
+ LIBGO_IS_PPC64_FALSE=
+fi
+
if test $is_sparc = yes; then
LIBGO_IS_SPARC_TRUE=
LIBGO_IS_SPARC_FALSE='#'
@@ -13348,6 +13445,18 @@ fi
+GO_SYSCALLS_SYSCALL_OS_ARCH_FILE=
+if test -f ${srcdir}/syscalls/syscall_${GOOS}_${GOARCH}.go; then
+ GO_SYSCALLS_SYSCALL_OS_ARCH_FILE=syscalls/syscall_${GOOS}_${GOARCH}.go
+fi
+
+
+GO_DEBUG_PROC_REGS_OS_ARCH_FILE=
+if test -f ${srcdir}/go/debug/proc/regs_${GOOS}_${GOARCH}.go; then
+ GO_DEBUG_PROC_REGS_OS_ARCH_FILE=go/debug/proc/regs_${GOOS}_${GOARCH}.go
+fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsplit-stack is supported" >&5
$as_echo_n "checking whether -fsplit-stack is supported... " >&6; }
if test "${libgo_cv_c_split_stack_supported+set}" = set; then :
@@ -14263,6 +14372,26 @@ 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_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
+fi
+if test -z "${LIBGO_IS_MIPS_TRUE}" && test -z "${LIBGO_IS_MIPS_FALSE}"; then
+ as_fn_error "conditional \"LIBGO_IS_MIPS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${LIBGO_IS_MIPS64_TRUE}" && test -z "${LIBGO_IS_MIPS64_FALSE}"; then
+ as_fn_error "conditional \"LIBGO_IS_MIPS64\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${LIBGO_IS_PPC_TRUE}" && test -z "${LIBGO_IS_PPC_FALSE}"; then
+ as_fn_error "conditional \"LIBGO_IS_PPC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+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_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
diff --git a/libgo/configure.ac b/libgo/configure.ac
index 3d272ec..e1c0dd0 100644
--- a/libgo/configure.ac
+++ b/libgo/configure.ac
@@ -135,11 +135,20 @@ AC_SUBST(GOOS)
dnl N.B. Keep in sync with gcc/testsuite/go.test/go-test.exp (go-set-goarch).
is_386=no
is_arm=no
+is_m68k=no
+is_mips=no
+is_mips64=no
+is_ppc=no
+is_ppc64=no
is_sparc=no
is_sparc64=no
is_x86_64=no
GOARCH=unknown
case ${host} in
+ arm*-*-* | strongarm*-*-* | ep9312*-*-* | xscale-*-*)
+ is_arm=yes
+ GOARCH=arm
+ ;;
changequote(,)dnl
i[34567]86-*-* | x86_64-*-*)
changequote([,])dnl
@@ -149,16 +158,38 @@ changequote([,])dnl
#endif],
[is_386=yes], [is_x86_64=yes])
if test "$is_386" = "yes"; then
- is_386=yes
GOARCH=386
else
- is_x86_64=yes
GOARCH=amd64
fi
;;
- arm*-*-* | strongarm*-*-* | ep9312*-*-* | xscale-*-*)
- is_arm=yes
- GOARCH=arm
+ m68k*-*-*)
+ is_m68k=yes
+ GOARCH=m68k
+ ;;
+ mips*-*-*)
+ AC_PREPROC_IFELSE([
+#ifdef __mips64
+#error 64-bit
+#endif],
+[is_mips=yes], [is_mips64=yes])
+ if test "$is_mips" = "yes"; then
+ GOARCH=mips
+ else
+ GOARCH=mips64
+ fi
+ ;;
+ rs6000*-*-* | powerpc*-*-*)
+ AC_PREPROC_IFELSE([
+#ifdef _ARCH_PPC64
+#error 64-bit
+#endif],
+[is_ppc=yes], [is_ppc64=yes])
+ if test "$is_ppc" = "yes"; then
+ GOARCH=ppc
+ else
+ GOARCH=ppc64
+ fi
;;
sparc*-*-*)
AC_PREPROC_IFELSE([
@@ -167,21 +198,37 @@ changequote([,])dnl
#endif],
[is_sparc=yes], [is_sparc64=yes])
if test "$is_sparc" = "yes"; then
- is_sparc=yes
GOARCH=sparc
else
- is_sparc64=yes
GOARCH=sparc64
fi
;;
esac
AM_CONDITIONAL(LIBGO_IS_386, test $is_386 = yes)
AM_CONDITIONAL(LIBGO_IS_ARM, test $is_arm = yes)
+AM_CONDITIONAL(LIBGO_IS_M68K, test $is_m68k = yes)
+AM_CONDITIONAL(LIBGO_IS_MIPS, test $is_mips = yes)
+AM_CONDITIONAL(LIBGO_IS_MIPS64, test $is_mips64 = yes)
+AM_CONDITIONAL(LIBGO_IS_PPC, test $is_ppc = yes)
+AM_CONDITIONAL(LIBGO_IS_PPC64, test $is_ppc64 = 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)
AC_SUBST(GOARCH)
+dnl Some files are only present when needed for specific architectures.
+GO_SYSCALLS_SYSCALL_OS_ARCH_FILE=
+if test -f ${srcdir}/syscalls/syscall_${GOOS}_${GOARCH}.go; then
+ GO_SYSCALLS_SYSCALL_OS_ARCH_FILE=syscalls/syscall_${GOOS}_${GOARCH}.go
+fi
+AC_SUBST(GO_SYSCALLS_SYSCALL_OS_ARCH_FILE)
+
+GO_DEBUG_PROC_REGS_OS_ARCH_FILE=
+if test -f ${srcdir}/go/debug/proc/regs_${GOOS}_${GOARCH}.go; then
+ GO_DEBUG_PROC_REGS_OS_ARCH_FILE=go/debug/proc/regs_${GOOS}_${GOARCH}.go
+fi
+AC_SUBST(GO_DEBUG_PROC_REGS_OS_ARCH_FILE)
+
dnl Use -fsplit-stack when compiling C code if available.
AC_CACHE_CHECK([whether -fsplit-stack is supported],
[libgo_cv_c_split_stack_supported],
diff --git a/libgo/go/debug/proc/regs_rtems_386.go b/libgo/go/debug/proc/regs_rtems_386.go
deleted file mode 100644
index 3fc3e51..0000000
--- a/libgo/go/debug/proc/regs_rtems_386.go
+++ /dev/null
@@ -1,5 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package proc
diff --git a/libgo/go/debug/proc/regs_rtems_amd64.go b/libgo/go/debug/proc/regs_rtems_amd64.go
deleted file mode 100644
index 3fc3e51..0000000
--- a/libgo/go/debug/proc/regs_rtems_amd64.go
+++ /dev/null
@@ -1,5 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package proc
diff --git a/libgo/go/debug/proc/regs_solaris_386.go b/libgo/go/debug/proc/regs_solaris_386.go
deleted file mode 100644
index 3fc3e51..0000000
--- a/libgo/go/debug/proc/regs_solaris_386.go
+++ /dev/null
@@ -1,5 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package proc
diff --git a/libgo/go/debug/proc/regs_solaris_amd64.go b/libgo/go/debug/proc/regs_solaris_amd64.go
deleted file mode 100644
index 3fc3e51..0000000
--- a/libgo/go/debug/proc/regs_solaris_amd64.go
+++ /dev/null
@@ -1,5 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package proc
diff --git a/libgo/go/debug/proc/regs_solaris_sparc.go b/libgo/go/debug/proc/regs_solaris_sparc.go
deleted file mode 100644
index 3fc3e51..0000000
--- a/libgo/go/debug/proc/regs_solaris_sparc.go
+++ /dev/null
@@ -1,5 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package proc
diff --git a/libgo/go/debug/proc/regs_solaris_sparc64.go b/libgo/go/debug/proc/regs_solaris_sparc64.go
deleted file mode 100644
index 3fc3e51..0000000
--- a/libgo/go/debug/proc/regs_solaris_sparc64.go
+++ /dev/null
@@ -1,5 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package proc
diff --git a/libgo/syscalls/syscall_rtems_386.go b/libgo/syscalls/syscall_rtems_386.go
deleted file mode 100644
index a09c5ac..0000000
--- a/libgo/syscalls/syscall_rtems_386.go
+++ /dev/null
@@ -1,7 +0,0 @@
-// syscall_rtems_386.go -- RTEMS 386 specific syscall interface.
-
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
diff --git a/libgo/syscalls/syscall_rtems_amd64.go b/libgo/syscalls/syscall_rtems_amd64.go
deleted file mode 100644
index 941ea23..0000000
--- a/libgo/syscalls/syscall_rtems_amd64.go
+++ /dev/null
@@ -1,7 +0,0 @@
-// syscall_rtems_amd64.go -- RTEMS AMD64 specific syscall interface.
-
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
diff --git a/libgo/syscalls/syscall_rtems_sparc.go b/libgo/syscalls/syscall_rtems_sparc.go
deleted file mode 100644
index 6f79aeb..0000000
--- a/libgo/syscalls/syscall_rtems_sparc.go
+++ /dev/null
@@ -1,7 +0,0 @@
-// syscall_rtems_sparc.go -- RTEMS SPARC specific syscall interface.
-
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package syscall
diff --git a/libgo/testsuite/Makefile.in b/libgo/testsuite/Makefile.in
index 9610691..795a3dd 100644
--- a/libgo/testsuite/Makefile.in
+++ b/libgo/testsuite/Makefile.in
@@ -85,6 +85,8 @@ GOARCH = @GOARCH@
GOC = @GOC@
GOCFLAGS = @GOCFLAGS@
GOOS = @GOOS@
+GO_DEBUG_PROC_REGS_OS_ARCH_FILE = @GO_DEBUG_PROC_REGS_OS_ARCH_FILE@
+GO_SYSCALLS_SYSCALL_OS_ARCH_FILE = @GO_SYSCALLS_SYSCALL_OS_ARCH_FILE@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@