ARM divsi3.S: raise(SIGFPE) when called for
. 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
This commit is contained in:
parent
4ac7206c6f
commit
5a0585359d
5 changed files with 11 additions and 1 deletions
|
@ -22,7 +22,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.L_overflow:
|
.L_overflow:
|
||||||
#if !defined(_KERNEL) && !defined(_STANDALONE) && !defined(__minix)
|
#if !defined(_KERNEL) && !defined(_STANDALONE) && !defined(_LIBMINC)
|
||||||
mov r0, #8 /* SIGFPE */
|
mov r0, #8 /* SIGFPE */
|
||||||
bl PIC_SYM(_C_LABEL(raise), PLT) /* raise it */
|
bl PIC_SYM(_C_LABEL(raise), PLT) /* raise it */
|
||||||
mov r0, #0
|
mov r0, #0
|
||||||
|
|
4
external/gpl3/gcc/files/arm-minix.h
vendored
4
external/gpl3/gcc/files/arm-minix.h
vendored
|
@ -67,3 +67,7 @@
|
||||||
|
|
||||||
#undef TARGET_VERSION
|
#undef TARGET_VERSION
|
||||||
#define TARGET_VERSION fputs (" (MINIX/arm ELF EABI)", stderr);
|
#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"
|
||||||
|
|
|
@ -284,3 +284,4 @@ kinfo_t *pre_init(u32_t magic, u32_t ebx)
|
||||||
int send_sig(endpoint_t proc_nr, int sig_nr) { return 0; }
|
int send_sig(endpoint_t proc_nr, int sig_nr) { return 0; }
|
||||||
void minix_shutdown(timer_t *t) { arch_shutdown(RBT_PANIC); }
|
void minix_shutdown(timer_t *t) { arch_shutdown(RBT_PANIC); }
|
||||||
void busy_delay_ms(int x) { }
|
void busy_delay_ms(int x) { }
|
||||||
|
int raise(int n) { panic("raise(%d)\n", n); }
|
||||||
|
|
|
@ -243,3 +243,4 @@ kinfo_t *pre_init(u32_t magic, u32_t ebx)
|
||||||
int send_sig(endpoint_t proc_nr, int sig_nr) { return 0; }
|
int send_sig(endpoint_t proc_nr, int sig_nr) { return 0; }
|
||||||
void minix_shutdown(timer_t *t) { arch_shutdown(RBT_PANIC); }
|
void minix_shutdown(timer_t *t) { arch_shutdown(RBT_PANIC); }
|
||||||
void busy_delay_ms(int x) { }
|
void busy_delay_ms(int x) { }
|
||||||
|
int raise(int sig) { panic("raise(%d)\n", sig); }
|
||||||
|
|
|
@ -10,7 +10,11 @@ LDADD+= -nodefaultlibs
|
||||||
|
|
||||||
# 2. Compiler-specific libs
|
# 2. Compiler-specific libs
|
||||||
.if !empty(CC:M*gcc)
|
.if !empty(CC:M*gcc)
|
||||||
|
.if (${MACHINE_ARCH} == "earm")
|
||||||
|
LDADD+= -lsys
|
||||||
|
.else
|
||||||
LDADD+= -lgcc -lsys -lgcc
|
LDADD+= -lgcc -lsys -lgcc
|
||||||
|
.endif
|
||||||
.elif !empty(CC:M*clang)
|
.elif !empty(CC:M*clang)
|
||||||
LDADD+= -L/usr/pkg/compiler-rt/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic
|
LDADD+= -L/usr/pkg/compiler-rt/lib -lCompilerRT-Generic -lsys -lCompilerRT-Generic
|
||||||
.endif
|
.endif
|
||||||
|
|
Loading…
Reference in a new issue