summaryrefslogtreecommitdiff
path: root/gnu/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/gcc')
-rw-r--r--gnu/gcc/gcc/config/arm/openbsd1.h35
-rw-r--r--gnu/gcc/gcc/config/floatunsidf.c4
-rw-r--r--gnu/gcc/gcc/config/floatunsisf.c4
3 files changed, 43 insertions, 0 deletions
diff --git a/gnu/gcc/gcc/config/arm/openbsd1.h b/gnu/gcc/gcc/config/arm/openbsd1.h
index afd2e3b1762..ed79f6e4c4f 100644
--- a/gnu/gcc/gcc/config/arm/openbsd1.h
+++ b/gnu/gcc/gcc/config/arm/openbsd1.h
@@ -24,3 +24,38 @@ Boston, MA 02111-1307, USA. */
/* use EABI frame unwinding tables. */
#define TARGET_UNWIND_INFO 1
+
+#if defined (__thumb__)
+#define RENAME_LIBRARY_SET ".thumb_set"
+#else
+#define RENAME_LIBRARY_SET ".set"
+#endif
+
+/* Make __aeabi_AEABI_NAME an alias for __GCC_NAME. */
+#define RENAME_LIBRARY(GCC_NAME, AEABI_NAME) \
+ __asm__ (".globl\t__aeabi_" #AEABI_NAME "\n" \
+ RENAME_LIBRARY_SET "\t__aeabi_" #AEABI_NAME \
+ ", __" #GCC_NAME "\n");
+
+/* Give some libgcc functions an additional __aeabi name. */
+#ifdef L_muldi3
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (muldi3, lmul)
+#endif
+#ifdef L_fixdfdi
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixdfdi, d2lz)
+#endif
+#ifdef L_fixunsdfdi
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunsdfdi, d2ulz)
+#endif
+#ifdef L_fixsfdi
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixsfdi, f2lz)
+#endif
+#ifdef L_fixunssfdi
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (fixunssfdi, f2ulz)
+#endif
+#ifdef L_floatdidf
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdidf, l2d)
+#endif
+#ifdef L_floatdisf
+#define DECLARE_LIBRARY_RENAMES RENAME_LIBRARY (floatdisf, l2f)
+#endif
diff --git a/gnu/gcc/gcc/config/floatunsidf.c b/gnu/gcc/gcc/config/floatunsidf.c
index ff28112502b..c23d3a117ff 100644
--- a/gnu/gcc/gcc/config/floatunsidf.c
+++ b/gnu/gcc/gcc/config/floatunsidf.c
@@ -13,3 +13,7 @@ __floatunsidf (USItype u)
<< (sizeof (USItype) * __CHAR_BIT__ - 1));
return r;
}
+
+#ifdef __ARM_EABI__
+__asm__ (".globl\t__aeabi_ui2d\n.set\t__aeabi_ui2d, __floatunsidf\n");
+#endif
diff --git a/gnu/gcc/gcc/config/floatunsisf.c b/gnu/gcc/gcc/config/floatunsisf.c
index 11d4aa78cbe..69951efaa89 100644
--- a/gnu/gcc/gcc/config/floatunsisf.c
+++ b/gnu/gcc/gcc/config/floatunsisf.c
@@ -16,3 +16,7 @@ __floatunsisf (USItype u)
else
return (SFtype) s;
}
+
+#ifdef __ARM_EABI__
+__asm__ (".globl\t__aeabi_ui2f\n.set\t__aeabi_ui2f, __floatunsisf\n");
+#endif