logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

0001-libitm-fixes-for-musl-support.patch (1606B)


  1. SPDX-FileCopyrightText: 2022 Dor Askayo <dor.askayo@gmail.com>
  2. SPDX-FileCopyrightText: 2015 Gregor Richards <gregor.richards@uwaterloo.ca>
  3. SPDX-License-Identifier: GPL-2.0-or-later
  4. Backported from upstream commit 96ce40cbce449cb5f434425d148a9bcf02270c96
  5. libitm fixes for musl support
  6. 2015-04-22 Gregor Richards <gregor.richards@uwaterloo.ca>
  7. * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h.
  8. * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined.
  9. From-SVN: r222325
  10. --- gcc-4.7.4/libitm/config/arm/hwcap.cc
  11. +++ gcc-4.7.4/libitm/config/arm/hwcap.cc
  12. @@ -40,7 +40,7 @@ int GTM_hwcap HIDDEN = 0
  13. #ifdef __linux__
  14. #include <unistd.h>
  15. -#include <sys/fcntl.h>
  16. +#include <fcntl.h>
  17. #include <elf.h>
  18. static void __attribute__((constructor))
  19. --- gcc-4.7.4/libitm/config/linux/x86/tls.h
  20. +++ gcc-4.7.4/libitm/config/linux/x86/tls.h
  21. @@ -25,16 +25,19 @@
  22. #ifndef LIBITM_X86_TLS_H
  23. #define LIBITM_X86_TLS_H 1
  24. -#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
  25. +#if defined(__GLIBC_PREREQ)
  26. +#if __GLIBC_PREREQ(2, 10)
  27. /* Use slots in the TCB head rather than __thread lookups.
  28. GLIBC has reserved words 10 through 13 for TM. */
  29. #define HAVE_ARCH_GTM_THREAD 1
  30. #define HAVE_ARCH_GTM_THREAD_DISP 1
  31. #endif
  32. +#endif
  33. #include "config/generic/tls.h"
  34. -#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
  35. +#if defined(__GLIBC_PREREQ)
  36. +#if __GLIBC_PREREQ(2, 10)
  37. namespace GTM HIDDEN {
  38. #ifdef __x86_64__
  39. @@ -101,5 +104,6 @@ static inline void set_abi_disp(struct abi_dispatch *x)
  40. } // namespace GTM
  41. #endif /* >= GLIBC 2.10 */
  42. +#endif
  43. #endif // LIBITM_X86_TLS_H