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 | int | ||||||
| _exit (int n) | _kill (int pid, int sig) | ||||||
| { | { | ||||||
|   /* FIXME: return code is thrown away.  */ |   (void)pid; (void)sig; | ||||||
|    |  | ||||||
| #ifdef ARM_RDI_MONITOR | #ifdef ARM_RDI_MONITOR | ||||||
|   do_AngelSWI (AngelSWI_Reason_ReportException, |   /* Note: The pid argument is thrown away.  */ | ||||||
| 	      (void *) ADP_Stopped_ApplicationExit); |   switch (sig) { | ||||||
|  | 	  case SIGABRT: | ||||||
|  | 		  return do_AngelSWI (AngelSWI_Reason_ReportException, | ||||||
|  | 				  (void *) ADP_Stopped_RunTimeError); | ||||||
|  | 	  default: | ||||||
|  | 		  return do_AngelSWI (AngelSWI_Reason_ReportException, | ||||||
|  | 				  (void *) ADP_Stopped_ApplicationExit); | ||||||
|  |   } | ||||||
| #else | #else | ||||||
|   asm ("swi %a0" :: "i" (SWI_Exit)); |   asm ("swi %a0" :: "i" (SWI_Exit)); | ||||||
| #endif | #endif | ||||||
|   n = n; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int | void | ||||||
| _kill (int n, int m) | _exit (int status) | ||||||
| { | { | ||||||
| #ifdef ARM_RDI_MONITOR |   /* There is only one SWI for both _exit and _kill. For _exit, call
 | ||||||
|   return do_AngelSWI (AngelSWI_Reason_ReportException, |      the SWI with the second argument set to -1, an invalid value for | ||||||
| 		      (void *) ADP_Stopped_ApplicationExit); |      signum, so that the SWI handler can distinguish the two calls. | ||||||
| #else |      Note: The RDI implementation of _kill throws away both its | ||||||
|   asm ("swi %a0" :: "i" (SWI_Exit)); |      arguments.  */ | ||||||
| #endif |   _kill(status, -1); | ||||||
|   n = n; m = m; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int | int | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue