diff options
author | Austin Seipp <austin@well-typed.com> | 2014-01-30 07:03:29 -0600 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-01-30 07:03:31 -0600 |
commit | 48326cfb1ef4b455f81fbbece7a17dab17f7c932 (patch) | |
tree | 26183318d22962f199193504c71c0a09f16604c6 /rts/sm | |
parent | 9f58cecad296b268d25eb5519bc274493e4a8164 (diff) | |
download | haskell-48326cfb1ef4b455f81fbbece7a17dab17f7c932.tar.gz |
Fix iOS build (fallout from 28b031c506)
As Luke Iannini reported, the Clang iOS cross compiler apparently
doesn't support __thread for some bizarre reason, so unfortunately they
too must fall back to pthread_{get,set}specific.
Signed-off-by: Austin Seipp <austin@well-typed.com>
Diffstat (limited to 'rts/sm')
-rw-r--r-- | rts/sm/GCTDecl.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rts/sm/GCTDecl.h b/rts/sm/GCTDecl.h index affb852ba9..2489430dda 100644 --- a/rts/sm/GCTDecl.h +++ b/rts/sm/GCTDecl.h @@ -53,8 +53,11 @@ extern StgWord8 the_gc_thread[]; /* Now, llvm-gcc and some older Clang compilers do not support __thread. So we have to fallback to the extremely slow case, - unfortunately. Note: clang_CC_FLAVOR implies llvm_CC_FLAVOR */ -#if defined(llvm_CC_FLAVOR) && (CC_SUPPORTS_TLS == 0) + unfortunately. Note: clang_CC_FLAVOR implies llvm_CC_FLAVOR. + + Also, the iOS Clang compiler doesn't support __thread either for + some bizarre reason, so there's not much we can do about that... */ +#if (defined(llvm_CC_FLAVOR) && (CC_SUPPORTS_TLS == 0)) || defined(ios_HOST_OS) #define gct ((gc_thread *)(pthread_getspecific(gctKey))) #define SET_GCT(to) (pthread_setspecific(gctKey, to)) #define DECLARE_GCT ThreadLocalKey gctKey; |