Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/jemalloc/include/jemalloc/internal Hack around ...



details:   https://anonhg.NetBSD.org/src/rev/04429a81d6d9
branches:  trunk
changeset: 451298:04429a81d6d9
user:      christos <christos%NetBSD.org@localhost>
date:      Tue May 14 16:22:09 2019 +0000

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

diffstat:

 external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r 60516c03b5b2 -r 04429a81d6d9 external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
--- a/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h  Tue May 14 15:41:23 2019 +0000
+++ b/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h  Tue May 14 16:22:09 2019 +0000
@@ -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
 
 /*



Home | Main Index | Thread Index | Old Index