--- CMakeLists.txt.orig 2015-01-14 01:21:39 UTC +++ CMakeLists.txt @@ -459,7 +459,8 @@ if (APPLE) else(UNIX) if(NOT DEFINED CMAKE_INSTALL_RPATH) set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib") - if (${CMAKE_SYSTEM_NAME} MATCHES FreeBSD) + if (${CMAKE_SYSTEM_NAME} MATCHES FreeBSD + OR ${CMAKE_SYSTEM_NAME} MATCHES BSDSUniX) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,origin") endif() endif(NOT DEFINED CMAKE_INSTALL_RPATH) @@ -469,12 +470,14 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories( ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR}) -if( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD ) +if( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD + OR ${CMAKE_SYSTEM_NAME} MATCHES BSDSUniX ) # On FreeBSD, /usr/local/* is not used by default. In order to build LLVM # with libxml2, iconv.h, etc., we must add /usr/local paths. include_directories("/usr/local/include") link_directories("/usr/local/lib") -endif( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD ) +endif( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD + OR ${CMAKE_SYSTEM_NAME} MATCHES BSDSUniX ) if( ${CMAKE_SYSTEM_NAME} MATCHES SunOS ) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include llvm/Support/Solaris.h")