linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Corrected to handle kernels with changed ucontext.

* config/rs6000/linux64.h (MD_FALLBACK_FRAME_STATE_FOR)
	[!__powerpc64__]: Corrected to handle kernels with changed ucontext.

	* include/powerpc-signal.h: Add #ifndef __powerpc64__ around the
	header.  For __powerpc64__ provide the default-signal.h definitions
	for now.
	* include/x86_64-signal.h [!__x86_64__]: Include java-signal-aux.h
	instead of the dummy definitions.
	* configure.host (x86_64-*): Remove CHECKREFSPEC, add DIVIDESPEC.
	(powerpc64*-*): Remove with_libffi_default.
	Only add -mminimal-toc for 64-bit compilations.
	* configure.in: Use powerpc-signal.h on powerpc64 as well.
	(x86_64-*-linux*): Set SIGNAL_HANDLER_AUX.
	Link SIGNAL_HANDLER_AUX to include/java-signal-aux.h.
	* configure: Rebuilt.

From-SVN: r76437
This commit is contained in:
Jakub Jelinek
2004-01-23 18:32:16 +01:00
committed by Jakub Jelinek
parent 0a944ef648
commit 02731d29be
8 changed files with 89 additions and 39 deletions
+20 -10
View File
@@ -13,13 +13,15 @@ details. */
#ifndef JAVA_SIGNAL_H
# define JAVA_SIGNAL_H 1
# include <signal.h>
# include <sys/syscall.h>
# ifndef __powerpc64__
# define HANDLE_SEGV 1
# undef HANDLE_FPE
# include <signal.h>
# include <sys/syscall.h>
# define SIGNAL_HANDLER(_name) \
# define HANDLE_SEGV 1
# undef HANDLE_FPE
# define SIGNAL_HANDLER(_name) \
static void _name (int /* _signal */, struct sigcontext *_sc)
/* PPC either leaves PC pointing at a faulting instruction or the
@@ -27,7 +29,7 @@ details. */
the former, so we adjust the saved PC to point to the following
instruction. This is what the handler in libgcc expects. */
# define MAKE_THROW_FRAME(_exception) \
# define MAKE_THROW_FRAME(_exception) \
do \
{ \
_sc->regs->nip += 4; \
@@ -58,7 +60,7 @@ struct kernel_old_sigaction {
void (*k_sa_restorer) (void);
};
# define INIT_SEGV \
# define INIT_SEGV \
do \
{ \
struct kernel_old_sigaction kact; \
@@ -69,7 +71,7 @@ do \
} \
while (0)
# define INIT_FPE \
# define INIT_FPE \
do \
{ \
struct kernel_old_sigaction kact; \
@@ -78,7 +80,15 @@ do \
kact.k_sa_flags = 0; \
syscall (SYS_sigaction, SIGFPE, &kact, NULL); \
} \
while (0)
while (0)
# else
# undef HANDLE_SEGV
# undef HANDLE_FPE
# define INIT_SEGV do {} while (0)
# define INIT_FPE do {} while (0)
# endif
#endif /* JAVA_SIGNAL_H */
+7 -10
View File
@@ -10,14 +10,14 @@ Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
details. */
#ifdef __x86_64__
#ifndef JAVA_SIGNAL_H
#define JAVA_SIGNAL_H 1
#include <signal.h>
#include <sys/syscall.h>
#ifdef __x86_64__
#define HANDLE_SEGV 1
#define SIGNAL_HANDLER(_name) \
@@ -80,16 +80,13 @@ while (0)
* go away if all systems ever have pthreads libraries that are
* compiled with unwind info. */
#endif /* JAVA_SIGNAL_H */
#else /* __x86_64__ */
/* This is for the 32-bit subsystem on on x86-64. Catching signals
doesn't yet work on that target. */
/* This is for the 32-bit subsystem on on x86-64. */
#undef HANDLE_SEGV
#undef HANDLE_FPE
#define INIT_SEGV do {} while (0)
#define INIT_FPE do {} while (0)
#define sigcontext_struct sigcontext
#include <java-signal-aux.h>
#endif /* __x86_64__ */
#endif /* JAVA_SIGNAL_H */