Hack around clang powerpc tls_model("initial-exec") pic issue; this is gross.

This commit is contained in:
christos 2019-05-14 16:22:09 +00:00
parent 7c1902722a
commit 609a87cf96
1 changed files with 9 additions and 1 deletions

View File

@ -152,7 +152,15 @@
/* Non-empty if the tls_model attribute is supported. */
#if !defined(__vax__) && !defined(__mc68010__)
#define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec")))
# if defined(__clang__) && defined(__ppc__) && defined(__pic__)
/*
* XXX: In pic mode clang generates PPC32_GOT instead of PPC32_PICGOT for
* tls model initial-exec. It shouldn't; see PPCISelLowering.h
*/
# define JEMALLOC_TLS_MODEL __attribute__((tls_model("global-dynamic")))
# else
# define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec")))
# endif
#endif
/*