llvm-toolchain/debian/patches/hurd-pathmax.diff
Samuel Thibault ec06d9e4e1 * Apply hurd fixes (Closes: #908847).
- hurd-lib_Support_Unix_Path.inc.diff
    - hurd-pathmax.diff
    - hurd-tools_llvm-shlib_CMakeLists.txt.diff
2018-10-18 16:43:20 +02:00

94 lines
3.2 KiB
Diff

Index: llvm-toolchain-snapshot_6.0~svn317126/clang/lib/Basic/FileManager.cpp
===================================================================
--- llvm-toolchain-snapshot_6.0~svn317126.orig/clang/lib/Basic/FileManager.cpp
+++ llvm-toolchain-snapshot_6.0~svn317126/clang/lib/Basic/FileManager.cpp
@@ -501,6 +501,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<const FileEntry *> &UIDToFiles) const {
UIDToFiles.clear();
Index: llvm-toolchain-snapshot_6.0~svn317126/lldb/include/lldb/lldb-defines.h
===================================================================
--- llvm-toolchain-snapshot_6.0~svn317126.orig/lldb/include/lldb/lldb-defines.h
+++ llvm-toolchain-snapshot_6.0~svn317126/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_6.0~svn317126/lib/Support/Unix/Path.inc
===================================================================
--- llvm-toolchain-snapshot_6.0~svn317126.orig/lib/Support/Unix/Path.inc
+++ llvm-toolchain-snapshot_6.0~svn317126/lib/Support/Unix/Path.inc
@@ -64,6 +64,7 @@
// For GNU Hurd
#if defined(__GNU__) && !defined(PATH_MAX)
# define PATH_MAX 4096
+# define MAXPATHLEN 4096
#endif
#include <sys/types.h>
Index: llvm-toolchain-snapshot_6.0~svn317126/tools/dsymutil/DwarfLinker.cpp
===================================================================
--- llvm-toolchain-snapshot_6.0~svn317126.orig/tools/dsymutil/DwarfLinker.cpp
+++ llvm-toolchain-snapshot_6.0~svn317126/tools/dsymutil/DwarfLinker.cpp
@@ -93,6 +93,11 @@
#include <utility>
#include <vector>
+// For GNU Hurd
+#if defined(__GNU__) && !defined(PATH_MAX)
+# define PATH_MAX 4096
+#endif
+
namespace llvm {
namespace dsymutil {
Index: llvm-toolchain-snapshot_6.0~svn317126/polly/lib/External/ppcg/cuda_common.c
===================================================================
--- llvm-toolchain-snapshot_6.0~svn317126.orig/polly/lib/External/ppcg/cuda_common.c
+++ llvm-toolchain-snapshot_6.0~svn317126/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-6.0-6.0.1/clang/lib/Frontend/ModuleDependencyCollector.cpp
===================================================================
--- llvm-toolchain-6.0-6.0.1.orig/clang/lib/Frontend/ModuleDependencyCollector.cpp
+++ llvm-toolchain-6.0-6.0.1/clang/lib/Frontend/ModuleDependencyCollector.cpp
@@ -97,6 +97,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<char> &RealPath) {
#ifdef LLVM_ON_UNIX