Bug 1399031 - Remove the setting of NO_TLS when PIC is not defined in mozjemalloc: it's always defined. r?njn draft
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 12 Sep 2017 16:06:56 +0900
changeset 663486 f9bd2500d9c74581209be4be948fb9bfc38d72a4
parent 663485 2412bda447ee73078439b9c168b403253e1ef3e2
child 663487 a36bb31a8e3a84455796eb656cab0f7e33452553
push id79465
push userbmo:mh+mozilla@glandium.org
push dateWed, 13 Sep 2017 05:35:00 +0000
reviewersnjn
bugs1399031
milestone57.0a1
Bug 1399031 - Remove the setting of NO_TLS when PIC is not defined in mozjemalloc: it's always defined. r?njn But it's also useless besides that test, so remove the PIC define.
memory/build/mozjemalloc.cpp
--- a/memory/build/mozjemalloc.cpp
+++ b/memory/build/mozjemalloc.cpp
@@ -329,30 +329,24 @@ static pthread_key_t tlsIndex;
 
 /* Minimum alignment of non-tiny allocations is 2^QUANTUM_2POW_MIN bytes. */
 #  define QUANTUM_2POW_MIN      4
 #if defined(_WIN64) || defined(__LP64__)
 #  define SIZEOF_PTR_2POW       3
 #else
 #  define SIZEOF_PTR_2POW       2
 #endif
-#define PIC
 
 #define	SIZEOF_PTR		(1U << SIZEOF_PTR_2POW)
 
 /* sizeof(int) == (1U << SIZEOF_INT_2POW). */
 #ifndef SIZEOF_INT_2POW
 #  define SIZEOF_INT_2POW	2
 #endif
 
-/* We can't use TLS in non-PIC programs, since TLS relies on loader magic. */
-#if (!defined(PIC) && !defined(NO_TLS))
-#  define NO_TLS
-#endif
-
 /*
  * Size and alignment of memory chunks that are allocated by the OS's virtual
  * memory system.
  */
 #define	CHUNK_2POW_DEFAULT	20
 /* Maximum number of dirty pages per arena. */
 #define	DIRTY_MAX_DEFAULT	(1U << 8)