pkgsrc-WIP-changes archive

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

compiler-rt-netbsd: Enable more tests on NetBSD



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Tue Jun 20 01:36:41 2017 +0200
Changeset:	153309be8c50320ab900b3a5c146fd4a9b46f29e

Modified Files:
	compiler-rt-netbsd/distinfo
	compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
	compiler-rt-netbsd/patches/patch-test_sanitizer__common_CMakeLists.txt
Added Files:
	compiler-rt-netbsd/patches/patch-test_asan_TestCases_heavy__uar__test.cc
	compiler-rt-netbsd/patches/patch-test_asan_TestCases_non-executable-pc.cpp
	compiler-rt-netbsd/patches/patch-test_asan_TestCases_verbose-log-path__test.cc
	compiler-rt-netbsd/patches/patch-test_msan_ftime.cc
	compiler-rt-netbsd/patches/patch-test_msan_iconv.cc
	compiler-rt-netbsd/patches/patch-test_msan_initgroups.cc
	compiler-rt-netbsd/patches/patch-test_msan_lit.cfg
	compiler-rt-netbsd/patches/patch-test_profile_lit.cfg
	compiler-rt-netbsd/patches/patch-test_safestack_lit.cfg
	compiler-rt-netbsd/patches/patch-test_sanitizer__common_print__address.h
	compiler-rt-netbsd/patches/patch-test_tsan_lit.cfg
	compiler-rt-netbsd/patches/patch-test_tsan_tls__race.cc
	compiler-rt-netbsd/patches/patch-test_tsan_tls__race2.cc

Log Message:
compiler-rt-netbsd: Enable more tests on NetBSD

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=153309be8c50320ab900b3a5c146fd4a9b46f29e

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

diffstat:
 compiler-rt-netbsd/distinfo                        | 17 +++++-
 .../patches/patch-cmake_config-ix.cmake            | 69 +++++++++++++++++++++-
 .../patch-test_asan_TestCases_heavy__uar__test.cc  | 13 ++++
 ...patch-test_asan_TestCases_non-executable-pc.cpp | 15 +++++
 ...h-test_asan_TestCases_verbose-log-path__test.cc | 13 ++++
 .../patches/patch-test_msan_ftime.cc               | 12 ++++
 .../patches/patch-test_msan_iconv.cc               | 15 +++++
 .../patches/patch-test_msan_initgroups.cc          | 13 ++++
 compiler-rt-netbsd/patches/patch-test_msan_lit.cfg | 15 +++++
 .../patches/patch-test_profile_lit.cfg             | 13 ++++
 .../patches/patch-test_safestack_lit.cfg           | 15 +++++
 .../patch-test_sanitizer__common_CMakeLists.txt    |  8 ++-
 .../patch-test_sanitizer__common_print__address.h  | 13 ++++
 compiler-rt-netbsd/patches/patch-test_tsan_lit.cfg | 15 +++++
 .../patches/patch-test_tsan_tls__race.cc           | 10 ++++
 .../patches/patch-test_tsan_tls__race2.cc          | 10 ++++
 16 files changed, 260 insertions(+), 6 deletions(-)

diffs:
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index 7936aa4bbd..8ca98a6ca8 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -12,7 +12,7 @@ Size (libcxx-3.6.2.src.tar.xz) = 944020 bytes
 SHA1 (llvm-3.6.2.src.tar.xz) = 7a00257eb2bc9431e4c77c3a36b033072c54bc7e
 RMD160 (llvm-3.6.2.src.tar.xz) = 521cbc5fe2925ea3c6e90c7a31f752a04045c972
 Size (llvm-3.6.2.src.tar.xz) = 12802380 bytes
-SHA1 (patch-cmake_config-ix.cmake) = 6b0644c422eaf3e2721398c2575e31e07b535984
+SHA1 (patch-cmake_config-ix.cmake) = fd4446fb9da3d6ffc01685bbccaf626566cee6b5
 SHA1 (patch-lib_asan_asan__interceptors.h) = cca1e74041e37d366c512d23547063d6a4dee008
 SHA1 (patch-lib_asan_asan__linux.cc) = fcbf780af6bcd3b43c86d9e5e2c8a92e3a8885da
 SHA1 (patch-lib_asan_scripts_asan__symbolize.py) = d6c079e7092b22b5379293dbb8d1e2445e077932
