summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-16 13:18:44 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-10-19 17:00:56 -0500
commit139a3ab9fce8bf8a696e573355b074a4a061d828 (patch)
treefc83ceb5fb9ad935b1cb1334739c6568a2d6080b
parentpowerpc/beatnik: Fix warnings (diff)
downloadrtems-139a3ab9fce8bf8a696e573355b074a4a061d828.tar.bz2
sh/shsim: Further clean up and fixes to previous commit
-rw-r--r--c/src/lib/libbsp/sh/shsim/Makefile.am1
-rw-r--r--c/src/lib/libbsp/sh/shsim/include/bsp.h1
-rw-r--r--c/src/lib/libbsp/sh/shsim/include/syscall.h2
-rw-r--r--c/src/lib/libbsp/sh/shsim/startup/sysexit.c3
4 files changed, 5 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/sh/shsim/Makefile.am b/c/src/lib/libbsp/sh/shsim/Makefile.am
index 637bf686c6..99fd9dbedf 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 80ef2cea68..bb8a4a5255 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 79fcc07a20..e5cde7217b 100644
--- a/c/src/lib/libbsp/sh/shsim/include/syscall.h
+++ b/c/src/lib/libbsp/sh/shsim/include/syscall.h
@@ -28,3 +28,5 @@
#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 4b540a265a..dde20f35e8 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)
{