pkgsrc-WIP-changes archive

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

llvm-netbsd: Update to SVN r. 311941



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Tue Aug 29 02:15:03 2017 +0200
Changeset:	3f77ff6d7c410679ec2096c783c37c14dc3080a5

Modified Files:
	llvm-netbsd/Makefile.common
	llvm-netbsd/PLIST
	llvm-netbsd/distinfo
Added Files:
	llvm-netbsd/patches/patch-lib_Transforms_Instrumentation_InstrProfiling.cpp
	llvm-netbsd/patches/patch-lib_Transforms_Instrumentation_MemorySanitizer.cpp
Removed Files:
	llvm-netbsd/patches/patch-lib_Transforms_Instrumentation_AddressSanitizer.cpp

Log Message:
llvm-netbsd: Update to SVN r. 311941

Remove merged patch for asan.
Add two draft patches for profiling and msan.

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=3f77ff6d7c410679ec2096c783c37c14dc3080a5

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

diffstat:
 llvm-netbsd/Makefile.common                        |  2 +-
 llvm-netbsd/PLIST                                  |  6 +++
 llvm-netbsd/distinfo                               |  3 +-
 ...Transforms_Instrumentation_AddressSanitizer.cpp | 29 -------------
 ...b_Transforms_Instrumentation_InstrProfiling.cpp | 12 ++++++
 ..._Transforms_Instrumentation_MemorySanitizer.cpp | 47 ++++++++++++++++++++++
 6 files changed, 68 insertions(+), 31 deletions(-)

diffs:
diff --git a/llvm-netbsd/Makefile.common b/llvm-netbsd/Makefile.common
index a7ea9b341d..3c6f35dd10 100644
--- a/llvm-netbsd/Makefile.common
+++ b/llvm-netbsd/Makefile.common
@@ -19,7 +19,7 @@ CATEGORIES=	lang devel
 
 SVN_REPOSITORIES=	llvm
 SVN_REPO.llvm=		http://llvm.org/svn/llvm-project/llvm/trunk
-SVN_REVISION.llvm=	311235
+SVN_REVISION.llvm=	311941
 
 WRKSRC=			${WRKDIR}/llvm
 
diff --git a/llvm-netbsd/PLIST b/llvm-netbsd/PLIST
index af8b97f0ca..a711ab8d6c 100644
--- a/llvm-netbsd/PLIST
+++ b/llvm-netbsd/PLIST
@@ -633,6 +633,11 @@ include/llvm/ExecutionEngine/RTDyldMemoryManager.h
 include/llvm/ExecutionEngine/RuntimeDyld.h
 include/llvm/ExecutionEngine/RuntimeDyldChecker.h
 include/llvm/ExecutionEngine/SectionMemoryManager.h
+include/llvm/FuzzMutate/IRMutator.h
+include/llvm/FuzzMutate/OpDescriptor.h
+include/llvm/FuzzMutate/Operations.h
+include/llvm/FuzzMutate/Random.h
+include/llvm/FuzzMutate/RandomIRBuilder.h
 include/llvm/IR/Argument.h
 include/llvm/IR/AssemblyAnnotationWriter.h
 include/llvm/IR/Attributes.gen
@@ -1253,6 +1258,7 @@ lib/libLLVMDebugInfoPDB.a
 lib/libLLVMDemangle.a
 lib/libLLVMDlltoolDriver.a
 lib/libLLVMExecutionEngine.a
+lib/libLLVMFuzzMutate.a
 lib/libLLVMGlobalISel.a
 ${PLIST.Hexagon}lib/libLLVMHexagonAsmParser.a
 ${PLIST.Hexagon}lib/libLLVMHexagonCodeGen.a