@@ -34,6 +34,19 @@ SHA1 (patch-lib_sanitizer__common_sanitizer__syscall__generic.inc) = 73db63809d0
 SHA1 (patch-lib_tsan_rtl_tsan__interceptors.cc) = f42a6732e8b95ba63fec8819a5be2bbd6518d610
 SHA1 (patch-lib_tsan_rtl_tsan__platform__linux.cc) = 3bb2c418b3d4bedad9014309abdd2cbad58b252c
 SHA1 (patch-lib_ubsan_ubsan__platform.h) = 8b9419ed6d3f40357eb73e71680d070bd64bd5cc
+SHA1 (patch-test_asan_TestCases_heavy__uar__test.cc) = 080def2df403f087152a28ad0a678d36ba9cf5bd
+SHA1 (patch-test_asan_TestCases_non-executable-pc.cpp) = 9812e7dd4a584a3a51e43ef54331b23dbe32778a
+SHA1 (patch-test_asan_TestCases_verbose-log-path__test.cc) = c44b2245b1bf03caddf74cb37cad4122ee877593
 SHA1 (patch-test_asan_lit.cfg) = 259b0e262b5975b862a51f015ec6b646ce2af10a
-SHA1 (patch-test_sanitizer__common_CMakeLists.txt) = 6af4c5ca42f17bb09823c36bf32d5576fbc0b4c8
+SHA1 (patch-test_msan_ftime.cc) = d47efaedd6a5eff178d74d3ace45dc204ef484ae
+SHA1 (patch-test_msan_iconv.cc) = c93283b98af0c011b85048a9cea9f19d8f1a24ba
+SHA1 (patch-test_msan_initgroups.cc) = f79818e43593692dea95391b9c407353e69d2085
+SHA1 (patch-test_msan_lit.cfg) = 1dce33544537b11ae7d73a3dabeb6a5781bb6b49
+SHA1 (patch-test_profile_lit.cfg) = 3e2258f824b37cc66dc460a21b5eaed0d1d85f6b
+SHA1 (patch-test_safestack_lit.cfg) = 3c70326672bee0e8167cdb13f8aa32e56a09bf9e
+SHA1 (patch-test_sanitizer__common_CMakeLists.txt) = db49cd6d3eb4729eae14e6d92e71576c4e53f78a
+SHA1 (patch-test_sanitizer__common_print__address.h) = f49afc10c532f76b4b0d17b5dfc7e7237675dd7f
+SHA1 (patch-test_tsan_lit.cfg) = 26e7d54d1417ac4634cf1bf8d4713ef7165d0bf6
+SHA1 (patch-test_tsan_tls__race.cc) = 637f7bae561a1e6a760837a242026d967b4fed0c
+SHA1 (patch-test_tsan_tls__race2.cc) = 0006e6f20b193268e9c73e404716ee59d4ca48d2
 SHA1 (patch-test_ubsan_lit.common.cfg) = d60d738aaf8525cf3f5f028dc2fc2fe54a7d691b
