850-use_shared_libgcc.patch 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. --- a/gcc/config/arm/linux-eabi.h
  2. +++ b/gcc/config/arm/linux-eabi.h
  3. @@ -95,10 +95,6 @@
  4. #define ENDFILE_SPEC \
  5. LINUX_OR_ANDROID_LD (LINUX_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.asm, so ensure an error if this definition
  12. is used. */
  13. --- a/gcc/config/arm/linux-elf.h
  14. +++ b/gcc/config/arm/linux-elf.h
  15. @@ -60,8 +60,6 @@
  16. %{shared:-lc} \
  17. %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
  18. -#define LIBGCC_SPEC "-lgcc"
  19. -
  20. #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
  21. #define LINUX_TARGET_LINK_SPEC "%{h*} %{version:-v} \
  22. --- a/gcc/config/linux.h
  23. +++ b/gcc/config/linux.h
  24. @@ -116,6 +116,10 @@ see the files COPYING3 and COPYING.RUNTI
  25. #define USE_LD_AS_NEEDED 1
  26. #endif
  27. +#ifndef LIBGCC_SPEC
  28. +#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}"
  29. +#endif
  30. +
  31. /* Determine which dynamic linker to use depending on whether GLIBC or
  32. uClibc or Bionic is the default C library and whether
  33. -muclibc or -mglibc or -mbionic has been passed to change the default. */
  34. --- a/gcc/mkmap-symver.awk
  35. +++ b/gcc/mkmap-symver.awk
  36. @@ -132,5 +132,5 @@ function output(lib) {
  37. else if (inherit[lib])
  38. printf("} %s;\n", inherit[lib]);
  39. else
  40. - printf ("\n local:\n\t*;\n};\n");
  41. + printf ("\n\t*;\n};\n");
  42. }
  43. --- a/libgcc/Makefile.in
  44. +++ b/libgcc/Makefile.in
  45. @@ -265,7 +265,7 @@ ifeq ($(enable_shared),yes)
  46. # For -fvisibility=hidden. We need both a -fvisibility=hidden on
  47. # the command line, and a #define to prevent libgcc2.h etc from
  48. # overriding that with #pragmas.
  49. -vis_hide = @vis_hide@
  50. +vis_hide =
  51. ifneq (,$(vis_hide))
  52. --- a/gcc/config/rs6000/linux.h
  53. +++ b/gcc/config/rs6000/linux.h
  54. @@ -85,6 +85,8 @@
  55. #define USE_LD_AS_NEEDED 1
  56. #endif
  57. +#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc"
  58. +
  59. #undef TARGET_VERSION
  60. #define TARGET_VERSION fprintf (stderr, " (PowerPC GNU/Linux)");