900-libitm-fixes-for-musl-support.patch 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. From: ktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
  2. Date: Wed, 22 Apr 2015 14:11:25 +0000 (+0000)
  3. Subject: libitm fixes for musl support
  4. X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=e53a4d49c3d03ab8eaddb073cf972c1c46d75338
  5. libitm fixes for musl support
  6. On behalf of Szabolcs.Nagy@arm.com
  7. 2015-04-22 Gregor Richards <gregor.richards@uwaterloo.ca>
  8. * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h.
  9. * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined.
  10. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222325 138bc75d-0d04-0410-961f-82ee72b054a4
  11. ---
  12. Index: b/libitm/config/arm/hwcap.cc
  13. ===================================================================
  14. --- a/libitm/config/arm/hwcap.cc
  15. +++ b/libitm/config/arm/hwcap.cc
  16. @@ -40,7 +40,7 @@
  17. #ifdef __linux__
  18. #include <unistd.h>
  19. -#include <sys/fcntl.h>
  20. +#include <fcntl.h>
  21. #include <elf.h>
  22. static void __attribute__((constructor))
  23. Index: b/libitm/config/linux/x86/tls.h
  24. ===================================================================
  25. --- a/libitm/config/linux/x86/tls.h
  26. +++ b/libitm/config/linux/x86/tls.h
  27. @@ -25,16 +25,19 @@
  28. #ifndef LIBITM_X86_TLS_H
  29. #define LIBITM_X86_TLS_H 1
  30. -#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
  31. +#if defined(__GLIBC_PREREQ)
  32. +#if __GLIBC_PREREQ(2, 10)
  33. /* Use slots in the TCB head rather than __thread lookups.
  34. GLIBC has reserved words 10 through 13 for TM. */
  35. #define HAVE_ARCH_GTM_THREAD 1
  36. #define HAVE_ARCH_GTM_THREAD_DISP 1
  37. #endif
  38. +#endif
  39. #include "config/generic/tls.h"
  40. -#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
  41. +#if defined(__GLIBC_PREREQ)
  42. +#if __GLIBC_PREREQ(2, 10)
  43. namespace GTM HIDDEN {
  44. #ifdef __x86_64__
  45. @@ -101,5 +104,6 @@
  46. } // namespace GTM
  47. #endif /* >= GLIBC 2.10 */
  48. +#endif
  49. #endif // LIBITM_X86_TLS_H