pkgsrc-WIP-changes archive

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

llvm-all-in-one: Update to SVN r. 308844



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sun Jul 23 16:52:47 2017 +0200
Changeset:	ed2cf69e6ead0a6665a9217cf42156374947ebe7

Modified Files:
	llvm-all-in-one/Makefile
	llvm-all-in-one/distinfo
Added Files:
	llvm-all-in-one/patches/patch-lib_Support_Unix_Memory.inc
	llvm-all-in-one/patches/patch-unittests_Support_MemoryTest.cpp

Log Message:
llvm-all-in-one: Update to SVN r. 308844

Add patches to fix all unexpected failures in "check-llvm" target.

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=ed2cf69e6ead0a6665a9217cf42156374947ebe7

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

diffstat:
 llvm-all-in-one/Makefile                           |  2 +-
 llvm-all-in-one/distinfo                           |  2 ++
 .../patches/patch-lib_Support_Unix_Memory.inc      | 16 +++++++++
 .../patches/patch-unittests_Support_MemoryTest.cpp | 41 ++++++++++++++++++++++
 4 files changed, 60 insertions(+), 1 deletion(-)

diffs:
diff --git a/llvm-all-in-one/Makefile b/llvm-all-in-one/Makefile
index 62b5441f65..a8885ef311 100644
--- a/llvm-all-in-one/Makefile
+++ b/llvm-all-in-one/Makefile
@@ -4,7 +4,7 @@ LLVM_VERSION=	5.0.0
 
 CATEGORIES=	lang devel
 
-LLVM_SVN_REV=		308490
+LLVM_SVN_REV=		308844
 
 SVN_REPOSITORIES=		llvm
 SVN_REPO.llvm=			http://llvm.org/svn/llvm-project/llvm/trunk
diff --git a/llvm-all-in-one/distinfo b/llvm-all-in-one/distinfo
index 2bf18893d1..218cd09607 100644
--- a/llvm-all-in-one/distinfo
+++ b/llvm-all-in-one/distinfo
@@ -16,6 +16,8 @@ SHA1 (patch-include_llvm_ExecutionEngine_Orc_IndirectionUtils.h) = 7aa55e13e78ed
 SHA1 (patch-include_llvm_ExecutionEngine_Orc_OrcRemoteTargetServer.h) = e2f96f49e1d5afa1e1cbc3cfc98a81b19f0ce230
 SHA1 (patch-lib_ExecutionEngine_Orc_OrcABISupport.cpp) = b24a57af1c6fea12f0dd252ccfd23ce6945f307d
 SHA1 (patch-lib_ExecutionEngine_SectionMemoryManager.cpp) = f3498378be67171ad4d1a211f6172d5f2f8248f7
+SHA1 (patch-lib_Support_Unix_Memory.inc) = 8b9b220178e94f17d1a66637277e07f887db9f79
 SHA1 (patch-lib_Transforms_Instrumentation_AddressSanitizer.cpp) = 67eee29c4d8525b603e6b7c0a52278bdf3353687
 SHA1 (patch-lib_Transforms_Instrumentation_InstrProfiling.cpp) = 871b474f415d9dc468cc07477101f88d7a20868b
 SHA1 (patch-lib_Transforms_Instrumentation_MemorySanitizer.cpp) = 64fdbb55c77d5f5f73152d2f8daa28adfc428e40
+SHA1 (patch-unittests_Support_MemoryTest.cpp) = 2b70513d36138d37eda5636c07b195e1ff0c9097
diff --git a/llvm-all-in-one/patches/patch-lib_Support_Unix_Memory.inc b/llvm-all-in-one/patches/patch-lib_Support_Unix_Memory.inc
new file mode 100644
index 0000000000..98a84ca889
--- /dev/null
+++ b/llvm-all-in-one/patches/patch-lib_Support_Unix_Memory.inc
@@ -0,0 +1,16 @@
+$NetBSD$
+
+--- lib/Support/Unix/Memory.inc.orig	2017-07-05 18:38:14.000000000 +0000
++++ lib/Support/Unix/Memory.inc
+@@ -102,6 +102,11 @@ Memory::allocateMappedMemory(size_t NumB
+ 
+   int Protect = getPosixProtectionFlags(PFlags);
+ 
++#if defined(__NetBSD__) && defined(PROT_MPROTECT)
++  // This is required in order to grant additional protection bits
++  Protect |= PROT_MPROTECT(PROT_READ | PROT_WRITE | PROT_EXEC);
++#endif
++
+   // Use any near hint and the page size to set a page-aligned starting address
+   uintptr_t Start = NearBlock ? reinterpret_cast<uintptr_t>(NearBlock->base()) +
+                                       NearBlock->size() : 0;
diff --git a/llvm-all-in-one/patches/patch-unittests_Support_MemoryTest.cpp b/llvm-all-in-one/patches/patch-unittests_Support_MemoryTest.cpp
new file mode 100644
index 0000000000..b6dfc756c4
--- /dev/null
+++ b/llvm-all-in-one/patches/patch-unittests_Support_MemoryTest.cpp
@@ -0,0 +1,41 @@
+$NetBSD$
+
+--- unittests/Support/MemoryTest.cpp.orig	2017-07-05 18:41:47.000000000 +0000
++++ unittests/Support/MemoryTest.cpp
+@@ -33,9 +33,8 @@ protected:
+     case Memory::MF_READ|Memory::MF_WRITE:
+       return Memory::MF_READ|Memory::MF_WRITE;
+     case Memory::MF_READ|Memory::MF_EXEC:
+-    case Memory::MF_READ|Memory::MF_WRITE|Memory::MF_EXEC:
+     case Memory::MF_EXEC:
+-      return Memory::MF_READ|Memory::MF_WRITE|Memory::MF_EXEC;
++      return Memory::MF_READ|Memory::MF_EXEC;
+     }
+     // Default in case values are added to the enum, as required by some compilers
+     return Memory::MF_READ|Memory::MF_WRITE;
+@@ -180,6 +179,9 @@ TEST_P(MappedMemoryTest, MultipleWrite) 
+ }
+ 
+ TEST_P(MappedMemoryTest, EnabledWrite) {
++  if (Flags & Memory::MF_EXEC)
++    return;
++
+   std::error_code EC;
+   MemoryBlock M1 = Memory::allocateMappedMemory(2 * sizeof(int), nullptr, Flags,
+                                                 EC);
+@@ -349,13 +351,13 @@ TEST_P(MappedMemoryTest, UnalignedNear) 
+ 
+ // Note that Memory::MF_WRITE is not supported exclusively across
+ // operating systems and architectures and can imply MF_READ|MF_WRITE
++// RWX mapping is not allowed on all operating systems (W^X restrictions)
+ unsigned MemoryFlags[] = {
+ 			   Memory::MF_READ,
+ 			   Memory::MF_WRITE,
+ 			   Memory::MF_READ|Memory::MF_WRITE,
+ 			   Memory::MF_EXEC,
+-			   Memory::MF_READ|Memory::MF_EXEC,
+-			   Memory::MF_READ|Memory::MF_WRITE|Memory::MF_EXEC
++			   Memory::MF_READ|Memory::MF_EXEC
+ 			 };
+ 
+ INSTANTIATE_TEST_CASE_P(AllocationTests,


Home | Main Index | Thread Index | Old Index