[PATCH 19/42] sh/shsim: Further clean up and fixes to previous commit

Joel Sherrill joel.sherrill at oarcorp.com
Fri Oct 17 15:23:35 UTC 2014


---
 c/src/lib/libbsp/sh/shsim/Makefile.am       | 1 +
 c/src/lib/libbsp/sh/shsim/include/bsp.h     | 1 -
 c/src/lib/libbsp/sh/shsim/include/syscall.h | 3 +++
 c/src/lib/libbsp/sh/shsim/startup/sysexit.c | 3 ++-
 4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/c/src/lib/libbsp/sh/shsim/Makefile.am b/c/src/lib/libbsp/sh/shsim/Makefile.am
index 637bf68..99fd9db 100644
--- a/c/src/lib/libbsp/sh/shsim/Makefile.am
+++ b/c/src/lib/libbsp/sh/shsim/Makefile.am
@@ -38,6 +38,7 @@ libbsp_a_SOURCES += ../../shared/bspclean.c
 libbsp_a_SOURCES += ../../shared/sbrk.c ../../shared/bootcard.c
 libbsp_a_SOURCES += ../../shared/gnatinstallhandler.c
 libbsp_a_SOURCES += ../shared/bsphwinit.c
+libbsp_a_SOURCES += startup/sysexit.c
 
 # clock
 libbsp_a_SOURCES += ../../shared/clock_driver_simidle.c
diff --git a/c/src/lib/libbsp/sh/shsim/include/bsp.h b/c/src/lib/libbsp/sh/shsim/include/bsp.h
index 80ef2ce..bb8a4a5 100644
--- a/c/src/lib/libbsp/sh/shsim/include/bsp.h
+++ b/c/src/lib/libbsp/sh/shsim/include/bsp.h
@@ -56,7 +56,6 @@ extern void *CPU_Interrupt_stack_high;
 /*
  * BSP methods that cross file boundaries.
  */
-int __trap34(int, int, void*, int );
 int _sys_exit (int n);
 void bsp_hw_init(void);
 
diff --git a/c/src/lib/libbsp/sh/shsim/include/syscall.h b/c/src/lib/libbsp/sh/shsim/include/syscall.h
index 79fcc07..fd0d9f5 100644
--- a/c/src/lib/libbsp/sh/shsim/include/syscall.h
+++ b/c/src/lib/libbsp/sh/shsim/include/syscall.h
@@ -28,3 +28,6 @@
 
 #define SYS_utime       201 /* not really a system call */
 #define SYS_wait        202 /* nor is this */
+
+int __trap34(int, int, void*, int );
+
diff --git a/c/src/lib/libbsp/sh/shsim/startup/sysexit.c b/c/src/lib/libbsp/sh/shsim/startup/sysexit.c
index 4b540a2..dde20f3 100644
--- a/c/src/lib/libbsp/sh/shsim/startup/sysexit.c
+++ b/c/src/lib/libbsp/sh/shsim/startup/sysexit.c
@@ -12,8 +12,9 @@
  */
 
 #include <bsp.h>
+#include <bsp/syscall.h>
 
-extern int __trap34(int, int, void*, int );
+int errno; /* assumed to exist by exit_k() */
 
 int _sys_exit (int n)
 {
-- 
1.9.3




More information about the devel mailing list