pkgsrc-WIP-changes archive

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

compiler-rt-netbsd: Rebase to SVN r. 325310



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Fri Feb 16 04:22:15 2018 +0100
Changeset:	0722566e42ae6b7f102dfa36b4db3f0734048603

Modified Files:
	compiler-rt-netbsd/Makefile
	compiler-rt-netbsd/distinfo
	compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
	compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__internal__defs.h
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
	compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__open.cc
	compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__openfiles.cc
Added Files:
	compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__unwind__linux__libcdep.cc
	compiler-rt-netbsd/patches/patch-lib_xray_xray__x86__64.cc
	compiler-rt-netbsd/patches/patch-test_xray_lit.cfg
Removed Files:
	compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__interceptors.cc

Log Message:
compiler-rt-netbsd: Rebase to SVN r. 325310

This commit adds support for X-Ray for NetBSD (untested) and rebases to head.

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=0722566e42ae6b7f102dfa36b4db3f0734048603

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

diffstat:
 compiler-rt-netbsd/Makefile                        |  2 +-
 compiler-rt-netbsd/distinfo                        | 22 +++++++-------
 .../patches/patch-cmake_config-ix.cmake            | 12 ++++++--
 .../patches/patch-lib_msan_msan__interceptors.cc   |  2 +-
 ...zer__common_sanitizer__common__interceptors.inc |  2 +-
 ...b_sanitizer__common_sanitizer__internal__defs.h |  4 +--
 ...zer__common_sanitizer__platform__interceptors.h |  2 +-
 ...__common_sanitizer__platform__limits__netbsd.cc |  2 +-
 ...r__common_sanitizer__platform__limits__netbsd.h |  2 +-
 ...er__common_sanitizer__unwind__linux__libcdep.cc | 13 +++++++++
 .../patch-lib_tsan_rtl_tsan__interceptors.cc       |  2 --
 .../patches/patch-lib_xray_xray__x86__64.cc        | 23 +++++++++++++++
 ...sanitizer__common_TestCases_NetBSD_kvm__open.cc |  2 +-
 ...izer__common_TestCases_NetBSD_kvm__openfiles.cc |  2 +-
 compiler-rt-netbsd/patches/patch-test_xray_lit.cfg | 34 ++++++++++++++++++++++
 15 files changed, 102 insertions(+), 24 deletions(-)

diffs:
diff --git a/compiler-rt-netbsd/Makefile b/compiler-rt-netbsd/Makefile
index b878526c8a..220919cbda 100644
--- a/compiler-rt-netbsd/Makefile
+++ b/compiler-rt-netbsd/Makefile
@@ -5,7 +5,7 @@ CATEGORIES=	lang devel
 
 SVN_REPOSITORIES=		compiler-rt
 SVN_REPO.compiler-rt=		http://llvm.org/svn/llvm-project/compiler-rt/trunk
-SVN_REVISION.compiler-rt=	325249
+SVN_REVISION.compiler-rt=	325310
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=	http://compiler-rt.llvm.org/
diff --git a/compiler-rt-netbsd/distinfo b/compiler-rt-netbsd/distinfo
index 7696ad221d..2ea597095d 100644
--- a/compiler-rt-netbsd/distinfo
+++ b/compiler-rt-netbsd/distinfo
@@ -1,19 +1,21 @@
 $NetBSD: distinfo,v 1.35 2015/09/11 01:21:57 tnn Exp $
 
-SHA1 (patch-cmake_config-ix.cmake) = 7425d12d9601544fe12d5f4e242682c085893b71
+SHA1 (patch-cmake_config-ix.cmake) = 537d4eb92fa618be3fe334adc339348424ba60d4
 SHA1 (patch-lib_fuzzer_tests_CMakeLists.txt) = 766b817c2ede73ca90d6e25a4b8330ed3d38b84b
-SHA1 (patch-lib_msan_msan__interceptors.cc) = 5d206fc01d0617659377ef041941ebbfe65860c5
+SHA1 (patch-lib_msan_msan__interceptors.cc) = 2bd1fb8c0c65ad044095f67c49829656197b3f98
 SHA1 (patch-lib_msan_msan__linux.cc) = 6fd2ada4a84d1e1cc47ec8f4e1f0608861c73c1a
-SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = 27638b9aea158c9b6843339e06711b913614d1a4
-SHA1 (patch-lib_sanitizer__common_sanitizer__internal__defs.h) = 513f4829a4846c6338779a62b2970ae17676f643
+SHA1 (patch-lib_sanitizer__common_sanitizer__common__interceptors.inc) = 38ff31d06c4ed85e2eb7b266fa47aab41350f11e
+SHA1 (patch-lib_sanitizer__common_sanitizer__internal__defs.h) = 307d786c6618a462ae2f2dfc004f91b0de8091c9
 SHA1 (patch-lib_sanitizer__common_sanitizer__linux.cc) = dc0884c32a1fee38b76664b437110a7ada3ec1ed
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = 8e75524b3d6322d043e1d32fd6e7befccf6a78f2
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 9404f92d15107709b367bfe8e02beeb450cff617
-SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 946334e112397be07298d6683f3b19b503bb3e7c
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__interceptors.h) = 558a7762c5aea4cca9eb0fe42f4d1b91937e4c28
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc) = 9336ec4a7e075155fe61c9005539f82af8ec46a8
+SHA1 (patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h) = 12593295cb2fa217b73b571855d6ceb32c39943d
 SHA1 (patch-lib_sanitizer__common_sanitizer__procmaps__freebsd.cc) = c6459f21789a5ef13e37714487c09110062c9c5d
+SHA1 (patch-lib_sanitizer__common_sanitizer__unwind__linux__libcdep.cc) = e520ec1e0fefb3cf9fb1d872ebf81952599a6c49
 SHA1 (patch-lib_scudo_scudo__platform.h) = 119d7ad8f8ca9d3e846dbdd7f805ca771e30e410
-SHA1 (patch-lib_tsan_rtl_tsan__interceptors.cc) = adc83b19e793491b1c6ea0fd8b46cd9f32e592fc
+SHA1 (patch-lib_xray_xray__x86__64.cc) = 088f35ff65f690509a8cba33ea885edec936d32d
 SHA1 (patch-test_lsan_lit.common.cfg) = b09b4ab3a97dc881b701a3583b0b126b8206cfe2
-SHA1 (patch-test_sanitizer__common_TestCases_NetBSD_kvm__open.cc) = a4469c2d0979f2927d7a60f1aa055bc2ef3c6aa9
-SHA1 (patch-test_sanitizer__common_TestCases_NetBSD_kvm__openfiles.cc) = 3cac676582afd316695fe26e5980bc3cb5403e41
+SHA1 (patch-test_sanitizer__common_TestCases_NetBSD_kvm__open.cc) = f9253e16ce5bd38e24a174c0d76f45e6b01ea310
+SHA1 (patch-test_sanitizer__common_TestCases_NetBSD_kvm__openfiles.cc) = a6004120ec1353ba8b605413c9ff2fda7664a653
 SHA1 (patch-test_scudo_lit.cfg) = 35e4f0524a8fd26e90e5d968b73d75f277da3779
+SHA1 (patch-test_xray_lit.cfg) = ebab42bf1210ed63e42b0d774bd524714300f8d4
diff --git a/compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake b/compiler-rt-netbsd/patches/patch-cmake_config-ix.cmake
index c4a19c4da9..349d6f2513 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	2018-02-01 23:45:59.000000000 +0000
+--- cmake/config-ix.cmake.orig	2018-02-15 16:00:57.000000000 +0000
 +++ cmake/config-ix.cmake
 @@ -542,7 +542,7 @@ else()
  endif()
@@ -11,7 +11,7 @@ $NetBSD$
    set(COMPILER_RT_HAS_PROFILE TRUE)
  else()
    set(COMPILER_RT_HAS_PROFILE FALSE)
