pkgsrc-WIP-changes archive

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

clang-netbsd: Revamp local patches



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Wed Aug 9 02:19:27 2017 +0200
Changeset:	5318780ddeee7bc1fbf8f8d50f6e3f8e3daf0d4f

Modified Files:
	clang-netbsd/distinfo
Added Files:
	clang-netbsd/patches/patch-aa
Removed Files:
	clang-netbsd/patches/patch-unittests_ASTMatchers_Dynamic_RegistryTest.cpp
	clang-netbsd/patches/patch-unittests_Basic_MemoryBufferCacheTest.cpp
	clang-netbsd/patches/patch-unittests_Driver_MultilibTest.cpp
	clang-netbsd/patches/patch-unittests_Format_FormatTest.cpp
	clang-netbsd/patches/patch-unittests_Format_FormatTestComments.cpp
	clang-netbsd/patches/patch-unittests_Format_FormatTestObjC.cpp
	clang-netbsd/patches/patch-unittests_Format_FormatTestSelective.cpp
	clang-netbsd/patches/patch-unittests_Format_SortImportsTestJS.cpp
	clang-netbsd/patches/patch-unittests_Rewrite_RewriteBufferTest.cpp

Log Message:
clang-netbsd: Revamp local patches

Drop local patches for GCC for unittests.
Add local patch to enable more sanitizers.

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=5318780ddeee7bc1fbf8f8d50f6e3f8e3daf0d4f

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

diffstat:
 clang-netbsd/distinfo                              | 10 +--
 clang-netbsd/patches/patch-aa                      | 18 +++++
 ...-unittests_ASTMatchers_Dynamic_RegistryTest.cpp | 13 ----
 ...patch-unittests_Basic_MemoryBufferCacheTest.cpp | 12 ----
 .../patch-unittests_Driver_MultilibTest.cpp        | 79 ----------------------
 .../patches/patch-unittests_Format_FormatTest.cpp  | 13 ----
 .../patch-unittests_Format_FormatTestComments.cpp  | 13 ----
 .../patch-unittests_Format_FormatTestObjC.cpp      | 13 ----
 .../patch-unittests_Format_FormatTestSelective.cpp | 13 ----
 .../patch-unittests_Format_SortImportsTestJS.cpp   | 13 ----
 .../patch-unittests_Rewrite_RewriteBufferTest.cpp  | 12 ----
 11 files changed, 19 insertions(+), 190 deletions(-)

diffs:
diff --git a/clang-netbsd/distinfo b/clang-netbsd/distinfo
index 2bd68b104f..6d88a17b86 100644
--- a/clang-netbsd/distinfo
+++ b/clang-netbsd/distinfo
@@ -12,18 +12,10 @@ 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-aa) = 181ffa84ba9f089920423d2b8bb9abcf55e03561
 SHA1 (patch-lib_Basic_Targets.cpp) = adc83b19e793491b1c6ea0fd8b46cd9f32e592fc
 SHA1 (patch-lib_Basic_Targets_OSTargets.h) = 6af7531d9cdc39037d8b0fb0c734cfba75922fc7
 SHA1 (patch-lib_Driver_ToolChains_CommonArgs.cpp) = 0319867c1a10db204d9ad6aa2a9d495503ee9395
 SHA1 (patch-lib_Driver_ToolChains_Gnu.cpp) = 241c603172fffe6bc8ef3a3733bd3f42c19abbf1
 SHA1 (patch-test_Sema_128bitfloat.cpp) = cc11582dd9495b603a22ef73609ab04f65324da2
 SHA1 (patch-tools_clang-format_CMakeLists.txt) = f119d2a94cbfb8c00a285d1aa7789ed26f8309cf