diff --git a/llvm-netbsd/distinfo b/llvm-netbsd/distinfo
index d8c2b7ca0a..2fb983d9ce 100644
--- a/llvm-netbsd/distinfo
+++ b/llvm-netbsd/distinfo
@@ -12,4 +12,5 @@ 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-lib_Transforms_Instrumentation_AddressSanitizer.cpp) = 59ea4dfec39b00a29f69be761310bae545ab11e1
+SHA1 (patch-lib_Transforms_Instrumentation_InstrProfiling.cpp) = 871b474f415d9dc468cc07477101f88d7a20868b
+SHA1 (patch-lib_Transforms_Instrumentation_MemorySanitizer.cpp) = 64fdbb55c77d5f5f73152d2f8daa28adfc428e40
diff --git a/llvm-netbsd/patches/patch-lib_Transforms_Instrumentation_AddressSanitizer.cpp b/llvm-netbsd/patches/patch-lib_Transforms_Instrumentation_AddressSanitizer.cpp
deleted file mode 100644
index 5639411b81..0000000000
--- a/llvm-netbsd/patches/patch-lib_Transforms_Instrumentation_AddressSanitizer.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-$NetBSD$
-
---- lib/Transforms/Instrumentation/AddressSanitizer.cpp.orig	2017-07-04 15:51:35.232369546 +0000
-+++ lib/Transforms/Instrumentation/AddressSanitizer.cpp
-@@ -80,6 +80,7 @@ static const uint64_t kMIPS64_ShadowOffs
- static const uint64_t kAArch64_ShadowOffset64 = 1ULL << 36;
- static const uint64_t kFreeBSD_ShadowOffset32 = 1ULL << 30;
- static const uint64_t kFreeBSD_ShadowOffset64 = 1ULL << 46;
-+static const uint64_t kNetBSD_ShadowOffset64 = 1ULL << 46;
- static const uint64_t kPS4CPU_ShadowOffset64 = 1ULL << 40;
- static const uint64_t kWindowsShadowOffset32 = 3ULL << 28;
- // The shadow memory space is dynamically allocated.
-@@ -394,6 +395,7 @@ static ShadowMapping getShadowMapping(Tr
-   bool IsAndroid = TargetTriple.isAndroid();
-   bool IsIOS = TargetTriple.isiOS() || TargetTriple.isWatchOS();
-   bool IsFreeBSD = TargetTriple.isOSFreeBSD();
-+  bool IsNetBSD = TargetTriple.isOSNetBSD();
-   bool IsPS4CPU = TargetTriple.isPS4CPU();
-   bool IsLinux = TargetTriple.isOSLinux();
-   bool IsPPC64 = TargetTriple.getArch() == llvm::Triple::ppc64 ||
-@@ -438,6 +440,8 @@ static ShadowMapping getShadowMapping(Tr
-       Mapping.Offset = kSystemZ_ShadowOffset64;
-     else if (IsFreeBSD)
-       Mapping.Offset = kFreeBSD_ShadowOffset64;
-+    else if (IsNetBSD)
-+      Mapping.Offset = kNetBSD_ShadowOffset64;
-     else if (IsPS4CPU)
-       Mapping.Offset = kPS4CPU_ShadowOffset64;
-     else if (IsLinux && IsX86_64) {
diff --git a/llvm-netbsd/patches/patch-lib_Transforms_Instrumentation_InstrProfiling.cpp b/llvm-netbsd/patches/patch-lib_Transforms_Instrumentation_InstrProfiling.cpp
new file mode 100644
index 0000000000..e8229cc198
--- /dev/null
+++ b/llvm-netbsd/patches/patch-lib_Transforms_Instrumentation_InstrProfiling.cpp
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- lib/Transforms/Instrumentation/InstrProfiling.cpp.orig	2017-06-17 16:34:37.000000000 +0000
++++ lib/Transforms/Instrumentation/InstrProfiling.cpp
+@@ -394,6 +394,7 @@ static bool needsRuntimeRegistrationOfSe
+   // Use linker script magic to get data/cnts/name start/end.
+   if (Triple(M.getTargetTriple()).isOSLinux() ||
+       Triple(M.getTargetTriple()).isOSFreeBSD() ||
++      Triple(M.getTargetTriple()).isOSNetBSD() ||
+       Triple(M.getTargetTriple()).isPS4CPU())
+     return false;
+ 
diff --git a/llvm-netbsd/patches/patch-lib_Transforms_Instrumentation_MemorySanitizer.cpp b/llvm-netbsd/patches/patch-lib_Transforms_Instrumentation_MemorySanitizer.cpp
new file mode 100644
index 0000000000..4ef2227185
--- /dev/null
+++ b/llvm-netbsd/patches/patch-lib_Transforms_Instrumentation_MemorySanitizer.cpp
@@ -0,0 +1,47 @@
+$NetBSD$
+
+--- lib/Transforms/Instrumentation/MemorySanitizer.cpp.orig	2017-06-12 00:24:36.000000000 +0000
++++ lib/Transforms/Instrumentation/MemorySanitizer.cpp
+@@ -280,6 +280,14 @@ static const MemoryMapParams FreeBSD_X86
+   0x380000000000,  // OriginBase
+ };
+ 
++// x86_64 NetBSD
++static const MemoryMapParams NetBSD_X86_64_MemoryMapParams = {
++  0xc00000000000,  // AndMask
++  0x200000000000,  // XorMask
++  0x100000000000,  // ShadowBase
++  0x380000000000,  // OriginBase
++};
++
+ static const PlatformMemoryMapParams Linux_X86_MemoryMapParams = {
+   &Linux_I386_MemoryMapParams,
+   &Linux_X86_64_MemoryMapParams,
+@@ -305,6 +313,11 @@ static const PlatformMemoryMapParams Fre
+   &FreeBSD_X86_64_MemoryMapParams,
+ };
+ 
++static const PlatformMemoryMapParams NetBSD_X86_MemoryMapParams = {
++  nullptr,
++  &NetBSD_X86_64_MemoryMapParams,
++};
++
+ /// \brief An instrumentation pass implementing detection of uninitialized
+ /// reads.
+ ///
+@@ -515,6 +528,15 @@ bool MemorySanitizer::doInitialization(M
+           report_fatal_error("unsupported architecture");
+       }
+       break;
++    case Triple::NetBSD:
++      switch (TargetTriple.getArch()) {
++        case Triple::x86_64:
++          MapParams = NetBSD_X86_MemoryMapParams.bits64;
++          break;
++        default:
++          report_fatal_error("unsupported architecture");
++      }
++      break;
+     case Triple::Linux:
+       switch (TargetTriple.getArch()) {
+         case Triple::x86_64:


Home | Main Index | Thread Index | Old Index