1
0

850-use_shared_libgcc.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --- a/gcc/config/arm/linux-eabi.h
  2. +++ b/gcc/config/arm/linux-eabi.h
  3. @@ -132,10 +132,6 @@
  4. "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} " \
  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. @@ -53,6 +53,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 or musl is the default C library and whether
  24. -muclibc or -mglibc or -mbionic or -mmusl has been passed to change
  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/gcc/config/rs6000/linux.h
  35. +++ b/gcc/config/rs6000/linux.h
  36. @@ -60,6 +60,9 @@
  37. #undef CPP_OS_DEFAULT_SPEC
  38. #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
  39. +#undef LIBGCC_SPEC
  40. +#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc"
  41. +
  42. #undef LINK_SHLIB_SPEC
  43. #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}}"