2006-06-05 Shaun Jackman <sjackman@gmail.com>
configure.host (newlib_cflags) [arm, thumb, xscale]: Remove -DABORT_PROVIDED flag. * newlib/libc/sys/arm/syscalls.c (kill, exit): Sync with libgloss. * newlib/libc/sys/arm/libcfunc.c (abort): Ditto.
This commit is contained in:
parent
9a9ac027e8
commit
6ea486a6df
@ -1,3 +1,10 @@
|
|||||||
|
2006-06-05 Shaun Jackman <sjackman@gmail.com>
|
||||||
|
|
||||||
|
configure.host (newlib_cflags) [arm, thumb, xscale]: Remove
|
||||||
|
-DABORT_PROVIDED flag.
|
||||||
|
* newlib/libc/sys/arm/syscalls.c (kill, exit): Sync with libgloss.
|
||||||
|
* newlib/libc/sys/arm/libcfunc.c (abort): Ditto.
|
||||||
|
|
||||||
2006-06-05 Jeff Johnston <jjohnstn@redhat.com>
|
2006-06-05 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
* Makefile.am (AM_MAKEFLAGS): Pass CCASFLAGS.
|
* Makefile.am (AM_MAKEFLAGS): Pass CCASFLAGS.
|
||||||
|
@ -510,11 +510,11 @@ case "${host}" in
|
|||||||
;;
|
;;
|
||||||
arm-*-pe)
|
arm-*-pe)
|
||||||
syscall_dir=syscalls
|
syscall_dir=syscalls
|
||||||
newlib_cflags="${newlib_cflags} -DABORT_PROVIDED -DHAVE_GETTIMEOFDAY"
|
newlib_cflags="${newlib_cflags} -DHAVE_GETTIMEOFDAY"
|
||||||
;;
|
;;
|
||||||
arm-*-*)
|
arm-*-*)
|
||||||
syscall_dir=syscalls
|
syscall_dir=syscalls
|
||||||
newlib_cflags="${newlib_cflags} -DABORT_PROVIDED -DHAVE_GETTIMEOFDAY"
|
newlib_cflags="${newlib_cflags} -DHAVE_GETTIMEOFDAY"
|
||||||
# If newlib is supplying syscalls, select which debug protocol is being used.
|
# If newlib is supplying syscalls, select which debug protocol is being used.
|
||||||
# ARM_RDP_MONITOR selects the Demon monitor.
|
# ARM_RDP_MONITOR selects the Demon monitor.
|
||||||
# ARM_RDI_MONITOR selects the Angel monitor.
|
# ARM_RDI_MONITOR selects the Angel monitor.
|
||||||
@ -553,7 +553,7 @@ case "${host}" in
|
|||||||
;;
|
;;
|
||||||
ep9312-*-*)
|
ep9312-*-*)
|
||||||
syscall_dir=syscalls
|
syscall_dir=syscalls
|
||||||
newlib_cflags="${newlib_cflags} -DABORT_PROVIDED -DHAVE_GETTIMEOFDAY"
|
newlib_cflags="${newlib_cflags} -DHAVE_GETTIMEOFDAY"
|
||||||
if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
|
if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
|
||||||
newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
|
newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
|
||||||
fi
|
fi
|
||||||
@ -660,16 +660,16 @@ case "${host}" in
|
|||||||
;;
|
;;
|
||||||
strongarm-*-*)
|
strongarm-*-*)
|
||||||
syscall_dir=syscalls
|
syscall_dir=syscalls
|
||||||
newlib_cflags="${newlib_cflags} -DABORT_PROVIDED -DHAVE_GETTIMEOFDAY"
|
newlib_cflags="${newlib_cflags} -DHAVE_GETTIMEOFDAY"
|
||||||
;;
|
;;
|
||||||
thumb-*-pe)
|
thumb-*-pe)
|
||||||
syscall_dir=syscalls
|
syscall_dir=syscalls
|
||||||
newlib_cflags="${newlib_cflags} -DABORT_PROVIDED -DHAVE_GETTIMEOFDAY"
|
newlib_cflags="${newlib_cflags} -DHAVE_GETTIMEOFDAY"
|
||||||
# Don't use the debugging protocols just yet.
|
# Don't use the debugging protocols just yet.
|
||||||
;;
|
;;
|
||||||
thumb-*-*)
|
thumb-*-*)
|
||||||
syscall_dir=syscalls
|
syscall_dir=syscalls
|
||||||
newlib_cflags="${newlib_cflags} -DABORT_PROVIDED -DHAVE_GETTIMEOFDAY"
|
newlib_cflags="${newlib_cflags} -DHAVE_GETTIMEOFDAY"
|
||||||
# If newlib is supplying syscalls, select which debug protocol is being used.
|
# If newlib is supplying syscalls, select which debug protocol is being used.
|
||||||
# ARM_RDP_MONITOR selects the Demon monitor.
|
# ARM_RDP_MONITOR selects the Demon monitor.
|
||||||
# ARM_RDI_MONITOR selects the Angel monitor.
|
# ARM_RDI_MONITOR selects the Angel monitor.
|
||||||
@ -700,7 +700,7 @@ case "${host}" in
|
|||||||
;;
|
;;
|
||||||
xscale-*-*)
|
xscale-*-*)
|
||||||
syscall_dir=syscalls
|
syscall_dir=syscalls
|
||||||
newlib_cflags="${newlib_cflags} -DABORT_PROVIDED -DHAVE_GETTIMEOFDAY"
|
newlib_cflags="${newlib_cflags} -DHAVE_GETTIMEOFDAY"
|
||||||
newlib_cflags="${newlib_cflags} -DHAVE_SYSTEM -DHAVE_RENAME"
|
newlib_cflags="${newlib_cflags} -DHAVE_SYSTEM -DHAVE_RENAME"
|
||||||
if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
|
if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
|
||||||
newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
|
newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
|
||||||
|
@ -23,17 +23,6 @@ do_AngelSWI (int reason, void * arg)
|
|||||||
#endif /* ARM_RDI_MONITOR */
|
#endif /* ARM_RDI_MONITOR */
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
abort (void)
|
|
||||||
{
|
|
||||||
#ifdef ARM_RDI_MONITOR
|
|
||||||
do_AngelSWI (AngelSWI_Reason_ReportException,
|
|
||||||
(void *) ADP_Stopped_RunTimeError);
|
|
||||||
#else
|
|
||||||
asm ("mov r0,#17\nswi %a0" :: "i" (SWI_Exit));
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
alarm (void)
|
alarm (void)
|
||||||
{
|
{
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include <sys/times.h>
|
#include <sys/times.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <reent.h>
|
#include <reent.h>
|
||||||
|
#include <signal.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "swi.h"
|
#include "swi.h"
|
||||||
|
|
||||||
@ -433,30 +434,34 @@ _close (int file)
|
|||||||
return wrap (_swiclose (file));
|
return wrap (_swiclose (file));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
_exit (int n)
|
|
||||||
{
|
|
||||||
/* FIXME: return code is thrown away. */
|
|
||||||
|
|
||||||
#ifdef ARM_RDI_MONITOR
|
|
||||||
do_AngelSWI (AngelSWI_Reason_ReportException,
|
|
||||||
(void *) ADP_Stopped_ApplicationExit);
|
|
||||||
#else
|
|
||||||
asm ("swi %a0" :: "i" (SWI_Exit));
|
|
||||||
#endif
|
|
||||||
n = n;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
_kill (int n, int m)
|
_kill (int pid, int sig)
|
||||||
{
|
{
|
||||||
|
(void)pid; (void)sig;
|
||||||
#ifdef ARM_RDI_MONITOR
|
#ifdef ARM_RDI_MONITOR
|
||||||
|
/* Note: The pid argument is thrown away. */
|
||||||
|
switch (sig) {
|
||||||
|
case SIGABRT:
|
||||||
|
return do_AngelSWI (AngelSWI_Reason_ReportException,
|
||||||
|
(void *) ADP_Stopped_RunTimeError);
|
||||||
|
default:
|
||||||
return do_AngelSWI (AngelSWI_Reason_ReportException,
|
return do_AngelSWI (AngelSWI_Reason_ReportException,
|
||||||
(void *) ADP_Stopped_ApplicationExit);
|
(void *) ADP_Stopped_ApplicationExit);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
asm ("swi %a0" :: "i" (SWI_Exit));
|
asm ("swi %a0" :: "i" (SWI_Exit));
|
||||||
#endif
|
#endif
|
||||||
n = n; m = m;
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_exit (int status)
|
||||||
|
{
|
||||||
|
/* There is only one SWI for both _exit and _kill. For _exit, call
|
||||||
|
the SWI with the second argument set to -1, an invalid value for
|
||||||
|
signum, so that the SWI handler can distinguish the two calls.
|
||||||
|
Note: The RDI implementation of _kill throws away both its
|
||||||
|
arguments. */
|
||||||
|
_kill(status, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user