. raise(SIGFPE) for modulo-0/divide-0 operations in
internal int division functions
. gcc: do not link with -lgcc anywhere so these internal
functions are always used from libc instead of (sometimes)
masked by -lgcc
. together fixes test53 on ARM
Change-Id: I31ec19dfdd68b8a92695595da901874e63106f9d
*/
.L_overflow:
-#if !defined(_KERNEL) && !defined(_STANDALONE) && !defined(__minix)
+#if !defined(_KERNEL) && !defined(_STANDALONE) && !defined(_LIBMINC)
mov r0, #8 /* SIGFPE */
bl PIC_SYM(_C_LABEL(raise), PLT) /* raise it */
mov r0, #0
#undef TARGET_VERSION
#define TARGET_VERSION fputs (" (MINIX/arm ELF EABI)", stderr);
+
+/* suppress -lgcc - don't include %G (-lgcc) in the libraries */
+#undef LINK_GCC_C_SEQUENCE_SPEC
+#define LINK_GCC_C_SEQUENCE_SPEC "%L"
int send_sig(endpoint_t proc_nr, int sig_nr) { return 0; }
void minix_shutdown(timer_t *t) { arch_shutdown(RBT_PANIC); }
void busy_delay_ms(int x) { }
+int raise(int n) { panic("raise(%d)\n", n); }
int send_sig(endpoint_t proc_nr, int sig_nr) { return 0; }
void minix_shutdown(timer_t *t) { arch_shutdown(RBT_PANIC); }
void busy_delay_ms(int x) { }
+int raise(int sig) { panic("raise(%d)\n", sig); }
# 2. Compiler-specific libs
.if !empty(CC:M*gcc)
+.if (${MACHINE_ARCH} == "earm")
+LDADD+= -lsys
+.else
LDADD+= -lgcc -lsys -lgcc
+.endif
.elif !empty(CC:M*clang)
LDADD+= -L/usr/pkg/compiler-rt/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic
.endif