850-use_shared_libgcc.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. --- a/gcc/config/arm/linux-eabi.h
  2. +++ b/gcc/config/arm/linux-eabi.h
  3. @@ -114,10 +114,6 @@
  4. #define ENDFILE_SPEC \
  5. LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
  6. -/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we
  7. - do not use -lfloat. */
  8. -#undef LIBGCC_SPEC
  9. -
  10. /* Clear the instruction cache from `beg' to `end'. This is
  11. implemented in lib1funcs.S, so ensure an error if this definition
  12. is used. */
  13. --- a/gcc/config/linux.h
  14. +++ b/gcc/config/linux.h
  15. @@ -51,6 +51,10 @@ see the files COPYING3 and COPYING.RUNTI
  16. builtin_assert ("system=posix"); \
  17. } while (0)
  18. +#ifndef LIBGCC_SPEC
  19. +#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}"
  20. +#endif
  21. +
  22. /* Determine which dynamic linker to use depending on whether GLIBC or
  23. uClibc or Bionic is the default C library and whether
  24. -muclibc or -mglibc or -mbionic has been passed to change the default. */
  25. --- a/libgcc/mkmap-symver.awk
  26. +++ b/libgcc/mkmap-symver.awk
  27. @@ -132,5 +132,5 @@ function output(lib) {
  28. else if (inherit[lib])
  29. printf("} %s;\n", inherit[lib]);
  30. else
  31. - printf ("\n local:\n\t*;\n};\n");
  32. + printf ("\n\t*;\n};\n");
  33. }
  34. --- a/libgcc/Makefile.in
  35. +++ b/libgcc/Makefile.in
  36. @@ -368,7 +368,7 @@ endif
  37. # For -fvisibility=hidden. We need both a -fvisibility=hidden on
  38. # the command line, and a #define to prevent libgcc2.h etc from
  39. # overriding that with #pragmas.
  40. -vis_hide = @vis_hide@
  41. +vis_hide =
  42. ifneq (,$(vis_hide))
  43. --- a/gcc/config/rs6000/linux.h
  44. +++ b/gcc/config/rs6000/linux.h
  45. @@ -61,6 +61,9 @@
  46. #undef CPLUSPLUS_CPP_SPEC
  47. #define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
  48. +#undef LIBGCC_SPEC
  49. +#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc"
  50. +
  51. #undef LINK_SHLIB_SPEC
  52. #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"