clang generates these calls using the official aeabi names instead of
the gcc names. Just add an alias for them. FreeBSD does something
similar.
ok?
Index: lib/libkern/arch/arm/divsi3.S
===
RCS file: /cvs/src/sys/lib/libkern/arch/arm/divsi3.S,v
retrieving revision 1.3
diff -u -p -r1.3 divsi3.S
--- lib/libkern/arch/arm/divsi3.S 30 Dec 2014 08:12:52 - 1.3
+++ lib/libkern/arch/arm/divsi3.S 22 Sep 2016 15:07:07 -
@@ -385,3 +385,6 @@ L_udivide_l1:
addhs r3, r3, r2
mov r0, r3
mov pc, lr
+
+STRONG_ALIAS(__aeabi_idiv, __divsi3)
+STRONG_ALIAS(__aeabi_uidiv, __udivsi3)