205-musl_x86.patch 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. From 606b5b76926d42d26c08c7400c38afe07e18e3cd Mon Sep 17 00:00:00 2001
  2. From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
  3. Date: Fri, 15 May 2015 13:20:01 +0000
  4. Subject: [PATCH 10/12] [PATCH 9/13] x86 musl support
  5. On behalf of Szabolcs Nagy.
  6. 2015-05-15 Gregor Richards <[email protected]>
  7. * config/i386/linux.h (MUSL_DYNAMIC_LINKER): Define.
  8. * config/i386/linux64.h (MUSL_DYNAMIC_LINKER32): Define.
  9. (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32): Define.
  10. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223218 138bc75d-0d04-0410-961f-82ee72b054a4
  11. ---
  12. gcc/config/i386/linux.h | 3 +++
  13. gcc/config/i386/linux64.h | 7 +++++++
  14. 2 files changed, 10 insertions(+)
  15. --- a/gcc/config/i386/linux.h
  16. +++ b/gcc/config/i386/linux.h
  17. @@ -21,3 +21,6 @@ along with GCC; see the file COPYING3.
  18. #define GNU_USER_LINK_EMULATION "elf_i386"
  19. #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
  20. +
  21. +#undef MUSL_DYNAMIC_LINKER
  22. +#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
  23. --- a/gcc/config/i386/linux64.h
  24. +++ b/gcc/config/i386/linux64.h
  25. @@ -30,3 +30,10 @@ see the files COPYING3 and COPYING.RUNTI
  26. #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
  27. #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
  28. #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
  29. +
  30. +#undef MUSL_DYNAMIC_LINKER32
  31. +#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
  32. +#undef MUSL_DYNAMIC_LINKER64
  33. +#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
  34. +#undef MUSL_DYNAMIC_LINKERX32
  35. +#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
  36. --- a/libitm/config/linux/x86/tls.h
  37. +++ b/libitm/config/linux/x86/tls.h
  38. @@ -25,16 +25,19 @@
  39. #ifndef LIBITM_X86_TLS_H
  40. #define LIBITM_X86_TLS_H 1
  41. -#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
  42. +#if defined(__GLIBC_PREREQ)
  43. +#if __GLIBC_PREREQ(2, 10)
  44. /* Use slots in the TCB head rather than __thread lookups.
  45. GLIBC has reserved words 10 through 13 for TM. */
  46. #define HAVE_ARCH_GTM_THREAD 1
  47. #define HAVE_ARCH_GTM_THREAD_DISP 1
  48. #endif
  49. +#endif
  50. #include "config/generic/tls.h"
  51. -#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
  52. +#if defined(__GLIBC_PREREQ)
  53. +#if __GLIBC_PREREQ(2, 10)
  54. namespace GTM HIDDEN {
  55. #ifdef __x86_64__
  56. @@ -101,5 +104,6 @@ static inline void set_abi_disp(struct a
  57. } // namespace GTM
  58. #endif /* >= GLIBC 2.10 */
  59. +#endif
  60. #endif // LIBITM_X86_TLS_H