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
6 On behalf of Szabolcs Nagy.
8 2015-05-15 Gregor Richards <gregor.richards@uwaterloo.ca>
10 * config/i386/linux.h (MUSL_DYNAMIC_LINKER): Define.
11 * config/i386/linux64.h (MUSL_DYNAMIC_LINKER32): Define.
12 (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32): Define.
14 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223218 138bc75d-0d04-0410-961f-82ee72b054a4
16 gcc/config/i386/linux.h | 3 +++
17 gcc/config/i386/linux64.h | 7 +++++++
18 2 files changed, 10 insertions(+)
20 --- a/gcc/config/i386/linux.h
21 +++ b/gcc/config/i386/linux.h
22 @@ -21,3 +21,6 @@ along with GCC; see the file COPYING3.
24 #define GNU_USER_LINK_EMULATION "elf_i386"
25 #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
27 +#undef MUSL_DYNAMIC_LINKER
28 +#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1"
29 --- a/gcc/config/i386/linux64.h
30 +++ b/gcc/config/i386/linux64.h
31 @@ -30,3 +30,10 @@ see the files COPYING3 and COPYING.RUNTI
32 #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
33 #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
34 #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2"
36 +#undef MUSL_DYNAMIC_LINKER32
37 +#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1"
38 +#undef MUSL_DYNAMIC_LINKER64
39 +#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1"
40 +#undef MUSL_DYNAMIC_LINKERX32
41 +#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1"
42 --- a/libitm/config/linux/x86/tls.h
43 +++ b/libitm/config/linux/x86/tls.h
45 #ifndef LIBITM_X86_TLS_H
46 #define LIBITM_X86_TLS_H 1
48 -#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
49 +#if defined(__GLIBC_PREREQ)
50 +#if __GLIBC_PREREQ(2, 10)
51 /* Use slots in the TCB head rather than __thread lookups.
52 GLIBC has reserved words 10 through 13 for TM. */
53 #define HAVE_ARCH_GTM_THREAD 1
54 #define HAVE_ARCH_GTM_THREAD_DISP 1
58 #include "config/generic/tls.h"
60 -#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
61 +#if defined(__GLIBC_PREREQ)
62 +#if __GLIBC_PREREQ(2, 10)
63 namespace GTM HIDDEN {
66 @@ -101,5 +104,6 @@ static inline void set_abi_disp(struct a
69 #endif /* >= GLIBC 2.10 */
72 #endif // LIBITM_X86_TLS_H