Recognize m68k, mips, PPC. Don't require arch syscall files to exist.

From-SVN: r169185
This commit is contained in:
Ian Lance Taylor 2011-01-24 23:42:22 +00:00
parent e8ba94fc1f
commit ca11cc98b9
14 changed files with 200 additions and 71 deletions

View File

@ -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

View File

@ -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

147
libgo/configure vendored
View File

@ -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

View File

@ -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],

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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@