-@@ -590,7 +590,7 @@ else()
+@@ -590,14 +590,14 @@ else()
  endif()
  
  if (COMPILER_RT_HAS_SANITIZER_COMMON AND SCUDO_SUPPORTED_ARCH AND
@@ -20,3 +20,11 @@ $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 "Darwin|Linux|FreeBSD")
++    OS_NAME MATCHES "Darwin|Linux|FreeBSD|NetBSD")
+   set(COMPILER_RT_HAS_XRAY TRUE)
+ else()
+   set(COMPILER_RT_HAS_XRAY FALSE)
diff --git a/compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc b/compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc
index 78fdaed8de..af8be221a3 100644
--- a/compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_msan_msan__interceptors.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- lib/msan/msan_interceptors.cc.orig	2018-02-15 04:24:49.968941526 +0000
+--- lib/msan/msan_interceptors.cc.orig	2018-02-15 04:24:49.000000000 +0000
 +++ lib/msan/msan_interceptors.cc
 @@ -33,11 +33,13 @@
  #include "sanitizer_common/sanitizer_libc.h"
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc
index 38239415ef..607774273b 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__common__interceptors.inc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_common_interceptors.inc.orig	2018-02-15 04:24:49.766953774 +0000
+--- lib/sanitizer_common/sanitizer_common_interceptors.inc.orig	2018-02-15 04:24:49.000000000 +0000
 +++ lib/sanitizer_common/sanitizer_common_interceptors.inc
 @@ -76,6 +76,11 @@
  #define ctime __ctime50
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__internal__defs.h b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__internal__defs.h
index c2b99ef542..2292c83e69 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__internal__defs.h
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__internal__defs.h
@@ -1,8 +1,8 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_internal_defs.h.orig	2018-02-10 18:57:25.000000000 +0000
+--- lib/sanitizer_common/sanitizer_internal_defs.h.orig	2018-02-15 16:00:57.000000000 +0000
 +++ lib/sanitizer_common/sanitizer_internal_defs.h
-@@ -186,7 +186,9 @@ typedef uptr tid_t;
+@@ -187,7 +187,9 @@ typedef uptr tid_t;
  // This header should NOT include any other headers to avoid portability issues.
  
  // Common defs.
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h
index 0ceae4ef17..d47abaae66 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__interceptors.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_platform_interceptors.h.orig	2018-02-15 04:24:49.767378479 +0000
+--- lib/sanitizer_common/sanitizer_platform_interceptors.h.orig	2018-02-15 04:24:49.000000000 +0000
 +++ lib/sanitizer_common/sanitizer_platform_interceptors.h
 @@ -443,6 +443,16 @@
  #define SANITIZER_INTERCEPT_FACCESSAT SI_NETBSD
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
index f2e3eb2449..77ff2a8f98 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc.orig	2018-02-15 04:24:49.762579545 +0000
+--- lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc.orig	2018-02-15 04:24:49.000000000 +0000
 +++ lib/sanitizer_common/sanitizer_platform_limits_netbsd.cc
 @@ -15,9 +15,15 @@
  #include "sanitizer_platform.h"
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
index 8dfbab4de2..684592ee0c 100644
--- a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__platform__limits__netbsd.h
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- lib/sanitizer_common/sanitizer_platform_limits_netbsd.h.orig	2018-02-15 04:24:49.763467018 +0000
+--- lib/sanitizer_common/sanitizer_platform_limits_netbsd.h.orig	2018-02-15 04:24:49.000000000 +0000
 +++ lib/sanitizer_common/sanitizer_platform_limits_netbsd.h
 @@ -60,6 +60,15 @@ extern unsigned struct_timespec_sz;
  extern unsigned struct_sembuf_sz;
