[compiler-rt] 52b5fe5 - [compiler-rt] [netbsd] Define _RTLD_SOURCE to fix build

Kamil Rytarowski via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 24 19:10:03 PST 2019


Author: Kamil Rytarowski
Date: 2019-12-25T04:09:50+01:00
New Revision: 52b5fe5f45b1908e140e05a4eceaaac7002be768

URL: https://github.com/llvm/llvm-project/commit/52b5fe5f45b1908e140e05a4eceaaac7002be768
DIFF: https://github.com/llvm/llvm-project/commit/52b5fe5f45b1908e140e05a4eceaaac7002be768.diff

LOG: [compiler-rt] [netbsd] Define _RTLD_SOURCE to fix build

The TLS base (LWP private pointer) functions are namespaced and
hidden i.e. inside the _RTLD_SOURCE namespace.

Added: 
    

Modified: 
    compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
index cd503718205a..56d4b71849cf 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
@@ -28,6 +28,10 @@
 #include "sanitizer_placement_new.h"
 #include "sanitizer_procmaps.h"
 
+#if SANITIZER_NETBSD
+#define _RTLD_SOURCE  // Fast LWP private pointer getters in ThreadSelfTlsTcb().
+#endif
+
 #include <dlfcn.h>  // for dlsym()
 #include <link.h>
 #include <pthread.h>


        


More information about the llvm-commits mailing list