From: Nick Lewycky Date: Wed, 23 Jun 2010 06:48:34 +0000 (+0000) Subject: Don't link against libm and libpthread which don't exist in BeOS/Haiku. Also, X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ec4c02d252b4f2b3dda053c9c7c894832c91dfca;p=oota-llvm.git Don't link against libm and libpthread which don't exist in BeOS/Haiku. Also, Haiku like Linux provides , so use it. Patch by Paul Davey! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106620 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake index e72560bcef1..d9450d92585 100755 --- a/cmake/config-ix.cmake +++ b/cmake/config-ix.cmake @@ -4,7 +4,7 @@ include(CheckSymbolExists) include(CheckFunctionExists) include(CheckCXXSourceCompiles) -if( UNIX ) +if( UNIX AND NOT BEOS ) # Used by check_symbol_exists: set(CMAKE_REQUIRED_LIBRARIES m) endif() diff --git a/utils/TableGen/CMakeLists.txt b/utils/TableGen/CMakeLists.txt index 85847f164bb..972989ba623 100644 --- a/utils/TableGen/CMakeLists.txt +++ b/utils/TableGen/CMakeLists.txt @@ -41,6 +41,6 @@ target_link_libraries(tblgen LLVMSupport LLVMSystem) if( MINGW ) target_link_libraries(tblgen imagehlp psapi) endif( MINGW ) -if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD ) +if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD AND NOT BEOS ) target_link_libraries(tblgen pthread) endif() diff --git a/utils/unittest/googletest/README.LLVM b/utils/unittest/googletest/README.LLVM index 7322bec19dc..d6e6f987228 100644 --- a/utils/unittest/googletest/README.LLVM +++ b/utils/unittest/googletest/README.LLVM @@ -27,3 +27,5 @@ $ mv COPYING LICENSE.TXT Modified as follows: * To GTestStreamToHelper in include/gtest/internal/gtest-internal.h, added the ability to stream with raw_os_ostream. +* To refresh Haiku support in include/gtest/internal/gtest-port.h, + see http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20100621/102898.html diff --git a/utils/unittest/googletest/include/gtest/internal/gtest-port.h b/utils/unittest/googletest/include/gtest/internal/gtest-port.h index cc5637d2fea..9683271e48f 100644 --- a/utils/unittest/googletest/include/gtest/internal/gtest-port.h +++ b/utils/unittest/googletest/include/gtest/internal/gtest-port.h @@ -80,6 +80,7 @@ // the given platform; otherwise undefined): // GTEST_OS_AIX - IBM AIX // GTEST_OS_CYGWIN - Cygwin +// GTEST_OS_HAIKU - Haiku // GTEST_OS_LINUX - Linux // GTEST_OS_MAC - Mac OS X // GTEST_OS_SOLARIS - Sun Solaris @@ -220,11 +221,11 @@ #elif defined(_AIX) #define GTEST_OS_AIX 1 #elif defined(__HAIKU__) -#define GTEST_OS_HAIKU +#define GTEST_OS_HAIKU 1 #endif // __CYGWIN__ -#if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_SYMBIAN || \ - GTEST_OS_SOLARIS || GTEST_OS_AIX +#if GTEST_OS_CYGWIN || GTEST_OS_HAIKU || GTEST_OS_LINUX || GTEST_OS_MAC || \ + GTEST_OS_SYMBIAN || GTEST_OS_SOLARIS || GTEST_OS_AIX // On some platforms, needs someone to define size_t, and // won't compile otherwise. We can #include it here as we already