diff --git a/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__unwind__linux__libcdep.cc b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__unwind__linux__libcdep.cc
new file mode 100644
index 0000000000..85b2dc39d1
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-lib_sanitizer__common_sanitizer__unwind__linux__libcdep.cc
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc.orig	2018-02-01 23:46:05.000000000 +0000
++++ lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc
+@@ -97,7 +97,7 @@ uptr Unwind_GetIP(struct _Unwind_Context
+   // Clear the Thumb bit.
+   return val & ~(uptr)1;
+ #else
+-  return _Unwind_GetIP(ctx);
++  return (uptr)_Unwind_GetIP(ctx);
+ #endif
+ }
+ 
diff --git a/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__interceptors.cc b/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__interceptors.cc
deleted file mode 100644
index afc76512f4..0000000000
--- a/compiler-rt-netbsd/patches/patch-lib_tsan_rtl_tsan__interceptors.cc
+++ /dev/null
@@ -1,2 +0,0 @@
-$NetBSD$
-
diff --git a/compiler-rt-netbsd/patches/patch-lib_xray_xray__x86__64.cc b/compiler-rt-netbsd/patches/patch-lib_xray_xray__x86__64.cc
new file mode 100644
index 0000000000..5fb409d04f
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-lib_xray_xray__x86__64.cc
@@ -0,0 +1,23 @@
+$NetBSD$
+
+--- lib/xray/xray_x86_64.cc.orig	2018-02-15 16:00:57.000000000 +0000
++++ lib/xray/xray_x86_64.cc
+@@ -3,7 +3,8 @@
+ #include "xray_defs.h"
+ #include "xray_interface_internal.h"
+ 
+-#if SANITIZER_FREEBSD
++#if SANITIZER_FREEBSD || SANITIZER_NETBSD
++#include <sys/types.h>
+ #include <sys/sysctl.h>
+ #endif
+ 
+@@ -76,7 +77,7 @@ uint64_t getTSCFrequency() XRAY_NEVER_IN
+   }
+   return TSCFrequency == -1 ? 0 : static_cast<uint64_t>(TSCFrequency);
+ }
+-#elif SANITIZER_FREEBSD
++#elif SANITIZER_FREEBSD || SANITIZER_NETBSD
+ uint64_t getTSCFrequency() XRAY_NEVER_INSTRUMENT {
+     long long TSCFrequency = -1;
+     size_t tscfreqsz = sizeof(TSCFrequency);
diff --git a/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__open.cc b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__open.cc
index 9a274b3e15..8eb99b4caf 100644
--- a/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__open.cc
+++ b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__open.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- test/sanitizer_common/TestCases/NetBSD/kvm_open.cc.orig	2018-02-15 04:25:01.587913560 +0000
+--- test/sanitizer_common/TestCases/NetBSD/kvm_open.cc.orig	2018-02-16 03:15:54.219171653 +0000
 +++ test/sanitizer_common/TestCases/NetBSD/kvm_open.cc
 @@ -0,0 +1,13 @@
 +// RUN: %clangxx -O0 -g %s -o %t && %run %t
diff --git a/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__openfiles.cc b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__openfiles.cc
index b83749d565..f952c495ea 100644
--- a/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__openfiles.cc
+++ b/compiler-rt-netbsd/patches/patch-test_sanitizer__common_TestCases_NetBSD_kvm__openfiles.cc
@@ -1,6 +1,6 @@
 $NetBSD$
 
---- test/sanitizer_common/TestCases/NetBSD/kvm_openfiles.cc.orig	2018-02-15 04:25:01.588058341 +0000
+--- test/sanitizer_common/TestCases/NetBSD/kvm_openfiles.cc.orig	2018-02-16 03:15:54.219296677 +0000
 +++ test/sanitizer_common/TestCases/NetBSD/kvm_openfiles.cc
 @@ -0,0 +1,13 @@
 +// RUN: %clangxx -O0 -g %s -o %t && %run %t
diff --git a/compiler-rt-netbsd/patches/patch-test_xray_lit.cfg b/compiler-rt-netbsd/patches/patch-test_xray_lit.cfg
new file mode 100644
index 0000000000..95203b261f
--- /dev/null
+++ b/compiler-rt-netbsd/patches/patch-test_xray_lit.cfg
@@ -0,0 +1,34 @@
+$NetBSD$
+
+--- test/xray/lit.cfg.orig	2018-02-16 03:15:54.219563913 +0000
++++ test/xray/lit.cfg
+@@ -20,6 +20,11 @@ def build_invocation(compile_flags):
+ llvm_xray = os.path.join(config.llvm_tools_dir, 'llvm-xray')
+ 
+ # Setup substitutions.
++if config.host_os == "Linux":
++  libdl_flag = "-ldl"
++else:
++  libdl_flag = ""
++
+ config.substitutions.append(
+     ('%clang ', build_invocation([config.target_cflags])))
+ config.substitutions.append(
+@@ -33,14 +38,14 @@ config.substitutions.append(
+     ('%llvm_xray', llvm_xray))
+ config.substitutions.append(
+     ('%xraylib',
+-        ('-lm -lpthread -ldl -lrt -L%s '
++        ('-lm -lpthread %s -lrt -L%s '
+          '-Wl,-whole-archive -lclang_rt.xray-%s -Wl,-no-whole-archive')
+-        % (config.compiler_rt_libdir, config.host_arch)))
++        % (libdl_flag, config.compiler_rt_libdir, config.host_arch)))
+ 
+ # Default test suffixes.
+ config.suffixes = ['.c', '.cc', '.cpp']
+ 
+-if config.host_os not in ['Linux']:
++if config.host_os not in ['FreeBSD', 'Linux', 'NetBSD']:
+   config.unsupported = True
+ elif '64' not in config.host_arch:
+   if 'arm' in config.host_arch:


Home | Main Index | Thread Index | Old Index