#!/bin/sh
-# $Id: configure,v 1.18 2007/06/06 19:42:38 cph Exp $
+# $Id: configure,v 1.19 2007/09/04 03:35:19 riastradh Exp $
#
# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
fi
for FN in ${LINKS}; do
- if [ ! -e ${FN} ]; then
+ if [ ! -f "${FN}" ]; then
CMD="ln -s machine/${FN} ."
echo "${CMD}"; eval "${CMD}"
fi
#!/bin/sh
#
-# $Id: Setup.sh,v 1.14 2007/05/14 16:50:47 cph Exp $
+# $Id: Setup.sh,v 1.15 2007/09/04 03:35:19 riastradh Exp $
#
# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
maybe_link ${FN} ../etc/${FN}
done
-if [ -e ed-ffi.scm ]; then
+if [ -f ed-ffi.scm ]; then
maybe_link .edwin-ffi ed-ffi.scm
fi
#!/bin/sh
#
-# $Id: functions.sh,v 1.9 2007/06/15 03:40:17 cph Exp $
+# $Id: functions.sh,v 1.10 2007/09/04 03:35:19 riastradh Exp $
#
# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
maybe_mkdir ()
{
- if [ ! -e "${1}" ]; then
+ if [ ! -d "${1}" ]; then
run_cmd mkdir "${1}"
fi
}
maybe_link ()
{
- if [ ! -e "${1}" ] && [ ! -L "${1}" ]; then
+ if [ ! -f "${1}" ] && [ ! -L "${1}" ]; then
run_cmd ln -s "${2}" "${1}"
fi
}
(
cd `dirname "${1}"`
BN=`basename "${1}"`
- [ -L "${BN}" ] && [ "${BN}" -ef "${2}" ]
+ # What a wretched hack this is! I can find no standard way to
+ # compare two pathnames for identity of the file they name. There
+ # is a non-standard `-ef' option to `test', `test f1 -ef f2', but
+ # Solaris does not support this option. Ugh! --TRC
+ [ -L "${BN}" ] && [ -f "${2}" ] && \
+ (ls -l "${BN}" | grep -- " -> ${2}\$" >/dev/null)
)
}
#!/bin/sh
#
-# $Id: install-bin-symlinks.sh,v 1.2 2007/06/15 03:40:18 cph Exp $
+# $Id: install-bin-symlinks.sh,v 1.3 2007/09/04 03:35:19 riastradh Exp $
#
# Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
# 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
exit 1
fi
-if [ "${EXE}" != mit-scheme ] && [ ! -e "${DIR}/mit-scheme" ]; then
+if [ "${EXE}" != mit-scheme ] && [ ! -f "${DIR}/mit-scheme" ]; then
run_cmd rm -f "${DIR}"/mit-scheme
run_cmd ln -s "${EXE}" "${DIR}"/mit-scheme
fi
dnl Process this file with autoconf to produce a configure script.
AC_INIT([MIT/GNU Scheme microcode], [15.1], [bug-mit-scheme@gnu.org], [mit-scheme])
-AC_REVISION([$Id: configure.ac,v 1.55 2007/08/24 13:19:24 riastradh Exp $])
+AC_REVISION([$Id: configure.ac,v 1.56 2007/09/04 03:35:19 riastradh Exp $])
AC_CONFIG_SRCDIR([boot.c])
AC_CONFIG_HEADERS([config.h])
AC_PROG_MAKE_SET
EXE_NAME=mit-scheme-native
INSTALL_INCLUDE=
+AC_CANONICAL_HOST
+
dnl Checks for programs.
AC_PROG_CC
AC_C_BACKSLASH_A
fi
CCLD=${CC}
+dnl Add OS-dependent customizations. This must happen before checking
+dnl any headers or library routines, because it may add CFLAGS or
+dnl LDFLAGS that the subsequent checks require.
+
+DO_GCC_TESTS=no
+GNU_LD=no
+case ${host_os} in
+linux-gnu)
+ DO_GCC_TESTS=yes
+ GNU_LD=yes
+ ;;
+freebsd*)
+ M4_FLAGS="${M4_FLAGS} -P SUPPRESS_LEADING_UNDERSCORE,1"
+ DO_GCC_TESTS=yes
+ GNU_LD=yes
+ ;;
+dragonfly*)
+ M4_FLAGS="${M4_FLAGS} -P SUPPRESS_LEADING_UNDERSCORE,1"
+ DO_GCC_TESTS=yes
+ GNU_LD=yes
+ ;;
+darwin*)
+ SCHEME_LDFLAGS="${SCHEME_LDFLAGS} -Wl,-pagezero_size,04000000"
+ MODULE_LDFLAGS="${MODULE_LDFLAGS} -bundle -flat_namespace -undefined suppress"
+ ;;
+netbsd*)
+ DO_GCC_TESTS=yes
+ GNU_LD=yes
+ dnl NetBSD, by default, has programs find non-base libraries via RPATH
+ if test "x${x_libraries}" != x; then
+ FOO=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
+ LDFLAGS="${LDFLAGS} ${FOO}"
+ fi
+ ;;
+openbsd*)
+ M4_FLAGS="${M4_FLAGS} -P SUPPRESS_LEADING_UNDERSCORE,1"
+ DO_GCC_TESTS=yes
+ GNU_LD=yes
+ ;;
+solaris*)
+ # How do we tell whether we're using GNU ld or Solaris ld?
+ if test ${GCC} = yes; then
+ DO_GCC_TESTS=yes
+ M4_FLAGS="${M4_FLAGS} -P SUPPRESS_LEADING_UNDERSCORE,1"
+ fi
+ LDFLAGS="${LDFLAGS} -lsocket -lnsl"
+ ;;
+esac
+
+if test "${DO_GCC_TESTS}" = yes; then
+ if test "x${STATIC_LIBS}" != x; then
+ STATIC_PREFIX="-Xlinker -Bstatic"
+ STATIC_SUFFIX="-Xlinker -Bdynamic"
+ fi
+ if test "${GNU_LD}" = yes; then
+ SCHEME_LDFLAGS="${SCHEME_LDFLAGS} -export-dynamic"
+ fi
+ MODULE_CFLAGS="${MODULE_CFLAGS} -fPIC"
+ MODULE_LDFLAGS="${MODULE_LDFLAGS} -shared -fPIC"
+ AC_MSG_CHECKING([for ELF binaries])
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[]],
+ [[
+ #ifdef __ELF__
+ return 0;
+ #endif
+ return 1;
+ ]]
+ )],
+ [
+ AC_MSG_RESULT([yes])
+ M4_FLAGS="${M4_FLAGS} -P SUPPRESS_LEADING_UNDERSCORE,1"
+ ],
+ [AC_MSG_RESULT([no])])
+fi
+
dnl Checks for libraries.
AC_CHECK_LIB([m], [exp])
fi
dnl Checks for system characteristics.
-AC_CANONICAL_HOST
AC_PATH_X
AC_SYS_LARGEFILE
AC_SYS_LONG_FILE_NAMES
OPTIONAL_BASES="${OPTIONAL_BASES} x11base x11term x11graph x11color"
fi
-dnl Add OS-dependent customizations.
-DO_GCC_TESTS=no
-case ${host_os} in
-linux-gnu)
- DO_GCC_TESTS=yes
- ;;
-freebsd*)
- M4_FLAGS="${M4_FLAGS} -P SUPPRESS_LEADING_UNDERSCORE,1"
- DO_GCC_TESTS=yes
- ;;
-dragonfly*)
- M4_FLAGS="${M4_FLAGS} -P SUPPRESS_LEADING_UNDERSCORE,1"
- DO_GCC_TESTS=yes
- ;;
-darwin*)
- SCHEME_LDFLAGS="${SCHEME_LDFLAGS} -Wl,-pagezero_size,04000000"
- MODULE_LDFLAGS="${MODULE_LDFLAGS} -bundle -flat_namespace -undefined suppress"
- ;;
-netbsd*)
- DO_GCC_TESTS=yes
- dnl NetBSD, by default, has programs find non-base libraries via RPATH
- if test "x${x_libraries}" != x; then
- FOO=-Wl,-rpath,`echo ${x_libraries} | sed -e "s/:/ -Wl,-rpath,/g"`
- LDFLAGS="${LDFLAGS} ${FOO}"
- fi
- ;;
-openbsd*)
- M4_FLAGS="${M4_FLAGS} -P SUPPRESS_LEADING_UNDERSCORE,1"
- DO_GCC_TESTS=yes
- ;;
-solaris*)
- if test ${GCC} = yes; then
- DO_GCC_TESTS=yes
- M4_FLAGS="${M4_FLAGS} -P SUPPRESS_LEADING_UNDERSCORE,1"
- fi
- ;;
-esac
-
-if test ${DO_GCC_TESTS} = yes; then
- if test "x${STATIC_LIBS}" != x; then
- STATIC_PREFIX="-Xlinker -Bstatic"
- STATIC_SUFFIX="-Xlinker -Bdynamic"
- fi
- SCHEME_LDFLAGS="${SCHEME_LDFLAGS} -export-dynamic"
- MODULE_CFLAGS="${MODULE_CFLAGS} -fPIC"
- MODULE_LDFLAGS="${MODULE_LDFLAGS} -shared -fPIC"
- AC_MSG_CHECKING([for ELF binaries])
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[]],
- [[
- #ifdef __ELF__
- return 0;
- #endif
- return 1;
- ]]
- )],
- [
- AC_MSG_RESULT([yes])
- M4_FLAGS="${M4_FLAGS} -P SUPPRESS_LEADING_UNDERSCORE,1"
- ],
- [AC_MSG_RESULT([no])])
-fi
-
AC_MSG_CHECKING([for native-code support])
OPTIONAL_BASES="${OPTIONAL_BASES} cmpint cmpintmd comutl"
GC_HEAD_FILES="gccode.h cmpgc.h cmpintmd-config.h cmpintmd.h"
/* -*-C-*-
-$Id: confshared.h,v 11.12 2007/04/22 16:31:22 cph Exp $
+$Id: confshared.h,v 11.13 2007/09/04 03:35:19 riastradh Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
# endif
#endif
-#if HAVE_STDBOOL_H
+#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#else
# if !HAVE__BOOL
#endif /* hp9000s500 */
\f
-#ifdef sparc
+#ifdef __sparc
# define MACHINE_TYPE "sun4"
# define CURRENT_FASL_ARCH FASL_SPARC
# define FLOATING_ALIGNMENT 0x7
/* -*-C-*-
-$Id: unstackify.c,v 11.5 2007/04/22 16:31:23 cph Exp $
+$Id: unstackify.c,v 11.6 2007/09/04 03:35:19 riastradh Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
*/
+#include "config.h"
+
#include <stdlib.h>
-#include <stdbool.h>
#include <string.h>
+
#define LIARC_IN_MICROCODE
#include "liarc.h"
#include "stackops.h"
/* -*-C-*-
-$Id: ux.h,v 1.85 2007/08/24 13:19:24 riastradh Exp $
+$Id: ux.h,v 1.86 2007/09/04 03:35:19 riastradh Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
# define SYSTEM_VARIANT "Pixel"
#endif
+#if defined(__sparc) && defined(__svr4__)
+# define SYSTEM_VARIANT "Solaris"
+#endif
+
#if defined(_SUNOS) || defined(_SUNOS3) || defined(_SUNOS4)
# define SYSTEM_VARIANT "SunOS"
#endif
/* -*-C-*-
-$Id: uxtop.c,v 1.36 2007/04/22 16:31:23 cph Exp $
+$Id: uxtop.c,v 1.37 2007/09/04 03:35:20 riastradh Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
OS_Name = SYSTEM_NAME;
OS_Variant = SYSTEM_VARIANT;
#if defined(_SUNOS) || defined(_SUNOS3) || defined(_SUNOS4)
- vadvise (VA_ANOM); /* Anomolous paging, don't try to guess. */
+ vadvise (VA_ANOM); /* Anomalous paging, don't try to guess. */
#endif
}
/* -*-C-*-
-$Id: uxtrap.h,v 1.40 2007/08/24 13:19:24 riastradh Exp $
+$Id: uxtrap.h,v 1.41 2007/09/04 03:35:20 riastradh Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
#endif /* __alpha */
\f
+#ifdef __sparc
+
+#ifdef __svr4__
+/* SPARC Solaris */
+
+/* This is adapted from the MIPS SysV4 code above,
+ adjusted for the SPARC. */
+
+#include <siginfo.h>
+#include <ucontext.h>
+
+#define __SIGCONTEXT_REG(scp, ir) ((((scp) -> uc_mcontext) . gregs) [(ir)])
+
+/* SIGINFO_T, SIGINFO_VALID_P, SIGINFO_CODE, SIGINFO_ARG_T, and SIGCONTEXT_T
+ are all defined by the conditional for _POSIX_REALTIME_SIGNALS below. */
+
+#define HAVE_SIGCONTEXT
+#define SIGCONTEXT_NREGS NGREG
+#define SIGCONTEXT_FIRST_REG(scp) (& (__SIGCONTEXT_REG (scp, 0)))
+
+#define SIGCONTEXT_SP(scp) (__SIGCONTEXT_REG (scp, REG_SP))
+#define SIGCONTEXT_PC(scp) (__SIGCONTEXT_REG (scp, REG_PC))
+
+/* I don't think that either of these actually matters for liarc, which
+ is all that we support on the SPARC at the moment. */
+
+#define SIGCONTEXT_RFREE(scp) 0
+#define SIGCONTEXT_SCHSP(scp) 0
+
+#define INITIALIZE_UX_SIGNAL_CODES() \
+{ \
+ DECLARE_UX_SIGNAL_CODE \
+ (SIGFPE, (~ 0L), FPE_INTDIV, "integer divide by 0 trap"); \
+ DECLARE_UX_SIGNAL_CODE \
+ (SIGFPE, (~ 0L), FPE_INTOVF, "integer overflow trap"); \
+ DECLARE_UX_SIGNAL_CODE \
+ (SIGFPE, (~ 0L), FPE_FLTDIV, "floating-point divide by 0 trap"); \
+ DECLARE_UX_SIGNAL_CODE \
+ (SIGFPE, (~ 0L), FPE_FLTOVF, "floating-point overflow trap"); \
+ DECLARE_UX_SIGNAL_CODE \
+ (SIGFPE, (~ 0L), FPE_FLTUND, "floating-point underflow trap"); \
+ DECLARE_UX_SIGNAL_CODE \
+ (SIGFPE, (~ 0L), FPE_FLTRES, "floating-point inexact result"); \
+ DECLARE_UX_SIGNAL_CODE \
+ (SIGFPE, (~ 0L), FPE_FLTSUB, "subscript-range trap"); \
+ DECLARE_UX_SIGNAL_CODE \
+ (SIGFPE, (~ 0L), FPE_FLTINV, "invalid floating-point operation"); \
+ DECLARE_UX_SIGNAL_CODE \
+ (SIGILL, (~ 0L), ILL_ILLOPC, "illegal opcode trap"); \
+ DECLARE_UX_SIGNAL_CODE \
+ (SIGILL, (~ 0L), ILL_ILLOPN, "illegal operand trap"); \
+ DECLARE_UX_SIGNAL_CODE \
+ (SIGILL, (~ 0L), ILL_ILLADR, "illegal addressing mode trap"); \
+ DECLARE_UX_SIGNAL_CODE \
+ (SIGILL, (~ 0L), ILL_ILLTRP, "illegal trap"); \
+ DECLARE_UX_SIGNAL_CODE \
+ (SIGILL, (~ 0L), ILL_PRVOPC, "privileged opcode trap"); \
+ DECLARE_UX_SIGNAL_CODE \
+ (SIGILL, (~ 0L), ILL_PRVREG, "privileged register trap"); \
+ DECLARE_UX_SIGNAL_CODE \
+ (SIGILL, (~ 0L), ILL_COPROC, "co-processor trap"); \
+ DECLARE_UX_SIGNAL_CODE \
+ (SIGILL, (~ 0L), ILL_BADSTK, "bad stack trap"); \
+}
+
+/* Solaris's siginfo(3HEAD) man page lists many more signal codes, but
+ so does Linux's sigaction(2) man page, and this is the same list as
+ in the Linux section. Unless this is used for anything other than
+ documentative purposes during trap recovery, then I can't imagine
+ why these lists aren't populated more completely. */
+
+#endif /* __svr4__ */
+
+#endif /* __sparc */
+\f
#ifdef _POSIX_REALTIME_SIGNALS
# define SIGINFO_T siginfo_t *
# define SIGINFO_VALID_P(info) (1)