llvm.org GIT mirror llvm / 6fc30c2
Fix the build under Debian GNU/Hurd. Thanks to Pino Toscano for the patch git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154500 91177308-0d34-0410-b5e6-96231b3b80d8 Sylvestre Ledru 8 years ago
5 changed file(s) with 20 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
14311431 endif
14321432 endif
14331433
1434 ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD))
1434 ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux NetBSD FreeBSD GNU))
14351435 ifneq ($(ARCH), Mips)
14361436 LD.Flags += -Wl,--version-script=$(LLVM_SRC_ROOT)/autoconf/ExportMap.map
14371437 endif
5757
5858 #ifdef __APPLE__
5959 #include
60 #endif
61
62 // For GNU Hurd
63 #if defined(__GNU__) && !defined(MAXPATHLEN)
64 # define MAXPATHLEN 4096
6065 #endif
6166
6267 // Put in a hack for Cygwin which falsely reports that the mkdtemp function
4545 #include
4646 #endif
4747
48 // For GNU Hurd
49 #if defined(__GNU__) && !defined(PATH_MAX)
50 # define PATH_MAX 4096
51 #endif
52
4853 using namespace llvm;
4954
5055 namespace {
95100 namespace fs {
96101
97102 error_code current_path(SmallVectorImpl &result) {
103 #ifdef MAXPATHLEN
98104 result.reserve(MAXPATHLEN);
105 #else
106 // For GNU Hurd
107 result.reserve(1024);
108 #endif
99109
100110 while (true) {
101111 if (::getcwd(result.data(), result.capacity()) == 0) {
135135 return getgid();
136136 }
137137
138 #ifdef HAVE_MACH_MACH_H
138 #if defined(HAVE_MACH_MACH_H) && !defined(__GNU__)
139139 #include
140140 #endif
141141
149149 setrlimit(RLIMIT_CORE, &rlim);
150150 #endif
151151
152 #ifdef HAVE_MACH_MACH_H
152 #if defined(HAVE_MACH_MACH_H) && !defined(__GNU__)
153153 // Disable crash reporting on Mac OS X 10.0-10.4
154154
155155 // get information about the original set of exception ports for the task
6262 endif
6363 endif
6464
65 ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD OpenBSD))
65 ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD OpenBSD GNU))
6666 # Include everything from the .a's into the shared library.
6767 LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \
6868 -Wl,--no-whole-archive
7070 LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT)
7171 endif
7272
73 ifeq ($(HOST_OS),Linux)
73 ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU))
7474 # Don't allow unresolved symbols.
7575 LLVMLibsOptions += -Wl,--no-undefined
7676 endif