llvm.org GIT mirror llvm / 21aa347
add minix support, patch by Kees van Reeuwijk! PR6797 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100895 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 9 years ago
6 changed file(s) with 27 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
158158 llvm_cv_no_link_all_option="-Wl,-noall_load"
159159 llvm_cv_os_type="Darwin"
160160 llvm_cv_platform_type="Unix" ;;
161 *-*-minix*)
162 llvm_cv_link_all_option="-Wl,-all_load"
163 llvm_cv_no_link_all_option="-Wl,-noall_load"
164 llvm_cv_os_type="Minix"
165 llvm_cv_platform_type="Unix" ;;
161166 *-*-freebsd*)
162167 llvm_cv_link_all_option="-Wl,--whole-archive"
163168 llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
246251 llvm_cv_target_os_type="Cygwin" ;;
247252 *-*-darwin*)
248253 llvm_cv_target_os_type="Darwin" ;;
254 *-*-minix*)
255 llvm_cv_target_os_type="Minix" ;;
249256 *-*-freebsd*)
250257 llvm_cv_target_os_type="FreeBSD" ;;
251258 *-*-openbsd*)
441441 }
442442
443443 size_t raw_fd_ostream::preferred_buffer_size() const {
444 #if !defined(_MSC_VER) && !defined(__MINGW32__) // Windows has no st_blksize.
444 #if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_MINIX)
445 // Windows and Minix have no st_blksize.
445446 assert(FD >= 0 && "File not yet open!");
446447 struct stat statbuf;
447448 if (fstat(FD, &statbuf) != 0)
4343
4444 #else
4545
46 #if HAVE_DLFCN_H
4647 #include
4748 using namespace llvm;
4849 using namespace llvm::sys;
6768 OpenedHandles->push_back(H);
6869 return false;
6970 }
71 #else
72
73 using namespace llvm;
74 using namespace llvm::sys;
75
76 bool DynamicLibrary::LoadLibraryPermanently(const char *Filename,
77 std::string *ErrMsg) {
78 if (ErrMsg) *ErrMsg = "dlopen() not supported on this platform";
79 return true;
80 }
81 #endif
7082
7183 namespace llvm {
7284 void *SearchForAddressOfSpecialSymbol(const char* symbolName);
8395 return I->second;
8496 }
8597
98 #if HAVE_DLFCN_H
8699 // Now search the libraries.
87100 if (OpenedHandles) {
88101 for (std::vector::iterator I = OpenedHandles->begin(),
94107 }
95108 }
96109 }
110 #endif
97111
98112 if (void *Result = llvm::SearchForAddressOfSpecialSymbol(symbolName))
99113 return Result;
1212 include $(LEVEL)/Makefile.config
1313
1414 # No support for plugins on windows targets
15 ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
15 ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW Minix))
1616 PARALLEL_DIRS := $(filter-out Hello, $(PARALLEL_DIRS))
1717 endif
1818
1919 PARALLEL_DIRS := $(filter-out libprofile, $(PARALLEL_DIRS))
2020 endif
2121
22 ifeq ($(TARGET_OS), $(filter $(TARGET_OS), Cygwin MingW))
22 ifeq ($(TARGET_OS), $(filter $(TARGET_OS), Cygwin MingW Minix))
2323 PARALLEL_DIRS := $(filter-out libprofile, $(PARALLEL_DIRS))
2424 endif
2525
226226 // TODO(wan@google.com): uses autoconf to detect whether ::std::wstring
227227 // is available.
228228
229 #if defined(GTEST_OS_CYGWIN) || defined(GTEST_OS_SOLARIS) || defined(GTEST_OS_HAIKU)
229 #if defined(GTEST_OS_CYGWIN) || defined(GTEST_OS_SOLARIS) || defined(GTEST_OS_HAIKU) || defined(_MINIX)
230230 // At least some versions of cygwin don't support ::std::wstring.
231231 // Solaris' libc++ doesn't support it either.
232 // Minix currently doesn't support it either.
232233 #define GTEST_HAS_STD_WSTRING 0
233234 #else
234235 #define GTEST_HAS_STD_WSTRING GTEST_HAS_STD_STRING