aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2013-08-02 15:27:26 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2013-08-03 13:44:25 +0800
commite85b9ca2afe8edbb9fa99c6ce2cc4e52dce18c21 (patch)
treef10ebaf1167a927ea23db66e92b677f99ca4eb28 /gcc-4.6
parent5ea1e88a7f14a78a01d95f66e388eb15908a5225 (diff)
downloadtoolchain_gcc-e85b9ca2afe8edbb9fa99c6ce2cc4e52dce18c21.zip
toolchain_gcc-e85b9ca2afe8edbb9fa99c6ce2cc4e52dce18c21.tar.gz
toolchain_gcc-e85b9ca2afe8edbb9fa99c6ce2cc4e52dce18c21.tar.bz2
[4.6,4.8] Add stack unwinding directives for __aeabi_idiv0 in libgcc.a
Same fix to 4.7 in 5ea1e88a7f14a78a01d95f66e388eb15908a5225 Change-Id: I1b2ce4ad72e6b2a327183703d9e49295cf2bad25
Diffstat (limited to 'gcc-4.6')
-rw-r--r--gcc-4.6/gcc/Makefile.in3
-rw-r--r--gcc-4.6/gcc/config/arm/lib1funcs.asm6
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc-4.6/gcc/Makefile.in b/gcc-4.6/gcc/Makefile.in
index 031db74..e8a444c 100644
--- a/gcc-4.6/gcc/Makefile.in
+++ b/gcc-4.6/gcc/Makefile.in
@@ -646,12 +646,13 @@ INHIBIT_LIBC_CFLAGS = -Dinhibit_libc
endif
# Options to use when compiling libgcc2.a.
+# Adding -funwind-tables to debug idiv0 cases for Android
#
LIBGCC2_DEBUG_CFLAGS = -g
LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(TARGET_LIBGCC2_CFLAGS) \
$(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) \
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED \
- -fno-stack-protector \
+ -fno-stack-protector -funwind-tables \
$(INHIBIT_LIBC_CFLAGS)
# Additional options to use when compiling libgcc2.a.
diff --git a/gcc-4.6/gcc/config/arm/lib1funcs.asm b/gcc-4.6/gcc/config/arm/lib1funcs.asm
index 2e76c01..a921b8f 100644
--- a/gcc-4.6/gcc/config/arm/lib1funcs.asm
+++ b/gcc-4.6/gcc/config/arm/lib1funcs.asm
@@ -1261,10 +1261,16 @@ LSYM(Lover12):
ARM_FUNC_START div0
#endif
+ /* ANDROID LOCAL BEGIN */
+ /* Adding stack unwinding directives to debug divide-by-0 errors */
+ .fnstart
+ .save {r1, lr}
do_push {r1, lr}
mov r0, #SIGFPE
bl SYM(raise) __PLT__
RETLDM r1
+ .fnend
+ /* ANDROID LOCAL END */
#ifdef __ARM_EABI__
FUNC_END aeabi_ldiv0