801-arm-bootstrap-libgcc.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. diff -ur gcc-4.1.2/gcc/config/arm/unwind-arm.c gcc-4.1.2-patched/gcc/config/arm/unwind-arm.c
  2. --- gcc-4.1.2/gcc/config/arm/unwind-arm.c 2006-09-20 12:31:12.000000000 -0500
  3. +++ gcc-4.1.2-patched/gcc/config/arm/unwind-arm.c 2008-02-27 13:30:45.339282365 -0600
  4. @@ -29,7 +29,13 @@
  5. /* We add a prototype for abort here to avoid creating a dependency on
  6. target headers. */
  7. +#ifndef BOOTSTRAP_GCC
  8. extern void abort (void);
  9. +#else
  10. +void abort (void)
  11. +{
  12. +}
  13. +#endif
  14. /* Definitions for C++ runtime support routines. We make these weak
  15. declarations to avoid pulling in libsupc++ unnecessarily. */
  16. @@ -542,7 +548,9 @@
  17. {
  18. UCB_SAVED_CALLSITE_ADDR (ucbp) = saved_vrs.core.r[R_PC];
  19. +#ifndef BOOTSTRAP_GCC
  20. next_vrs = saved_vrs;
  21. +#endif
  22. /* Call the pr to decide what to do. */
  23. pr_result = ((personality_routine) UCB_PR_ADDR (ucbp))
  24. @@ -572,7 +580,9 @@
  25. if (entry_code != _URC_OK)
  26. return entry_code;
  27. +#ifndef BOOTSTRAP_GCC
  28. saved_vrs = next_vrs;
  29. +#endif
  30. }
  31. while (pr_result == _URC_CONTINUE_UNWIND);
  32. diff -ur gcc-4.1.2/gcc/mklibgcc.in gcc-4.1.2-patched/gcc/mklibgcc.in
  33. --- gcc-4.1.2/gcc/mklibgcc.in 2006-09-10 02:13:12.000000000 -0500
  34. +++ gcc-4.1.2-patched/gcc/mklibgcc.in 2008-02-27 13:39:15.697843177 -0600
  35. @@ -169,7 +169,7 @@
  36. # It is too hard to guarantee that vis_hide and gen-hide-list will never
  37. # be referenced if SHLIB_LINK is not set, so set them to the values they'd
  38. # have if SHLIB_LINK were set and we didn't have visibility support.
  39. - echo "vis_hide ="
  40. + echo "vis_hide :=-DBOOTSTRAP_GCC"
  41. echo "gen-hide-list = echo > \$@"
  42. fi
  43. diff -ur gcc-4.1.2/gcc/unwind-dw2.c gcc-4.1.2-patched/gcc/unwind-dw2.c
  44. --- gcc-4.1.2/gcc/unwind-dw2.c 2005-11-17 19:19:10.000000000 -0600
  45. +++ gcc-4.1.2-patched/gcc/unwind-dw2.c 2008-02-27 13:29:55.414640030 -0600
  46. @@ -1311,8 +1311,10 @@
  47. void *c = current->reg[i];
  48. void *t = target->reg[i];
  49. +#ifndef BOOTSTRAP_GCC
  50. if (t && c && t != c)
  51. memcpy (c, t, dwarf_reg_size_table[i]);
  52. +#endif
  53. }
  54. /* If the current frame doesn't have a saved stack pointer, then we