Index: src/macros.h ================================================================== --- src/macros.h +++ src/macros.h @@ -66,10 +66,18 @@ #elif defined(OF_HAVE___THREAD) # define OF_HAVE_COMPILER_TLS # define thread_local __thread #endif +/* + * Do not use compiler TLS when targeting the iOS simulator, as the iOS 9 + * simulator does not support it (fails at runtime). + */ +#if defined(OF_HAVE_COMPILER_TLS) && defined(OF_IOS) && defined(OF_X86) +# undef OF_HAVE_COMPILER_TLS +#endif + #ifdef __GNUC__ # define OF_INLINE inline __attribute__((__always_inline__)) # define OF_LIKELY(cond) (__builtin_expect(!!(cond), 1)) # define OF_UNLIKELY(cond) (__builtin_expect(!!(cond), 0)) # define OF_CONST_FUNC __attribute__((__const__))