pkgsrc-WIP-changes archive

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

compiler-rt-netbsd: Try to fix linking tsan on NetBSD/amd64



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Thu Oct 5 19:55:49 2017 +0200
Changeset:	936e143f56133333480d2297a6993f46bbe139bf

Modified Files:
	compiler-rt-netbsd/distinfo
	compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__platform__linux.cc
	compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl.cc
	compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl.h

Log Message:
compiler-rt-netbsd: Try to fix linking tsan on NetBSD/amd64

Experiment with cur_thread_placeholder and ctx_placeholder,
just disable __attribute__((tls_model("initial-exec"))).

Remove unneeded definition of __libc_stack_end, it's GLIBC specific.

Sponsored by <The NetBSD Foundation>

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=936e143f56133333480d2297a6993f46bbe139bf

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

diffstat:
 compiler-rt-netbsd/distinfo                                 |  6 +++---
 .../patches/patch-lib_tsan_rtl_tsan__platform__linux.cc     |  9 ---------
 compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl.cc  |  9 +++++----
 compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl.h   | 13 +++++++------
 4 files changed, 15 insertions(+), 22 deletions(-)

diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index 1e61aff31f..4e81044c0c 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -11,10 +11,10 @@ SHA1 (patch-lib_scudo_scudo__tsd__exclusive.inc) = a1af1e691e5b929500c0f21cc4e72
 SHA1 (patch-lib_tsan_dd_dd__interceptors.cc) = 9ff2f3c840e81ffd1cfd3c9f0e0869923383b07f
 SHA1 (patch-lib_tsan_go_buildgo.sh) = fe64b3389bbf6ae2ddf187df3e0600b2f817f51d
 SHA1 (patch-lib_tsan_rtl_tsan__platform.h) = 9ba65b81bb95bdf3b949da801cb9b97bf94174c4
-SHA1 (patch-lib_tsan_rtl_tsan__platform__linux.cc) = 21424d5506d02887a15183285ecb564d9560f215
+SHA1 (patch-lib_tsan_rtl_tsan__platform__linux.cc) = 23744bd656f0dcee425821491bcaa723f26130a3
 SHA1 (patch-lib_tsan_rtl_tsan__platform__posix.cc) = ddf48d91100e681f09b7303a37936ac8cd7f775a
-SHA1 (patch-lib_tsan_rtl_tsan__rtl.cc) = 4161d9ee4c68315925eb2d1f2b401b23db85b369
-SHA1 (patch-lib_tsan_rtl_tsan__rtl.h) = 8256bc84978fe19ccb5ec8177e2f0309709db4ae
+SHA1 (patch-lib_tsan_rtl_tsan__rtl.cc) = 84b4e985ca7cb5492735a3893f12042de0de2106
+SHA1 (patch-lib_tsan_rtl_tsan__rtl.h) = f9a366bf3c3d70bb00f8161459fa730256d76aaa
 SHA1 (patch-lib_tsan_rtl_tsan__rtl__amd64.S) = 95591667c23372ceb72334b2ceae800d32574ac6
 SHA1 (patch-lib_tsan_tests_rtl_tsan__test__util__posix.cc) = 302c72dab4fe5a0c94d7de0d728033e616811e5e
 SHA1 (patch-test_tsan_lit.cfg) = c849d08c3df59a3de45c6515e05c3d9fac5424e7
diff --git a/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__platform__linux.cc b/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__platform__linux.cc
index 4ee3f00a1d..31d6ff31b7 100644
--- a/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__platform__linux.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__platform__linux.cc
@@ -16,15 +16,6 @@ $NetBSD$
  #include "sanitizer_common/sanitizer_platform_limits_posix.h"
  #include "sanitizer_common/sanitizer_posix.h"
  #include "sanitizer_common/sanitizer_procmaps.h"
-@@ -62,7 +63,7 @@
- # undef sa_sigaction
- #endif
- 
--#if SANITIZER_FREEBSD
-+#if SANITIZER_FREEBSD || SANITIZER_NETBSD
- extern "C" void *__libc_stack_end;
- void *__libc_stack_end = 0;
- #endif
 @@ -401,4 +402,4 @@ void cur_thread_finalize() {
  
  }  // namespace __tsan
diff --git a/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl.cc b/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl.cc
index 82510d529a..cc0f461ff0 100644
--- a/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl.cc
@@ -2,12 +2,13 @@ $NetBSD$
 
 --- lib/tsan/rtl/tsan_rtl.cc.orig	2017-07-24 13:39:38.000000000 +0000
 +++ lib/tsan/rtl/tsan_rtl.cc
-@@ -45,7 +45,7 @@ extern "C" void __tsan_resume() {
- 
+@@ -46,7 +46,9 @@ extern "C" void __tsan_resume() {
  namespace __tsan {
  
--#if !SANITIZER_GO && !SANITIZER_MAC
-+#if !SANITIZER_GO && !SANITIZER_MAC && !SANITIZER_NETBSD
+ #if !SANITIZER_GO && !SANITIZER_MAC
++#if !SANITIZER_NETBSD
  __attribute__((tls_model("initial-exec")))
++#endif
  THREADLOCAL char cur_thread_placeholder[sizeof(ThreadState)] ALIGNED(64);
  #endif
+ static char ctx_placeholder[sizeof(Context)] ALIGNED(64);
diff --git a/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl.h b/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl.h
index 4329b2ab6f..bb2b60778d 100644
--- a/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl.h
+++ b/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__rtl.h
@@ -2,12 +2,13 @@ $NetBSD$
 
 --- lib/tsan/rtl/tsan_rtl.h.orig	2017-08-28 21:09:44.000000000 +0000
 +++ lib/tsan/rtl/tsan_rtl.h
-@@ -457,7 +457,7 @@ struct ThreadState {
- };
- 
- #if !SANITIZER_GO
--#if SANITIZER_MAC || SANITIZER_ANDROID
-+#if SANITIZER_MAC || SANITIZER_ANDROID || SANITIZER_NETBSD
+@@ -461,7 +461,9 @@ struct ThreadState {
  ThreadState *cur_thread();
  void cur_thread_finalize();
  #else
++#if !SANITIZER_NETBSD
+ __attribute__((tls_model("initial-exec")))
++#endif
+ extern THREADLOCAL char cur_thread_placeholder[];
+ INLINE ThreadState *cur_thread() {
+   return reinterpret_cast<ThreadState *>(&cur_thread_placeholder);


Home | Main Index | Thread Index | Old Index