You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.6 KiB

  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. --- a/libitm/config/arm/hwcap.cc
  13. +++ b/libitm/config/arm/hwcap.cc
  14. @@ -40,7 +40,7 @@ int GTM_hwcap HIDDEN = 0
  15. #ifdef __linux__
  16. #include <unistd.h>
  17. -#include <sys/fcntl.h>
  18. +#include <fcntl.h>
  19. #include <elf.h>
  20. static void __attribute__((constructor))
  21. --- a/libitm/config/linux/x86/tls.h
  22. +++ b/libitm/config/linux/x86/tls.h
  23. @@ -25,16 +25,19 @@
  24. #ifndef LIBITM_X86_TLS_H
  25. #define LIBITM_X86_TLS_H 1
  26. -#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
  27. +#if defined(__GLIBC_PREREQ)
  28. +#if __GLIBC_PREREQ(2, 10)
  29. /* Use slots in the TCB head rather than __thread lookups.
  30. GLIBC has reserved words 10 through 13 for TM. */
  31. #define HAVE_ARCH_GTM_THREAD 1
  32. #define HAVE_ARCH_GTM_THREAD_DISP 1
  33. #endif
  34. +#endif
  35. #include "config/generic/tls.h"
  36. -#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
  37. +#if defined(__GLIBC_PREREQ)
  38. +#if __GLIBC_PREREQ(2, 10)
  39. namespace GTM HIDDEN {
  40. #ifdef __x86_64__
  41. @@ -101,5 +104,6 @@ static inline void set_abi_disp(struct a
  42. } // namespace GTM
  43. #endif /* >= GLIBC 2.10 */
  44. +#endif
  45. #endif // LIBITM_X86_TLS_H