[llvm-commits] [llvm] r100895 - in /llvm/trunk: autoconf/configure.ac lib/Support/raw_ostream.cpp lib/System/DynamicLibrary.cpp lib/Transforms/Makefile runtime/Makefile utils/unittest/googletest/include/gtest/internal/gtest-port.h

Chris Lattner sabre at nondot.org
Fri Apr 9 13:45:04 PDT 2010


Author: lattner
Date: Fri Apr  9 15:45:04 2010
New Revision: 100895

URL: http://llvm.org/viewvc/llvm-project?rev=100895&view=rev
Log:
add minix support, patch by Kees van Reeuwijk!  PR6797

Modified:
    llvm/trunk/autoconf/configure.ac
    llvm/trunk/lib/Support/raw_ostream.cpp
    llvm/trunk/lib/System/DynamicLibrary.cpp
    llvm/trunk/lib/Transforms/Makefile
    llvm/trunk/runtime/Makefile
    llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h

Modified: llvm/trunk/autoconf/configure.ac
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/autoconf/configure.ac?rev=100895&r1=100894&r2=100895&view=diff
==============================================================================
--- llvm/trunk/autoconf/configure.ac (original)
+++ llvm/trunk/autoconf/configure.ac Fri Apr  9 15:45:04 2010
@@ -159,6 +159,11 @@
     llvm_cv_no_link_all_option="-Wl,-noall_load"
     llvm_cv_os_type="Darwin"
     llvm_cv_platform_type="Unix" ;;
+  *-*-minix*)
+    llvm_cv_link_all_option="-Wl,-all_load"
+    llvm_cv_no_link_all_option="-Wl,-noall_load"
+    llvm_cv_os_type="Minix"
+    llvm_cv_platform_type="Unix" ;;
   *-*-freebsd*)
     llvm_cv_link_all_option="-Wl,--whole-archive"
     llvm_cv_no_link_all_option="-Wl,--no-whole-archive"
@@ -247,6 +252,8 @@
     llvm_cv_target_os_type="Cygwin" ;;
   *-*-darwin*)
     llvm_cv_target_os_type="Darwin" ;;
+  *-*-minix*)
+    llvm_cv_target_os_type="Minix" ;;
   *-*-freebsd*)
     llvm_cv_target_os_type="FreeBSD" ;;
   *-*-openbsd*)

Modified: llvm/trunk/lib/Support/raw_ostream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/raw_ostream.cpp?rev=100895&r1=100894&r2=100895&view=diff
==============================================================================
--- llvm/trunk/lib/Support/raw_ostream.cpp (original)
+++ llvm/trunk/lib/Support/raw_ostream.cpp Fri Apr  9 15:45:04 2010
@@ -442,7 +442,8 @@
 }
 
 size_t raw_fd_ostream::preferred_buffer_size() const {
-#if !defined(_MSC_VER) && !defined(__MINGW32__) // Windows has no st_blksize.
+#if !defined(_MSC_VER) && !defined(__MINGW32__) && !defined(_MINIX)
+  // Windows and Minix have no st_blksize.
   assert(FD >= 0 && "File not yet open!");
   struct stat statbuf;
   if (fstat(FD, &statbuf) != 0)

Modified: llvm/trunk/lib/System/DynamicLibrary.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/DynamicLibrary.cpp?rev=100895&r1=100894&r2=100895&view=diff
==============================================================================
--- llvm/trunk/lib/System/DynamicLibrary.cpp (original)
+++ llvm/trunk/lib/System/DynamicLibrary.cpp Fri Apr  9 15:45:04 2010
@@ -44,6 +44,7 @@
 
 #else
 
+#if HAVE_DLFCN_H
 #include <dlfcn.h>
 using namespace llvm;
 using namespace llvm::sys;
@@ -68,6 +69,17 @@
   OpenedHandles->push_back(H);
   return false;
 }
+#else
+
+using namespace llvm;
+using namespace llvm::sys;
+
+bool DynamicLibrary::LoadLibraryPermanently(const char *Filename,
+                                            std::string *ErrMsg) {
+  if (ErrMsg) *ErrMsg = "dlopen() not supported on this platform";
+  return true;
+}
+#endif
 
 namespace llvm {
 void *SearchForAddressOfSpecialSymbol(const char* symbolName);
@@ -84,6 +96,7 @@
       return I->second;
   }
 
+#if HAVE_DLFCN_H
   // Now search the libraries.
   if (OpenedHandles) {
     for (std::vector<void *>::iterator I = OpenedHandles->begin(),
@@ -95,6 +108,7 @@
       }
     }
   }
+#endif
 
   if (void *Result = llvm::SearchForAddressOfSpecialSymbol(symbolName))
     return Result;

Modified: llvm/trunk/lib/Transforms/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Makefile?rev=100895&r1=100894&r2=100895&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Makefile (original)
+++ llvm/trunk/lib/Transforms/Makefile Fri Apr  9 15:45:04 2010
@@ -13,7 +13,7 @@
 include $(LEVEL)/Makefile.config
 
 # No support for plugins on windows targets
-ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
+ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW Minix))
   PARALLEL_DIRS := $(filter-out Hello, $(PARALLEL_DIRS))
 endif
 

Modified: llvm/trunk/runtime/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/runtime/Makefile?rev=100895&r1=100894&r2=100895&view=diff
==============================================================================
--- llvm/trunk/runtime/Makefile (original)
+++ llvm/trunk/runtime/Makefile Fri Apr  9 15:45:04 2010
@@ -20,7 +20,7 @@
 PARALLEL_DIRS := $(filter-out libprofile, $(PARALLEL_DIRS))
 endif
 
-ifeq ($(TARGET_OS), $(filter $(TARGET_OS), Cygwin MingW))
+ifeq ($(TARGET_OS), $(filter $(TARGET_OS), Cygwin MingW Minix))
 PARALLEL_DIRS := $(filter-out libprofile, $(PARALLEL_DIRS))
 endif
 

Modified: llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h?rev=100895&r1=100894&r2=100895&view=diff
==============================================================================
--- llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h (original)
+++ llvm/trunk/utils/unittest/googletest/include/gtest/internal/gtest-port.h Fri Apr  9 15:45:04 2010
@@ -227,9 +227,10 @@
 // TODO(wan at google.com): uses autoconf to detect whether ::std::wstring
 //   is available.
 
-#if defined(GTEST_OS_CYGWIN) || defined(GTEST_OS_SOLARIS) || defined(GTEST_OS_HAIKU)
+#if defined(GTEST_OS_CYGWIN) || defined(GTEST_OS_SOLARIS) || defined(GTEST_OS_HAIKU) || defined(_MINIX)
 // At least some versions of cygwin don't support ::std::wstring.
 // Solaris' libc++ doesn't support it either.
+// Minix currently doesn't support it either.
 #define GTEST_HAS_STD_WSTRING 0
 #else
 #define GTEST_HAS_STD_WSTRING GTEST_HAS_STD_STRING





More information about the llvm-commits mailing list