aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/eabi.c
diff options
context:
space:
mode:
authorTravis Geiselbrecht <geist@foobox.com>2008-09-05 04:35:45 -0700
committerTravis Geiselbrecht <geist@foobox.com>2008-09-05 04:35:45 -0700
commit82f7420325b7d86dd466e6bedb25fd31d42b6701 (patch)
treecfaffc6ae767d1e94000fa85d8cb8612f286ab56 /lib/libc/eabi.c
parentdfd2eb62e93b869cf098a01add6fa19a00576cfd (diff)
downloadcommon-82f7420325b7d86dd466e6bedb25fd31d42b6701.tar.gz
[EABI] add support for EABI/linux toolchains
pretty much a hack right now, more or less testing for arm-none-linux-eabi- in the toolchain prefix and adding some routines that have to be implemented.
Diffstat (limited to 'lib/libc/eabi.c')
-rw-r--r--lib/libc/eabi.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/lib/libc/eabi.c b/lib/libc/eabi.c
new file mode 100644
index 00000000..6213d682
--- /dev/null
+++ b/lib/libc/eabi.c
@@ -0,0 +1,49 @@
+/* Copyright (c) 2008 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/* some cruft we have to define when using the linux toolchain */
+#if WITH_LINUX_EABI_TOOLCHAIN
+
+#include <unwind.h>
+
+/* Our toolchain has eabi functionality built in, but they're not really used.
+ * so we stub them out here. */
+_Unwind_Reason_Code __aeabi_unwind_cpp_pr0(_Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context)
+{
+ return _URC_FAILURE;
+}
+
+_Unwind_Reason_Code __aeabi_unwind_cpp_pr1(_Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context)
+{
+ return _URC_FAILURE;
+}
+
+_Unwind_Reason_Code __aeabi_unwind_cpp_pr2(_Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context)
+{
+ return _URC_FAILURE;
+}
+
+void raise(void)
+{
+}
+
+#endif