diff --git a/debian/patches/D54677-hurd-path_max.diff b/debian/patches/D54677-hurd-path_max.diff deleted file mode 100644 index 59af243a..00000000 --- a/debian/patches/D54677-hurd-path_max.diff +++ /dev/null @@ -1,64 +0,0 @@ -[hurd] Fix unconditional use of PATH_MAX - -The GNU/Hurd system does not define an arbitrary PATH_MAX limitation, the POSIX 2001 realpath extension can be used instead, and the size of symlinks can be determined. - -https://reviews.llvm.org/D54677 - -Index: llvm-toolchain-snapshot_8~svn347511/libcxx/src/filesystem/operations.cpp -=================================================================== ---- llvm-toolchain-snapshot_8~svn347511.orig/libcxx/src/filesystem/operations.cpp -+++ llvm-toolchain-snapshot_8~svn347511/libcxx/src/filesystem/operations.cpp -@@ -530,11 +530,20 @@ path __canonical(path const& orig_p, err - ErrorHandler err("canonical", ec, &orig_p, &cwd); - - path p = __do_absolute(orig_p, &cwd, ec); -+#if _POSIX_VERSION >= 200112 || defined(__GLIBC__) -+ char *buff; -+ if ((buff = ::realpath(p.c_str(), NULL)) == nullptr) -+ return err.report(capture_errno()); -+ path ret = {buff}; -+ free(buff); -+ return ret; -+#else - char buff[PATH_MAX + 1]; - char* ret; - if ((ret = ::realpath(p.c_str(), buff)) == nullptr) - return err.report(capture_errno()); - return {ret}; -+#endif - } - - void __copy(const path& from, const path& to, copy_options options, -@@ -1076,16 +1085,27 @@ void __permissions(const path& p, perms - path __read_symlink(const path& p, error_code* ec) { - ErrorHandler err("read_symlink", ec, &p); - -- char buff[PATH_MAX + 1]; -- error_code m_ec; -+ struct stat sb; -+ if (lstat(p.c_str(), &sb) == -1) { -+ return err.report(capture_errno()); -+ } -+ size_t size = sb.st_size + 1; -+ char *buff = (char*) malloc(size); -+ if (buff == NULL) { -+ return err.report(capture_errno()); -+ } -+ - ::ssize_t ret; -- if ((ret = ::readlink(p.c_str(), buff, PATH_MAX)) == -1) { -+ if ((ret = ::readlink(p.c_str(), buff, size)) == -1) { -+ free(buff); - return err.report(capture_errno()); - } -- _LIBCPP_ASSERT(ret <= PATH_MAX, "TODO"); -+ _LIBCPP_ASSERT(ret < size, "TODO"); - _LIBCPP_ASSERT(ret > 0, "TODO"); - buff[ret] = 0; -- return {buff}; -+ path res = {buff}; -+ free(buff); -+ return res; - } - - bool __remove(const path& p, error_code* ec) { diff --git a/debian/patches/hurd-EIEIO-undef.diff b/debian/patches/hurd-EIEIO-undef.diff deleted file mode 100644 index 2e922ac5..00000000 --- a/debian/patches/hurd-EIEIO-undef.diff +++ /dev/null @@ -1,14 +0,0 @@ -Index: llvm-toolchain-snapshot_8~svn339515/utils/TableGen/CodeEmitterGen.cpp -=================================================================== ---- llvm-toolchain-snapshot_8~svn339515.orig/utils/TableGen/CodeEmitterGen.cpp -+++ llvm-toolchain-snapshot_8~svn339515/utils/TableGen/CodeEmitterGen.cpp -@@ -239,6 +239,9 @@ void CodeEmitterGen::run(raw_ostream &o) - ArrayRef NumberedInstructions = - Target.getInstructionsByEnumValue(); - -+ o << "// Undef for HURD\n"; -+ o << "#ifdef EIEIO\n#undef EIEIO\n#endif\n"; -+ - // Emit function declaration - o << "uint64_t " << Target.getName(); - o << "MCCodeEmitter::getBinaryCodeForInstr(const MCInst &MI,\n" diff --git a/debian/patches/hurd-pathmax.diff b/debian/patches/hurd-pathmax.diff deleted file mode 100644 index 2ee0bb94..00000000 --- a/debian/patches/hurd-pathmax.diff +++ /dev/null @@ -1,81 +0,0 @@ -Index: llvm-toolchain-snapshot_8~svn349138/clang/lib/Basic/FileManager.cpp -=================================================================== ---- llvm-toolchain-snapshot_8~svn349138.orig/clang/lib/Basic/FileManager.cpp -+++ llvm-toolchain-snapshot_8~svn349138/clang/lib/Basic/FileManager.cpp -@@ -528,6 +528,12 @@ void FileManager::invalidateCache(const - UniqueRealFiles.erase(Entry->getUniqueID()); - } - -+// For GNU Hurd -+#if defined(__GNU__) && !defined(PATH_MAX) -+# define PATH_MAX 4096 -+#endif -+ -+ - void FileManager::GetUniqueIDMapping( - SmallVectorImpl &UIDToFiles) const { - UIDToFiles.clear(); -Index: llvm-toolchain-snapshot_8~svn349138/lldb/include/lldb/lldb-defines.h -=================================================================== ---- llvm-toolchain-snapshot_8~svn349138.orig/lldb/include/lldb/lldb-defines.h -+++ llvm-toolchain-snapshot_8~svn349138/lldb/include/lldb/lldb-defines.h -@@ -28,6 +28,11 @@ - #define INT32_MAX 2147483647 - #endif - -+// For GNU Hurd -+#if defined(__GNU__) && !defined(PATH_MAX) -+# define PATH_MAX 4096 -+#endif -+ - #if !defined(UINT32_MAX) - #define UINT32_MAX 4294967295U - #endif -Index: llvm-toolchain-snapshot_8~svn349138/tools/dsymutil/DwarfLinker.cpp -=================================================================== ---- llvm-toolchain-snapshot_8~svn349138.orig/tools/dsymutil/DwarfLinker.cpp -+++ llvm-toolchain-snapshot_8~svn349138/tools/dsymutil/DwarfLinker.cpp -@@ -101,6 +101,11 @@ - #include - #include - -+// For GNU Hurd -+#if defined(__GNU__) && !defined(PATH_MAX) -+# define PATH_MAX 4096 -+#endif -+ - namespace llvm { - namespace dsymutil { - -Index: llvm-toolchain-snapshot_8~svn349138/polly/lib/External/ppcg/cuda_common.c -=================================================================== ---- llvm-toolchain-snapshot_8~svn349138.orig/polly/lib/External/ppcg/cuda_common.c -+++ llvm-toolchain-snapshot_8~svn349138/polly/lib/External/ppcg/cuda_common.c -@@ -15,6 +15,11 @@ - #include "cuda_common.h" - #include "ppcg.h" - -+// For GNU Hurd -+#if defined(__GNU__) && !defined(PATH_MAX) -+# define PATH_MAX 4096 -+#endif -+ - /* Open the host .cu file and the kernel .hu and .cu files for writing. - * Add the necessary includes. - */ -Index: llvm-toolchain-snapshot_8~svn349138/clang/lib/Frontend/ModuleDependencyCollector.cpp -=================================================================== ---- llvm-toolchain-snapshot_8~svn349138.orig/clang/lib/Frontend/ModuleDependencyCollector.cpp -+++ llvm-toolchain-snapshot_8~svn349138/clang/lib/Frontend/ModuleDependencyCollector.cpp -@@ -99,6 +99,11 @@ struct ModuleDependencyMMCallbacks : pub - - } - -+// For GNU Hurd -+#if defined(__GNU__) && !defined(PATH_MAX) -+# define PATH_MAX 4096 -+#endif -+ - // TODO: move this to Support/Path.h and check for HAVE_REALPATH? - static bool real_path(StringRef SrcPath, SmallVectorImpl &RealPath) { - #ifdef LLVM_ON_UNIX diff --git a/debian/patches/impl-path-hurd.diff b/debian/patches/impl-path-hurd.diff deleted file mode 100644 index 0441441f..00000000 --- a/debian/patches/impl-path-hurd.diff +++ /dev/null @@ -1,13 +0,0 @@ -Index: llvm-toolchain-snapshot_8~svn348749/lib/Support/Unix/Path.inc -=================================================================== ---- llvm-toolchain-snapshot_8~svn348749.orig/lib/Support/Unix/Path.inc -+++ llvm-toolchain-snapshot_8~svn348749/lib/Support/Unix/Path.inc -@@ -177,7 +177,7 @@ std::string getMainExecutable(const char - - if (getprogpath(exe_path, argv0) != NULL) - return exe_path; --#elif defined(__linux__) || defined(__CYGWIN__) -+#elif defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__) - char exe_path[MAXPATHLEN]; - StringRef aPath("/proc/self/exe"); - if (sys::fs::exists(aPath)) { diff --git a/debian/patches/libcxx-silent-failure-arm64.diff b/debian/patches/libcxx-silent-failure-arm64.diff deleted file mode 100644 index be7e01e9..00000000 --- a/debian/patches/libcxx-silent-failure-arm64.diff +++ /dev/null @@ -1,24 +0,0 @@ -Index: llvm-toolchain-snapshot_8~svn350611/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_for.pass.cpp -=================================================================== ---- llvm-toolchain-snapshot_8~svn350611.orig/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_for.pass.cpp -+++ llvm-toolchain-snapshot_8~svn350611/libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_for.pass.cpp -@@ -8,6 +8,7 @@ - //===----------------------------------------------------------------------===// - // - // UNSUPPORTED: libcpp-has-no-threads -+// XFAIL: * - - // FLAKY_TEST - -Index: llvm-toolchain-snapshot_8~svn350611/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp -=================================================================== ---- llvm-toolchain-snapshot_8~svn350611.orig/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp -+++ llvm-toolchain-snapshot_8~svn350611/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp -@@ -9,6 +9,7 @@ - // - // UNSUPPORTED: libcpp-has-no-threads - // UNSUPPORTED: c++98, c++03, c++11 -+// XFAIL: * - - // - diff --git a/debian/patches/libcxx-silent-failure-ppc64el.diff b/debian/patches/libcxx-silent-failure-ppc64el.diff deleted file mode 100644 index 3a84f1ad..00000000 --- a/debian/patches/libcxx-silent-failure-ppc64el.diff +++ /dev/null @@ -1,13 +0,0 @@ -Index: llvm-toolchain-snapshot_7~svn337372/libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp -=================================================================== ---- llvm-toolchain-snapshot_7~svn337372.orig/libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp -+++ llvm-toolchain-snapshot_7~svn337372/libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp -@@ -14,7 +14,7 @@ - // - // GCC currently fails because it needs -fabi-version=6 to fix mangling of - // std::atomic when used with __attribute__((vector(X))). --// XFAIL: gcc -+// XFAIL: * - - // - diff --git a/debian/patches/libcxx-silent-test-libcxx.diff b/debian/patches/libcxx-silent-test-libcxx.diff deleted file mode 100644 index c272b943..00000000 --- a/debian/patches/libcxx-silent-test-libcxx.diff +++ /dev/null @@ -1,51 +0,0 @@ -Index: llvm-toolchain-snapshot_7~svn337372/libcxx/test/std/numerics/rand/rand.util/rand.util.canonical/generate_canonical.pass.cpp -=================================================================== ---- llvm-toolchain-snapshot_7~svn337372.orig/libcxx/test/std/numerics/rand/rand.util/rand.util.canonical/generate_canonical.pass.cpp -+++ llvm-toolchain-snapshot_7~svn337372/libcxx/test/std/numerics/rand/rand.util/rand.util.canonical/generate_canonical.pass.cpp -@@ -12,6 +12,8 @@ - // template - // RealType generate_canonical(URNG& g); - -+// XFAIL: * -+ - #include - #include - -Index: llvm-toolchain-snapshot_7~svn337372/libcxx/test/std/re/re.traits/isctype.pass.cpp -=================================================================== ---- llvm-toolchain-snapshot_7~svn337372.orig/libcxx/test/std/re/re.traits/isctype.pass.cpp -+++ llvm-toolchain-snapshot_7~svn337372/libcxx/test/std/re/re.traits/isctype.pass.cpp -@@ -16,6 +16,7 @@ - // TODO(EricWF): This test takes 40+ minutes to build with Clang 3.8 under ASAN or MSAN. - // UNSUPPORTED: asan, msan - -+// XFAIL: * - - #include - #include -Index: llvm-toolchain-snapshot_7~svn337372/libcxxabi/test/catch_multi_level_pointer.pass.cpp -=================================================================== ---- llvm-toolchain-snapshot_7~svn337372.orig/libcxxabi/test/catch_multi_level_pointer.pass.cpp -+++ llvm-toolchain-snapshot_7~svn337372/libcxxabi/test/catch_multi_level_pointer.pass.cpp -@@ -9,6 +9,8 @@ - - // UNSUPPORTED: libcxxabi-no-exceptions - -+// XFAIL: * -+ - #include - #include - #include -Index: llvm-toolchain-snapshot_7~svn337372/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct.pass.cpp -=================================================================== ---- llvm-toolchain-snapshot_7~svn337372.orig/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct.pass.cpp -+++ llvm-toolchain-snapshot_7~svn337372/libcxx/test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct.pass.cpp -@@ -16,6 +16,8 @@ - - // template void construct(T* p, Args&&... args); - -+// XFAIL: * -+ - #include - #include - #include diff --git a/debian/patches/libcxx-test-atomics-set-compare-exchange-to-be-expected-fails-on-arm.patch b/debian/patches/libcxx-test-atomics-set-compare-exchange-to-be-expected-fails-on-arm.patch deleted file mode 100644 index af434574..00000000 --- a/debian/patches/libcxx-test-atomics-set-compare-exchange-to-be-expected-fails-on-arm.patch +++ /dev/null @@ -1,58 +0,0 @@ -Clang 3.9 regression causes a bug when generating code for -std::atomic_compare_and_exchange*(std::atomic,...) without -optimizations. If same code is compiled with -O2 tests pass without problems. -Atomics are implement in headers with builtin functions which makes this -affect application code instead of libc++ library code. - -libcxx tests default to -O0 compilation so these test need to be marked failing -on arm to allow installing packages. Use cases is so borderline failure that it -shouldn't prevent building the package. (64bit atomics in 32bit mode) - -Index: llvm-toolchain-snapshot_7~svn337372/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong.pass.cpp -=================================================================== ---- llvm-toolchain-snapshot_7~svn337372.orig/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong.pass.cpp -+++ llvm-toolchain-snapshot_7~svn337372/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong.pass.cpp -@@ -8,6 +8,7 @@ - //===----------------------------------------------------------------------===// - // - // UNSUPPORTED: libcpp-has-no-threads -+// XFAIL: arm - // ... assertion fails line 34 - - // -Index: llvm-toolchain-snapshot_7~svn337372/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit.pass.cpp -=================================================================== ---- llvm-toolchain-snapshot_7~svn337372.orig/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit.pass.cpp -+++ llvm-toolchain-snapshot_7~svn337372/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_strong_explicit.pass.cpp -@@ -8,6 +8,7 @@ - //===----------------------------------------------------------------------===// - // - // UNSUPPORTED: libcpp-has-no-threads -+// XFAIL: arm - // ... assertion fails line 38 - - // -Index: llvm-toolchain-snapshot_7~svn337372/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak.pass.cpp -=================================================================== ---- llvm-toolchain-snapshot_7~svn337372.orig/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak.pass.cpp -+++ llvm-toolchain-snapshot_7~svn337372/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak.pass.cpp -@@ -8,6 +8,7 @@ - //===----------------------------------------------------------------------===// - // - // UNSUPPORTED: libcpp-has-no-threads -+// XFAIL: arm - // ... assertion fails line 34 - - // -Index: llvm-toolchain-snapshot_7~svn337372/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit.pass.cpp -=================================================================== ---- llvm-toolchain-snapshot_7~svn337372.orig/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit.pass.cpp -+++ llvm-toolchain-snapshot_7~svn337372/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_compare_exchange_weak_explicit.pass.cpp -@@ -8,6 +8,7 @@ - //===----------------------------------------------------------------------===// - // - // UNSUPPORTED: libcpp-has-no-threads -+// XFAIL: arm - // ... assertion fails line 38 - - // diff --git a/debian/patches/libcxx-test-fix-lockfree-test-for-i386.patch b/debian/patches/libcxx-test-fix-lockfree-test-for-i386.patch deleted file mode 100644 index 631b554b..00000000 --- a/debian/patches/libcxx-test-fix-lockfree-test-for-i386.patch +++ /dev/null @@ -1,31 +0,0 @@ -Lock is_always_lock free test fails on i386 because std::atomic is aligned -to 8 bytes while long long is aligned to 4 bytes. clang can't generate inline -code for unaligned 8 byte atomics even tough instruction set and gcc support -it. - -That makes it expected thaqt ATOMIC_LLONG_LOCK_FREE and -std::atomic::is_always_lock_free don't match on i386. Correct test -for std::atomic is to check if target cpu support cmpxchg8 instruction. -To set instruction support one can check __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 define. - -Bug: https://llvm.org/bugs/show_bug.cgi?id=19355 - -Index: llvm-toolchain-snapshot_7~svn337372/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp -=================================================================== ---- llvm-toolchain-snapshot_7~svn337372.orig/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp -+++ llvm-toolchain-snapshot_7~svn337372/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp -@@ -20,6 +20,14 @@ - # error Feature test macro missing. - #endif - -+#if defined(__i386__) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) -+/* Fix for clang setting __GCC_ATOMIC_LLONG_LOCK_FREE incorecctly for x86 -+ * https://llvm.org/bugs/show_bug.cgi?id=19355 -+ */ -+#undef ATOMIC_LLONG_LOCK_FREE -+#define ATOMIC_LLONG_LOCK_FREE 2 -+#endif -+ - template void checkAlwaysLockFree() { - if (std::atomic::is_always_lock_free) - assert(std::atomic().is_lock_free()); diff --git a/debian/patches/lldb-addversion-suffix-to-llvm-server-exec.patch b/debian/patches/lldb/lldb-addversion-suffix-to-llvm-server-exec.patch similarity index 100% rename from debian/patches/lldb-addversion-suffix-to-llvm-server-exec.patch rename to debian/patches/lldb/lldb-addversion-suffix-to-llvm-server-exec.patch diff --git a/debian/patches/lldb-disable-swig-error.diff b/debian/patches/lldb/lldb-disable-swig-error.diff similarity index 100% rename from debian/patches/lldb-disable-swig-error.diff rename to debian/patches/lldb/lldb-disable-swig-error.diff diff --git a/debian/patches/lldb-link-atomic-cmake.patch b/debian/patches/lldb/lldb-link-atomic-cmake.patch similarity index 100% rename from debian/patches/lldb-link-atomic-cmake.patch rename to debian/patches/lldb/lldb-link-atomic-cmake.patch diff --git a/debian/patches/lldb-missing-install.diff b/debian/patches/lldb/lldb-missing-install.diff similarity index 100% rename from debian/patches/lldb-missing-install.diff rename to debian/patches/lldb/lldb-missing-install.diff diff --git a/debian/patches/openmp-check-execstack.diff b/debian/patches/openmp/openmp-check-execstack.diff similarity index 100% rename from debian/patches/openmp-check-execstack.diff rename to debian/patches/openmp/openmp-check-execstack.diff diff --git a/debian/patches/openmp-mips-affinity.patch b/debian/patches/openmp/openmp-mips-affinity.patch similarity index 100% rename from debian/patches/openmp-mips-affinity.patch rename to debian/patches/openmp/openmp-mips-affinity.patch diff --git a/debian/patches/openmp-soname.diff b/debian/patches/openmp/openmp-soname.diff similarity index 100% rename from debian/patches/openmp-soname.diff rename to debian/patches/openmp/openmp-soname.diff diff --git a/debian/patches/series b/debian/patches/series index 04057d30..b601a875 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -61,27 +61,27 @@ scan-view-fix-path.diff fix-scan-view-path.diff # lldb -lldb-link-atomic-cmake.patch -lldb-addversion-suffix-to-llvm-server-exec.patch -lldb-missing-install.diff -lldb-disable-swig-error.diff +lldb/lldb-link-atomic-cmake.patch +lldb/lldb-addversion-suffix-to-llvm-server-exec.patch +lldb/lldb-missing-install.diff +lldb/lldb-disable-swig-error.diff # Fix arch issue disable-error-xray.diff # OpenMP -openmp-check-execstack.diff -openmp-mips-affinity.patch -bootstrap-with-openmp-version-export-missing.diff +openmp/openmp-check-execstack.diff +openmp/openmp-mips-affinity.patch +openmp/bootstrap-with-openmp-version-export-missing.diff # libcxx -libcxxabi-test-don-t-fail-extended-long-double.patch -libcxx-test-fix-lockfree-test-for-i386.patch -libcxxabi-arm-ehabi-fix.patch -libcxx-test-atomics-set-compare-exchange-to-be-expected-fails-on-arm.patch -libcxx-silent-test-libcxx.diff -libcxx-silent-failure-ppc64el.diff -libcxx-silent-failure-arm64.diff +libcxx/libcxxabi-test-don-t-fail-extended-long-double.patch +libcxx/libcxx-test-fix-lockfree-test-for-i386.patch +libcxx/libcxxabi-arm-ehabi-fix.patch +libcxx/libcxx-test-atomics-set-compare-exchange-to-be-expected-fails-on-arm.patch +libcxx/libcxx-silent-test-libcxx.diff +libcxx/libcxx-silent-failure-ppc64el.diff +libcxx/libcxx-silent-failure-arm64.diff # Change default optims mips-fpxx-enable.diff