-SHA1 (patch-unittests_ASTMatchers_Dynamic_RegistryTest.cpp) = 27a198a0efe237497f97e1903df5e8303e02745d
-SHA1 (patch-unittests_Basic_MemoryBufferCacheTest.cpp) = ec0b3f1348d45c45285e97a707223f34701d0df0
-SHA1 (patch-unittests_Driver_MultilibTest.cpp) = c9aba024565fc16b55cd4be25a7ae3a4d13532e6
-SHA1 (patch-unittests_Format_FormatTest.cpp) = 9b01224cdc86b096701b7490a31149ed51c6b393
-SHA1 (patch-unittests_Format_FormatTestComments.cpp) = a77b88c5d7e7347d2a6fa5cfbdda9ecfb9998f83
-SHA1 (patch-unittests_Format_FormatTestObjC.cpp) = 7fbe4fa136a6e90d5176bf0fbfddeb491812f919
-SHA1 (patch-unittests_Format_FormatTestSelective.cpp) = 9eb96791ce196a9b036a55c45f1bc42408a2dc79
-SHA1 (patch-unittests_Format_SortImportsTestJS.cpp) = dca1c14ecfe894876fccee436809bace49543321
-SHA1 (patch-unittests_Rewrite_RewriteBufferTest.cpp) = 3199253fea594f7cfd13e4c043f387bffd8c7d06
diff --git a/clang-netbsd/patches/patch-aa b/clang-netbsd/patches/patch-aa
new file mode 100644
index 0000000000..ce9408b3b0
--- /dev/null
+++ b/clang-netbsd/patches/patch-aa
@@ -0,0 +1,18 @@
+$NetBSD$
+
+--- ./lib/Driver/ToolChains/NetBSD.cpp.orig	2017-08-08 20:54:53.959690124 +0000
++++ ./lib/Driver/ToolChains/NetBSD.cpp
+@@ -422,6 +422,13 @@ SanitizerMask NetBSD::getSupportedSaniti
+   SanitizerMask Res = ToolChain::getSupportedSanitizers();
+   if (IsX86 || IsX86_64) {
+     Res |= SanitizerKind::Address;
++    Res |= SanitizerKind::Vptr;
++    Res |= SanitizerKind::Leak;
++    Res |= SanitizerKind::SafeStack;
++  }
++  if (IsX86_64) {
++    Res |= SanitizerKind::Leak;
++    Res |= SanitizerKind::Thread;
+   }
+   return Res;
+ }
diff --git a/clang-netbsd/patches/patch-unittests_ASTMatchers_Dynamic_RegistryTest.cpp b/clang-netbsd/patches/patch-unittests_ASTMatchers_Dynamic_RegistryTest.cpp
deleted file mode 100644
index 0812997b03..0000000000
--- a/clang-netbsd/patches/patch-unittests_ASTMatchers_Dynamic_RegistryTest.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- unittests/ASTMatchers/Dynamic/RegistryTest.cpp.orig	2016-12-17 00:12:44.000000000 +0000
-+++ unittests/ASTMatchers/Dynamic/RegistryTest.cpp
-@@ -60,7 +60,7 @@ public:
-     VariantMatcher Out;
-     if (Ctor)
-       Out = Registry::constructMatcher(*Ctor, SourceRange(), Args(Arg1), Error);
--    EXPECT_EQ("", DummyError.toStringFull()) << MatcherName;
-+    EXPECT_EQ("", DummyError.toStringFull()) << MatcherName.str();
-     return Out;
-   }
- 
diff --git a/clang-netbsd/patches/patch-unittests_Basic_MemoryBufferCacheTest.cpp b/clang-netbsd/patches/patch-unittests_Basic_MemoryBufferCacheTest.cpp
deleted file mode 100644
index 1e8ad09d70..0000000000
--- a/clang-netbsd/patches/patch-unittests_Basic_MemoryBufferCacheTest.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- unittests/Basic/MemoryBufferCacheTest.cpp.orig	2017-03-22 16:58:38.000000000 +0000
-+++ unittests/Basic/MemoryBufferCacheTest.cpp
-@@ -9,6 +9,7 @@
- 
- #include "clang/Basic/MemoryBufferCache.h"
- #include "llvm/Support/MemoryBuffer.h"
-+#include "llvm/Support/raw_ostream.h"
- #include "gtest/gtest.h"
- 
- using namespace llvm;
diff --git a/clang-netbsd/patches/patch-unittests_Driver_MultilibTest.cpp b/clang-netbsd/patches/patch-unittests_Driver_MultilibTest.cpp
deleted file mode 100644
index 7b71335e81..0000000000
--- a/clang-netbsd/patches/patch-unittests_Driver_MultilibTest.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-$NetBSD$
-
---- unittests/Driver/MultilibTest.cpp.orig	2016-12-17 00:12:43.000000000 +0000
-+++ unittests/Driver/MultilibTest.cpp
-@@ -201,6 +201,7 @@ TEST(MultilibTest, SetConstruction2) {
-   MS.Maybe(Multilib("el").flag("+EL"));
-   ASSERT_TRUE(MS.size() == 4);
-   for (MultilibSet::const_iterator I = MS.begin(), E = MS.end(); I != E; ++I) {
-+#if 0
-     ASSERT_TRUE(I->isValid()) << "Multilb " << *I << " should be valid";
-     ASSERT_TRUE(llvm::StringSwitch<bool>(I->gccSuffix())
-                     .Cases("", "/sof", "/el", "/sof/el", true)
-@@ -220,6 +221,7 @@ TEST(MultilibTest, SetConstruction2) {
-                     .Case("/sof/el", hasFlag(*I, "+EL"))
-                     .Default(false))
-         << "Multilib " << *I << " didn't have the appropriate {+,-}EL flag";
-+#endif
-   }
- }
- 
-@@ -242,6 +244,7 @@ TEST(MultilibTest, SetRegexFilter) {
-   MS.Maybe(Multilib("one"));
-   MS.Maybe(Multilib("two"));
-   MS.Maybe(Multilib("three"));
-+#if 0
-   ASSERT_EQ(MS.size(), (unsigned)2 * 2 * 2)
-       << "Size before filter was incorrect. Contents:\n" << MS;
-   MS.FilterOut("/one/two/three");
-@@ -251,6 +254,7 @@ TEST(MultilibTest, SetRegexFilter) {
-     ASSERT_TRUE(I->gccSuffix() != "/one/two/three")
-         << "The filter should have removed " << *I;
-   }
-+#endif
- }
- 
- TEST(MultilibTest, SetFilterObject) {
-@@ -258,6 +262,7 @@ TEST(MultilibTest, SetFilterObject) {
-   MS.Maybe(Multilib("orange"));
-   MS.Maybe(Multilib("pear"));
-   MS.Maybe(Multilib("plum"));
-+#if 0
-   ASSERT_EQ((int)MS.size(), 1 /* Default */ +
-                             1 /* pear */ +
-                             1 /* plum */ +
-@@ -280,6 +285,7 @@ TEST(MultilibTest, SetFilterObject) {
-     ASSERT_FALSE(StringRef(I->gccSuffix()).startswith("/p"))
-         << "The filter should have removed " << *I;
-   }
-+#endif
- }
- 
- TEST(MultilibTest, SetSelection1) {
-@@ -289,6 +295,7 @@ TEST(MultilibTest, SetSelection1) {
-   Multilib::flags_list FlagM64;
-   FlagM64.push_back("+m64");
-   Multilib SelectionM64;
-+#if 0
-   ASSERT_TRUE(MS1.select(FlagM64, SelectionM64))
-       << "Flag set was {\"+m64\"}, but selection not found";
-   ASSERT_TRUE(SelectionM64.gccSuffix() == "/64")
-@@ -301,6 +308,7 @@ TEST(MultilibTest, SetSelection1) {
-       << "Flag set was {\"-m64\"}, but selection not found";
-   ASSERT_TRUE(SelectionNoM64.gccSuffix() == "")
-       << "Selection picked " << SelectionNoM64 << " which was not expected";
-+#endif
- }
- 
- TEST(MultilibTest, SetSelection2) {
-@@ -333,8 +341,10 @@ TEST(MultilibTest, SetSelection2) {
-     if (IsSF)
-       Suffix += "/sf";
- 
-+#if 0
-     ASSERT_EQ(Selection.gccSuffix(), Suffix) << "Selection picked " << Selection
-                                              << " which was not expected ";
-+#endif
-   }
- }
- 
diff --git a/clang-netbsd/patches/patch-unittests_Format_FormatTest.cpp b/clang-netbsd/patches/patch-unittests_Format_FormatTest.cpp
deleted file mode 100644
index 269d8a51aa..0000000000
--- a/clang-netbsd/patches/patch-unittests_Format_FormatTest.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- unittests/Format/FormatTest.cpp.orig	2017-05-29 10:06:52.000000000 +0000
-+++ unittests/Format/FormatTest.cpp
-@@ -48,7 +48,7 @@ protected:
-     if (CheckComplete != SC_DoNotCheck) {
-       bool ExpectedCompleteFormat = CheckComplete == SC_ExpectComplete;
-       EXPECT_EQ(ExpectedCompleteFormat, Status.FormatComplete)
--          << Code << "\n\n";
-+          << Code.str() << "\n\n";
-     }
-     ReplacementCount = Replaces.size();
-     auto Result = applyAllReplacements(Code, Replaces);
diff --git a/clang-netbsd/patches/patch-unittests_Format_FormatTestComments.cpp b/clang-netbsd/patches/patch-unittests_Format_FormatTestComments.cpp
deleted file mode 100644
index c99d984050..0000000000
--- a/clang-netbsd/patches/patch-unittests_Format_FormatTestComments.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- unittests/Format/FormatTestComments.cpp.orig	2017-05-29 10:06:52.000000000 +0000
-+++ unittests/Format/FormatTestComments.cpp
-@@ -47,7 +47,7 @@ protected:
-     if (CheckComplete != SC_DoNotCheck) {
-       bool ExpectedCompleteFormat = CheckComplete == SC_ExpectComplete;
-       EXPECT_EQ(ExpectedCompleteFormat, Status.FormatComplete)
--          << Code << "\n\n";
-+          << Code.str() << "\n\n";
-     }
-     ReplacementCount = Replaces.size();
-     auto Result = applyAllReplacements(Code, Replaces);
diff --git a/clang-netbsd/patches/patch-unittests_Format_FormatTestObjC.cpp b/clang-netbsd/patches/patch-unittests_Format_FormatTestObjC.cpp
deleted file mode 100644
index a97c99cad8..0000000000
--- a/clang-netbsd/patches/patch-unittests_Format_FormatTestObjC.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- unittests/Format/FormatTestObjC.cpp.orig	2017-05-29 10:06:52.000000000 +0000
-+++ unittests/Format/FormatTestObjC.cpp
-@@ -49,7 +49,7 @@ protected:
-     if (CheckComplete != SC_DoNotCheck) {
-       bool ExpectedCompleteFormat = CheckComplete == SC_ExpectComplete;
-       EXPECT_EQ(ExpectedCompleteFormat, Status.FormatComplete)
--          << Code << "\n\n";
-+          << Code.str() << "\n\n";
-     }
-     auto Result = applyAllReplacements(Code, Replaces);
-     EXPECT_TRUE(static_cast<bool>(Result));
diff --git a/clang-netbsd/patches/patch-unittests_Format_FormatTestSelective.cpp b/clang-netbsd/patches/patch-unittests_Format_FormatTestSelective.cpp
deleted file mode 100644
index e2fa5db2ee..0000000000
--- a/clang-netbsd/patches/patch-unittests_Format_FormatTestSelective.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- unittests/Format/FormatTestSelective.cpp.orig	2017-05-29 10:06:52.000000000 +0000
-+++ unittests/Format/FormatTestSelective.cpp
-@@ -27,7 +27,7 @@ protected:
-     FormattingAttemptStatus Status;
-     tooling::Replacements Replaces =
-         reformat(Style, Code, Ranges, "<stdin>", &Status);
--    EXPECT_TRUE(Status.FormatComplete) << Code << "\n\n";
-+    EXPECT_TRUE(Status.FormatComplete) << Code.str() << "\n\n";
-     auto Result = applyAllReplacements(Code, Replaces);
-     EXPECT_TRUE(static_cast<bool>(Result));
-     DEBUG(llvm::errs() << "\n" << *Result << "\n\n");
diff --git a/clang-netbsd/patches/patch-unittests_Format_SortImportsTestJS.cpp b/clang-netbsd/patches/patch-unittests_Format_SortImportsTestJS.cpp
deleted file mode 100644
index c950b21f7d..0000000000
--- a/clang-netbsd/patches/patch-unittests_Format_SortImportsTestJS.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD$
-
---- unittests/Format/SortImportsTestJS.cpp.orig	2016-12-17 00:12:47.000000000 +0000
-+++ unittests/Format/SortImportsTestJS.cpp
-@@ -38,7 +38,7 @@ protected:
-                   unsigned Offset = 0, unsigned Length = 0) {
-     std::string Result = sort(Code, Offset, Length);
-     EXPECT_EQ(Expected.str(), Result) << "Expected:\n"
--                                      << Expected << "\nActual:\n"
-+                                      << Expected.str() << "\nActual:\n"
-                                       << Result;
-   }
- 
diff --git a/clang-netbsd/patches/patch-unittests_Rewrite_RewriteBufferTest.cpp b/clang-netbsd/patches/patch-unittests_Rewrite_RewriteBufferTest.cpp
deleted file mode 100644
index 0e470e87f6..0000000000
--- a/clang-netbsd/patches/patch-unittests_Rewrite_RewriteBufferTest.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD$
-
---- unittests/Rewrite/RewriteBufferTest.cpp.orig	2016-12-17 00:12:45.000000000 +0000
-+++ unittests/Rewrite/RewriteBufferTest.cpp
-@@ -8,6 +8,7 @@
- //===----------------------------------------------------------------------===//
- 
- #include "clang/Rewrite/Core/RewriteBuffer.h"
-+#include "llvm/Support/raw_ostream.h"
- #include "gtest/gtest.h"
- 
- using namespace llvm;


Home | Main Index | Thread Index | Old Index