Index: lldb/trunk/cmake/LLDBDependencies.cmake =================================================================== --- lldb/trunk/cmake/LLDBDependencies.cmake +++ lldb/trunk/cmake/LLDBDependencies.cmake @@ -161,10 +161,7 @@ list(APPEND LLDB_SYSTEM_LIBS atomic) endif() -# On FreeBSD/NetBSD backtrace() is provided by libexecinfo, not libc. -if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD") - list(APPEND LLDB_SYSTEM_LIBS execinfo) -endif() +list(APPEND LLDB_SYSTEM_LIBS ${Backtrace_LIBRARY}) if (NOT LLDB_DISABLE_PYTHON AND NOT LLVM_BUILD_STATIC) list(APPEND LLDB_SYSTEM_LIBS ${PYTHON_LIBRARIES}) Index: lldb/trunk/cmake/modules/LLDBConfig.cmake =================================================================== --- lldb/trunk/cmake/modules/LLDBConfig.cmake +++ lldb/trunk/cmake/modules/LLDBConfig.cmake @@ -416,3 +416,5 @@ if(LLDB_USE_BUILTIN_DEMANGLER) add_definitions(-DLLDB_USE_BUILTIN_DEMANGLER) endif() + +find_package(Backtrace) Index: lldb/trunk/scripts/Python/modules/CMakeLists.txt =================================================================== --- lldb/trunk/scripts/Python/modules/CMakeLists.txt +++ lldb/trunk/scripts/Python/modules/CMakeLists.txt @@ -6,6 +6,6 @@ endif () # build the Python readline suppression module only on Linux -if (CMAKE_SYSTEM_NAME MATCHES "Linux") +​if (CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "GNU" OR CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD") add_subdirectory(readline) endif() Index: lldb/trunk/scripts/utilsOsType.py =================================================================== --- lldb/trunk/scripts/utilsOsType.py +++ lldb/trunk/scripts/utilsOsType.py @@ -36,6 +36,7 @@ Linux = 3 NetBSD = 4 Windows = 5 + kFreeBSD = 6 else: class EnumOsType(object): values = ["Unknown", @@ -43,7 +44,8 @@ "FreeBSD", "Linux", "NetBSD", - "Windows"] + "Windows", + "kFreeBSD"] class __metaclass__(type): #++---------------------------------------------------------------- @@ -91,5 +93,7 @@ eOSType = EnumOsType.NetBSD elif strOS == "win32": eOSType = EnumOsType.Windows + elif strOS.startswith("gnukfreebsd"): + eOSType = EnumOsType.kFreeBSD return eOSType