diff --git a/compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake b/compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
index d77b1d0d71..87539a1616 100644
--- a/compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
+++ b/compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- cmake/config-ix.cmake.orig	2017-06-03 23:53:56.000000000 +0000
+--- cmake/config-ix.cmake.orig	2017-06-19 18:04:05.000000000 +0000
 +++ cmake/config-ix.cmake
 @@ -441,7 +441,7 @@ set(COMPILER_RT_SANITIZERS_TO_BUILD ${AL
  list_replace(COMPILER_RT_SANITIZERS_TO_BUILD all "${ALL_SANITIZERS}")
@@ -20,7 +20,32 @@ $NetBSD$
    set(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME TRUE)
  else()
    set(COMPILER_RT_ASAN_HAS_STATIC_RUNTIME FALSE)
-@@ -504,7 +504,7 @@ else()
+@@ -476,7 +476,7 @@ else()
+ endif()
+ 
+ if (COMPILER_RT_HAS_SANITIZER_COMMON AND LSAN_SUPPORTED_ARCH AND
+-    OS_NAME MATCHES "Darwin|Linux|FreeBSD")
++    OS_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD")
+   set(COMPILER_RT_HAS_LSAN TRUE)
+ else()
+   set(COMPILER_RT_HAS_LSAN FALSE)
+@@ -490,56 +490,56 @@ else()
+ endif()
+ 
+ if (PROFILE_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND
+-    OS_NAME MATCHES "Darwin|Linux|FreeBSD|Windows|Android")
++    OS_NAME MATCHES "Darwin|Linux|FreeBSD|Windows|Android|NetBSD")
+   set(COMPILER_RT_HAS_PROFILE TRUE)
+ else()
+   set(COMPILER_RT_HAS_PROFILE FALSE)
+ endif()
+ 
+ if (COMPILER_RT_HAS_SANITIZER_COMMON AND TSAN_SUPPORTED_ARCH AND
+-    OS_NAME MATCHES "Darwin|Linux|FreeBSD|Android")
++    OS_NAME MATCHES "Darwin|Linux|FreeBSD|Android|NetBSD")
+   set(COMPILER_RT_HAS_TSAN TRUE)
+ else()
+   set(COMPILER_RT_HAS_TSAN FALSE)
  endif()
  
  if (COMPILER_RT_HAS_SANITIZER_COMMON AND UBSAN_SUPPORTED_ARCH AND
@@ -29,3 +54,43 @@ $NetBSD$
    set(COMPILER_RT_HAS_UBSAN TRUE)
  else()
    set(COMPILER_RT_HAS_UBSAN FALSE)
+ endif()
+ 
+ if (COMPILER_RT_HAS_SANITIZER_COMMON AND SAFESTACK_SUPPORTED_ARCH AND
+-    OS_NAME MATCHES "Darwin|Linux|FreeBSD")
++    OS_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD")
+   set(COMPILER_RT_HAS_SAFESTACK TRUE)
+ else()
+   set(COMPILER_RT_HAS_SAFESTACK FALSE)
+ endif()
+ 
+ if (COMPILER_RT_HAS_SANITIZER_COMMON AND CFI_SUPPORTED_ARCH AND
+-    OS_NAME MATCHES "Linux")
++    OS_NAME MATCHES "Linux|NetBSD")
+   set(COMPILER_RT_HAS_CFI TRUE)
+ else()
+   set(COMPILER_RT_HAS_CFI FALSE)
+ endif()
+ 
+ if (COMPILER_RT_HAS_SANITIZER_COMMON AND ESAN_SUPPORTED_ARCH AND
+-    OS_NAME MATCHES "Linux")
++    OS_NAME MATCHES "Linux|NetBSD")
+   set(COMPILER_RT_HAS_ESAN TRUE)
+ else()
+   set(COMPILER_RT_HAS_ESAN FALSE)
+ endif()
+ 
+ if (COMPILER_RT_HAS_SANITIZER_COMMON AND SCUDO_SUPPORTED_ARCH AND
+-    OS_NAME MATCHES "Linux")
++    OS_NAME MATCHES "Linux|NetBSD")
+   set(COMPILER_RT_HAS_SCUDO TRUE)
+ else()
+   set(COMPILER_RT_HAS_SCUDO FALSE)
+ endif()
+ 
+ if (COMPILER_RT_HAS_SANITIZER_COMMON AND XRAY_SUPPORTED_ARCH AND
+-    OS_NAME MATCHES "Linux")
++    OS_NAME MATCHES "Linux|NetBSD")
+   set(COMPILER_RT_HAS_XRAY TRUE)
+ else()
+   set(COMPILER_RT_HAS_XRAY FALSE)
diff --git a/compiler-rt-netbsd/patches/patch-test_asan_TestCases_heavy__uar__test.cc b/compiler-rt-netbsd/patches/patch-test_asan_TestCases_heavy__uar__test.cc
new file mode 100644
index 0000000000..3db39c7c5a
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_asan_TestCases_heavy__uar__test.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- test/asan/TestCases/heavy_uar_test.cc.orig	2017-06-03 23:53:55.000000000 +0000
++++ test/asan/TestCases/heavy_uar_test.cc
+@@ -49,7 +49,7 @@ int main(int argc, char **argv) {
+     RecursiveFunctionWithStackFrame<2000>(depth);
+     // The stack size is tight for the main thread in multithread
+     // environment on FreeBSD.
+-#if !defined(__FreeBSD__)
++#if !defined(__FreeBSD__) // XXX: NetBSD?
+     RecursiveFunctionWithStackFrame<5000>(depth);
+     RecursiveFunctionWithStackFrame<10000>(depth);
+ #endif
diff --git a/compiler-rt-netbsd/patches/patch-test_asan_TestCases_non-executable-pc.cpp b/compiler-rt-netbsd/patches/patch-test_asan_TestCases_non-executable-pc.cpp
new file mode 100644
index 0000000000..e12ffb87ad
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_asan_TestCases_non-executable-pc.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- test/asan/TestCases/non-executable-pc.cpp.orig	2017-06-03 23:53:56.000000000 +0000
++++ test/asan/TestCases/non-executable-pc.cpp
+@@ -2,8 +2,8 @@
+ // RUN: not %run %t 0 2>&1 | FileCheck %s
+ // RUN: not %run %t n 2>&1 | FileCheck %s -check-prefix=CHECK -check-prefix=NON_EXEC
+ 
+-// Only Linux and FreeBSD list every memory region in MemoryMappingLayout, for now.
+-// REQUIRES: linux || freebsd
++// Only Linux, FreeBSD and NetBSD list every memory region in MemoryMappingLayout, for now.
++// REQUIRES: linux || freebsd || netbsd
+ 
+ #include <assert.h>
+ 
diff --git a/compiler-rt-netbsd/patches/patch-test_asan_TestCases_verbose-log-path__test.cc b/compiler-rt-netbsd/patches/patch-test_asan_TestCases_verbose-log-path__test.cc
new file mode 100644
index 0000000000..685d10e169
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_asan_TestCases_verbose-log-path__test.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- test/asan/TestCases/verbose-log-path_test.cc.orig	2017-06-03 23:53:56.000000000 +0000
++++ test/asan/TestCases/verbose-log-path_test.cc
+@@ -8,7 +8,7 @@
+ // RUN: %env_asan_opts=log_path=%T/asan.log:log_exe_name=1 not %run %T/verbose-log-path_test-binary 2> %t.out
+ // RUN: FileCheck %s --check-prefix=CHECK-ERROR < %T/asan.log.verbose-log-path_test-binary.*
+ 
+-// FIXME: only FreeBSD and Linux have verbose log paths now.
++// FIXME: only FreeBSD, NetBSD and Linux have verbose log paths now.
+ // XFAIL: win32,android
+ // UNSUPPORTED: ios
+ 
diff --git a/compiler-rt-netbsd/patches/patch-test_msan_ftime.cc b/compiler-rt-netbsd/patches/patch-test_msan_ftime.cc
new file mode 100644
index 0000000000..c9808f7ab2
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_msan_ftime.cc
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- test/msan/ftime.cc.orig	2017-06-03 23:53:55.000000000 +0000
++++ test/msan/ftime.cc
+@@ -1,6 +1,6 @@
+ // RUN: %clangxx_msan -O0 -g %s -o %t && %run %t
+ 
+-// ftime() is deprecated on FreeBSD.
++// ftime() is deprecated on FreeBSD/NetBSD.
+ // XFAIL: freebsd
+ 
+ #include <assert.h>
diff --git a/compiler-rt-netbsd/patches/patch-test_msan_iconv.cc b/compiler-rt-netbsd/patches/patch-test_msan_iconv.cc
new file mode 100644
index 0000000000..66273a8991
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_msan_iconv.cc
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- test/msan/iconv.cc.orig	2017-06-03 23:53:55.000000000 +0000
++++ test/msan/iconv.cc
+@@ -15,8 +15,8 @@ int main(void) {
+   char inbuf_[100];
+   strcpy(inbuf_, "sample text");
+   char outbuf_[100];
+-#if defined(__FreeBSD__)
+-  // FreeBSD's iconv() expects the 2nd argument be of type 'const char**'.
++#if defined(__FreeBSD__) || defined(__NetBSD__)
++  // FreeBSD/NetBSD's iconv() expects the 2nd argument be of type 'const char**'.
+   const char *inbuf = inbuf_;
+ #else
+   char *inbuf = inbuf_;
diff --git a/compiler-rt-netbsd/patches/patch-test_msan_initgroups.cc b/compiler-rt-netbsd/patches/patch-test_msan_initgroups.cc
new file mode 100644
index 0000000000..b138735fa9
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_msan_initgroups.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- test/msan/initgroups.cc.orig	2017-06-03 23:53:55.000000000 +0000
++++ test/msan/initgroups.cc
+@@ -2,7 +2,7 @@
+ 
+ #include <sys/types.h>
+ #include <grp.h>
+-#include <unistd.h>  // FreeBSD declares initgroups() here.
++#include <unistd.h>  // FreeBSD/NetBSD declares initgroups() here.
+ 
+ int main(void) {
+   initgroups("root", 0);
diff --git a/compiler-rt-netbsd/patches/patch-test_msan_lit.cfg b/compiler-rt-netbsd/patches/patch-test_msan_lit.cfg
new file mode 100644
index 0000000000..9684bee415
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_msan_lit.cfg
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- test/msan/lit.cfg.orig	2017-06-03 23:53:55.000000000 +0000
++++ test/msan/lit.cfg
+@@ -15,8 +15,8 @@ clang_msan_cflags = (["-fsanitize=memory
+                       "-fno-optimize-sibling-calls"] +
+                       [config.target_cflags] +
+                       config.debug_info_flags)
+-# Some Msan tests leverage backtrace() which requires libexecinfo on FreeBSD.
+-if config.host_os == 'FreeBSD':
++# Some Msan tests leverage backtrace() which requires libexecinfo on FreeBSD/NetBSD.
++if config.host_os == 'FreeBSD' or config.host_os == 'NetBSD':
+   clang_msan_cflags += ["-lexecinfo"]
+ clang_msan_cxxflags = config.cxx_mode_flags + clang_msan_cflags
+ 
diff --git a/compiler-rt-netbsd/patches/patch-test_profile_lit.cfg b/compiler-rt-netbsd/patches/patch-test_profile_lit.cfg
new file mode 100644
index 0000000000..425f31bff5
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_profile_lit.cfg
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- test/profile/lit.cfg.orig	2017-06-03 23:53:55.000000000 +0000
++++ test/profile/lit.cfg
+@@ -78,7 +78,7 @@ config.substitutions.append( ("%clangxx_
+ 
+ config.substitutions.append( ("%clang_lto_profgen=", build_invocation(clang_cflags, True) + " -fprofile-instr-generate=") )
+ 
+-if config.host_os not in ['Darwin', 'FreeBSD', 'Linux']:
++if config.host_os not in ['Darwin', 'FreeBSD', 'Linux', 'NetBSD']:
+   config.unsupported = True
+ 
+ if config.target_arch in ['armv7l']:
diff --git a/compiler-rt-netbsd/patches/patch-test_safestack_lit.cfg b/compiler-rt-netbsd/patches/patch-test_safestack_lit.cfg
new file mode 100644
index 0000000000..157e86c462
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_safestack_lit.cfg
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- test/safestack/lit.cfg.orig	2017-06-03 23:53:55.000000000 +0000
++++ test/safestack/lit.cfg
+@@ -18,8 +18,8 @@ config.substitutions.append( ("%clang_sa
+ if config.lto_supported:
+   config.substitutions.append((r"%clang_lto_safestack ", ' '.join(config.lto_launch + [config.clang] + config.lto_flags + ['-fsanitize=safe-stack '])))
+ 
+-# SafeStack tests are currently supported on Linux, FreeBSD and Darwin only.
+-if config.host_os not in ['Linux', 'FreeBSD', 'Darwin']:
++# SafeStack tests are currently supported on Linux, FreeBSD, NetBSD and Darwin only.
++if config.host_os not in ['Linux', 'FreeBSD', 'Darwin', 'NetBSD']:
+    config.unsupported = True
+ 
+ # Allow tests to use REQUIRES=stable-runtime.  For use when you cannot use XFAIL
diff --git a/compiler-rt-netbsd/patches/patch-test_sanitizer__common_CMakeLists.txt b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_CMakeLists.txt
index 73decb1958..ea72725428 100644
--- a/compiler-rt-netbsd/patches/patch-test_sanitizer__common_CMakeLists.txt
+++ b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_CMakeLists.txt
@@ -2,7 +2,7 @@ $NetBSD$
 
 --- test/sanitizer_common/CMakeLists.txt.orig	2017-06-03 23:53:55.000000000 +0000
 +++ test/sanitizer_common/CMakeLists.txt
-@@ -4,7 +4,7 @@ set(SANITIZER_COMMON_TEST_DEPS ${SANITIZ
+@@ -4,10 +4,10 @@ set(SANITIZER_COMMON_TEST_DEPS ${SANITIZ
  set(SANITIZER_COMMON_TESTSUITES)
  
  set(SUPPORTED_TOOLS)
@@ -10,4 +10,8 @@ $NetBSD$
 +if(CMAKE_SYSTEM_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD" AND NOT ANDROID)
    list(APPEND SUPPORTED_TOOLS asan)
  endif()
- if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT ANDROID)
+-if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT ANDROID)
++if(CMAKE_SYSTEM_NAME MATCHES "Linux|NetBSD" AND NOT ANDROID)
+   list(APPEND SUPPORTED_TOOLS tsan)
+   list(APPEND SUPPORTED_TOOLS msan)
+   list(APPEND SUPPORTED_TOOLS lsan)
diff --git a/compiler-rt-netbsd/patches/patch-test_sanitizer__common_print__address.h b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_print__address.h
new file mode 100644
index 0000000000..fec047da8d
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_print__address.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- test/sanitizer_common/print_address.h.orig	2017-06-03 23:53:55.000000000 +0000
++++ test/sanitizer_common/print_address.h
+@@ -8,7 +8,7 @@ void print_address(const char *str, int 
+   while (n--) {
+     void *p = va_arg(ap, void *);
+ #if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
+-    // On FreeBSD, the %p conversion specifier works as 0x%x and thus does not
++    // On FreeBSD/NetBSD, the %p conversion specifier works as 0x%x and thus does not
+     // match to the format used in the diagnotic message.
+     fprintf(stderr, "0x%012lx ", (unsigned long) p);
+ #elif defined(__i386__) || defined(__arm__)
diff --git a/compiler-rt-netbsd/patches/patch-test_tsan_lit.cfg b/compiler-rt-netbsd/patches/patch-test_tsan_lit.cfg
new file mode 100644
index 0000000000..77673e4cf9
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_tsan_lit.cfg
@@ -0,0 +1,15 @@
+$NetBSD$
+
+--- test/tsan/lit.cfg.orig	2017-06-03 23:53:55.000000000 +0000
++++ test/tsan/lit.cfg
+@@ -79,8 +79,8 @@ config.substitutions.append( ("%deflake 
+ # Default test suffixes.
+ config.suffixes = ['.c', '.cc', '.cpp', '.m', '.mm']
+ 
+-# ThreadSanitizer tests are currently supported on FreeBSD, Linux and Darwin.
+-if config.host_os not in ['FreeBSD', 'Linux', 'Darwin']:
++# ThreadSanitizer tests are currently supported on FreeBSD, NetBSD, Linux and Darwin.
++if config.host_os not in ['FreeBSD', 'Linux', 'Darwin', 'NetBSD']:
+   config.unsupported = True
+ 
+ # Allow tests to use REQUIRES=stable-runtime.  For use when you cannot use XFAIL
diff --git a/compiler-rt-netbsd/patches/patch-test_tsan_tls__race.cc b/compiler-rt-netbsd/patches/patch-test_tsan_tls__race.cc
new file mode 100644
index 0000000000..d3c4b74d9d
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_tsan_tls__race.cc
@@ -0,0 +1,10 @@
+$NetBSD$
+
+--- test/tsan/tls_race.cc.orig	2017-06-03 23:53:55.000000000 +0000
++++ test/tsan/tls_race.cc
+@@ -20,4 +20,5 @@ int main() {
+ // CHECK: WARNING: ThreadSanitizer: data race
+ // CHECK-Linux:   Location is TLS of main thread.
+ // CHECK-FreeBSD:   Location is TLS of main thread.
++// CHECK-NetBSD:   Location is TLS of main thread.
+ // CHECK-Darwin:   Location is heap block of size 4
diff --git a/compiler-rt-netbsd/patches/patch-test_tsan_tls__race2.cc b/compiler-rt-netbsd/patches/patch-test_tsan_tls__race2.cc
new file mode 100644
index 0000000000..96191826a5
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_tsan_tls__race2.cc
@@ -0,0 +1,10 @@
+$NetBSD$
+
+--- test/tsan/tls_race2.cc.orig	2017-06-03 23:53:55.000000000 +0000
++++ test/tsan/tls_race2.cc
+@@ -27,4 +27,5 @@ int main() {
+ // CHECK: WARNING: ThreadSanitizer: data race
+ // CHECK-Linux:   Location is TLS of thread T1.
+ // CHECK-FreeBSD:   Location is TLS of thread T1.
++// CHECK-NetBSD:   Location is TLS of thread T1.
+ // CHECK-Darwin:   Location is heap block of size 4


Home | Main Index | Thread Index | Old Index