Module Name:    src
Committed By:   christos
Date:           Tue May 14 16:22:09 UTC 2019

Modified Files:
        src/external/bsd/jemalloc/include/jemalloc/internal:
            jemalloc_internal_defs.h

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


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
    src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h
diff -u src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.9 src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.10
--- src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h:1.9	Sun May  5 14:14:19 2019
+++ src/external/bsd/jemalloc/include/jemalloc/internal/jemalloc_internal_defs.h	Tue May 14 12:22:09 2019
@@ -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
 
 /*

Reply via email to