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
6 libitm fixes for musl support
8 On behalf of Szabolcs.Nagy@arm.com
10 2015-04-22 Gregor Richards <gregor.richards@uwaterloo.ca>
12 * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h.
13 * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined.
17 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222325 138bc75d-0d04-0410-961f-82ee72b054a4
20 --- a/libitm/config/arm/hwcap.cc
21 +++ b/libitm/config/arm/hwcap.cc
22 @@ -40,7 +40,7 @@ int GTM_hwcap HIDDEN = 0
26 -#include <sys/fcntl.h>
30 static void __attribute__((constructor))
31 --- a/libitm/config/linux/x86/tls.h
32 +++ b/libitm/config/linux/x86/tls.h
34 #ifndef LIBITM_X86_TLS_H
35 #define LIBITM_X86_TLS_H 1
37 -#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
38 +#if defined(__GLIBC_PREREQ)
39 +#if __GLIBC_PREREQ(2, 10)
40 /* Use slots in the TCB head rather than __thread lookups.
41 GLIBC has reserved words 10 through 13 for TM. */
42 #define HAVE_ARCH_GTM_THREAD 1
43 #define HAVE_ARCH_GTM_THREAD_DISP 1
47 #include "config/generic/tls.h"
49 -#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
50 +#if defined(__GLIBC_PREREQ)
51 +#if __GLIBC_PREREQ(2, 10)
52 namespace GTM HIDDEN {
55 @@ -101,5 +104,6 @@ static inline void set_abi_disp(struct a
58 #endif /* >= GLIBC 2.10 */
61 #endif // LIBITM_X86_TLS_H