powerpc-*-linux*)
SIGNAL_HANDLER=include/dwarf2-signal.h
;;
+ alpha*-*-linux*)
+ SIGNAL_HANDLER=include/dwarf2-signal.h
+ ;;
*)
SIGNAL_HANDLER=include/default-signal.h
;;
esac
# If we're using sjlj exceptions, forget what we just learned.
-if test "$libgcj_sjlj" = yes; then
+if test "$enable_sjlj_exceptions" = yes; then
SIGNAL_HANDLER=include/default-signal.h
fi
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:5900: checking for X" >&5
+echo "configure:5903: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 5962 "configure"
+#line 5965 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6036 "configure"
+#line 6039 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:6043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
case "`(uname -sr) 2>/dev/null`" in
"SunOS 5"*)
echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:6149: checking whether -R must be followed by a space" >&5
+echo "configure:6152: checking whether -R must be followed by a space" >&5
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 6152 "configure"
+#line 6155 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:6159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_nospace=yes
else
else
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 6175 "configure"
+#line 6178 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:6182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_space=yes
else
# libraries were built with DECnet support. And karl@cs.umb.edu says
# the Alpha needs dnet_stub (dnet does not exist).
echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:6214: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:6217: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldnet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6222 "configure"
+#line 6225 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:6233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:6255: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:6258: checking for dnet_ntoa in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6263 "configure"
+#line 6266 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:6274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# The nsl library prevents programs from opening the X display
# on Irix 5.2, according to dickey@clark.net.
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:6303: checking for gethostbyname" >&5
+echo "configure:6306: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6308 "configure"
+#line 6311 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
; return 0; }
EOF
-if { (eval echo configure:6331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
if test $ac_cv_func_gethostbyname = no; then
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:6352: checking for gethostbyname in -lnsl" >&5
+echo "configure:6355: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6360 "configure"
+#line 6363 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:6371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# -lsocket must be given before -lnsl if both are needed.
# We assume that if connect needs -lnsl, so does gethostbyname.
echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:6401: checking for connect" >&5
+echo "configure:6404: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6406 "configure"
+#line 6409 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
; return 0; }
EOF
-if { (eval echo configure:6429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
if test $ac_cv_func_connect = no; then
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:6450: checking for connect in -lsocket" >&5
+echo "configure:6453: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6458 "configure"
+#line 6461 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
connect()
; return 0; }
EOF
-if { (eval echo configure:6469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:6493: checking for remove" >&5
+echo "configure:6496: checking for remove" >&5
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6498 "configure"
+#line 6501 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove(); below. */
; return 0; }
EOF
-if { (eval echo configure:6521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_remove=yes"
else
if test $ac_cv_func_remove = no; then
echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:6542: checking for remove in -lposix" >&5
+echo "configure:6545: checking for remove in -lposix" >&5
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lposix $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6550 "configure"
+#line 6553 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
remove()
; return 0; }
EOF
-if { (eval echo configure:6561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:6585: checking for shmat" >&5
+echo "configure:6588: checking for shmat" >&5
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 6590 "configure"
+#line 6593 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat(); below. */
; return 0; }
EOF
-if { (eval echo configure:6613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_shmat=yes"
else
if test $ac_cv_func_shmat = no; then
echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:6634: checking for shmat in -lipc" >&5
+echo "configure:6637: checking for shmat in -lipc" >&5
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lipc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6642 "configure"
+#line 6645 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
shmat()
; return 0; }
EOF
-if { (eval echo configure:6653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# libraries we check for below, so use a different variable.
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:6686: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:6689: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6694 "configure"
+#line 6697 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
IceConnectionNumber()
; return 0; }
EOF
-if { (eval echo configure:6705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
This file is part of libgcj.
- Use this file for every target for which the dwarf2 unwinder in
- libgcc can unwind through signal handlers and no special actions
- are needed.
+ Use this file for a target for which the dwarf2 unwinder in libgcc
+ can unwind through signal handlers.
This software is copyrighted work licensed under the terms of the
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
#undef HANDLE_FPE
#define SIGNAL_HANDLER(_name) \
-static void _Jv_##_name (int)
+static void _Jv_##_name (int, siginfo_t *, void *_p)
class java::lang::Throwable;
// Unwind the stack to the point at which the signal was generated and
-// then throw an exception. With the dwarf2 unwinder we don't need to
-// do anything.
-
+// then throw an exception. With the dwarf2 unwinder we don't usually
+// need to do anything, with some minor exceptions.
+
+#ifdef __alpha__
+#define MAKE_THROW_FRAME(_exception) \
+do \
+{ \
+ /* Alpha either leaves PC pointing at a faulting instruction or the \
+ following instruction, depending on the signal. SEGV always does \
+ the former, so we adjust the saved PC to point to the following \
+ instruction; this is what the handler in libgcc expects. */ \
+ struct sigcontext *_sc = (struct sigcontext *)_p; \
+ _sc->sc_pc += 4; \
+} \
+while (0)
+#else
#define MAKE_THROW_FRAME(_exception) \
do \
{ \
+ (void)_p; \
} \
while (0)
-
+#endif
#define INIT_SEGV \
do \
{ \
nullp = new java::lang::NullPointerException (); \
struct sigaction act; \
- act.sa_handler = _Jv_catch_segv; \
+ act.sa_sigaction = _Jv_catch_segv; \
sigemptyset (&act.sa_mask); \
- act.sa_flags = 0; \
+ act.sa_flags = SA_SIGINFO; \
syscall (SYS_sigaction, SIGSEGV, &act, NULL); \
} \
while (0)
arithexception = new java::lang::ArithmeticException \
(JvNewStringLatin1 ("/ by zero")); \
struct sigaction act; \
- act.sa_handler = _Jv_catch_fpe; \
+ act.sa_sigaction = _Jv_catch_fpe; \
sigemptyset (&act.sa_mask); \
- act.sa_flags = 0; \
+ act.sa_flags = SA_SIGINFO; \
syscall (SYS_sigaction, SIGFPE, &act, NULL); \
} \
while (0)
+++ /dev/null
-// ppc-signal.h - Catch runtime signals and turn them into exceptions.
-
-/* Copyright (C) 2000 Free Software Foundation
-
- This file is part of libgcj.
-
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-details. */
-
-#ifndef JAVA_SIGNAL_H
-#define JAVA_SIGNAL_H 1
-
-#include <signal.h>
-#include <ucontext.h>
-
-#define HANDLE_SEGV 1
-#undef HANDLE_FPE
-
-#define SIGNAL_HANDLER(_name) \
-__asm ("\t.section\t\".text\"\n" \
- "\t.align 2\n" \
- "_Jv_" #_name ":\n" \
- "\tmr 3, 1\n" \
- "\tb _Jv_stub_" #_name "\n"); \
-extern "C" void _Jv_##_name (int _dummy); \
-extern "C" void _Jv_stub_##_name (char *_sp) \
-
-class java::lang::Throwable;
-
-// Unwind the stack to the point at which the signal was generated and
-// then throw an exception.
-
-#define MAKE_THROW_FRAME(_exception) \
-do \
-{ \
- struct sigcontext_struct *_context \
- = (struct sigcontext_struct *)(_sp + __SIGNAL_FRAMESIZE); \
- long int regs [34]; \
- memcpy (regs, &_context->regs->gpr[0], 32 * sizeof (long int)); \
- regs[32] = _context->regs->nip + sizeof (long int); \
- regs[33] = _context->regs->link; \
- \
- __asm volatile ( \
- "\tmr 31,%0\n" \
- "\tmr 3,%1 # exception to throw\n" \
- "\tlwz 0,128(31) # ip\n" \
- "\tmtlr 0\n" \
- "\tlwz 1,4(31) # previous r1\n" \
- "\tlwz 0,132(31) # previous lr\n" \
- "\tlwz 2,0(1) # previous previous r1\n" \
- "\tstw 0,4(2) # save previous lr\n" \
- "\tlwz 0,0(31)\n" \
- "\tlwz 2,8(31)\n" \
- "\tlwz 4,16(31)\n" \
- "\tlwz 5,20(31)\n" \
- "\tlwz 6,24(31)\n" \
- "\tlwz 7,28(31)\n" \
- "\tlwz 8,32(31)\n" \
- "\tlwz 9,36(31)\n" \
- "\tlwz 10,40(31)\n" \
- "\tlwz 11,44(31)\n" \
- "\tlwz 12,48(31)\n" \
- "\tlwz 13,52(31)\n" \
- "\tlwz 14,56(31)\n" \
- "\tlwz 15,60(31)\n" \
- "\tlwz 16,64(31)\n" \
- "\tlwz 17,68(31)\n" \
- "\tlwz 18,72(31)\n" \
- "\tlwz 19,76(31)\n" \
- "\tlwz 20,80(31)\n" \
- "\tlwz 21,84(31)\n" \
- "\tlwz 22,88(31)\n" \
- "\tlwz 23,92(31)\n" \
- "\tlwz 24,96(31)\n" \
- "\tlwz 25,100(31)\n" \
- "\tlwz 26,104(31)\n" \
- "\tlwz 27,108(31)\n" \
- "\tlwz 28,112(31)\n" \
- "\tlwz 29,116(31)\n" \
- "\tlwz 30,120(31)\n" \
- "\tlwz 31,124(31)\n" \
- "\tb _Jv_ThrowSignal\n" \
- : : "r"(regs), "r"(_exception) \
- : "r31", "r3"); \
-} \
-while (0)
-
-
-#define INIT_SEGV \
-do \
- { \
- nullp = new java::lang::NullPointerException (); \
- struct sigaction act; \
- act.sa_handler = _Jv_catch_segv; \
- sigemptyset (&act.sa_mask); \
- act.sa_flags = 0; \
- __sigaction (SIGSEGV, &act, NULL); \
- } \
-while (0)
-
-#define INIT_FPE \
-do \
- { \
- arithexception = new java::lang::ArithmeticException \
- (JvNewStringLatin1 ("/ by zero")); \
- struct sigaction act; \
- act.sa_handler = _Jv_catch_fpe; \
- sigemptyset (&act.sa_mask); \
- act.sa_flags = 0; \
- __sigaction (SIGFPE, &act, NULL); \
- } \
-while (0)
-
-#endif /* JAVA_SIGNAL_H */