Index: cmake/LLDBDependencies.cmake =================================================================== --- cmake/LLDBDependencies.cmake +++ cmake/LLDBDependencies.cmake @@ -152,10 +152,7 @@ endif() endif() 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: cmake/modules/LLDBConfig.cmake =================================================================== --- cmake/modules/LLDBConfig.cmake +++ cmake/modules/LLDBConfig.cmake @@ -410,3 +410,5 @@ list(APPEND system_libs ${CURSES_LIBRARIES}) include_directories(${CURSES_INCLUDE_DIR}) endif () + +find_package(Backtrace REQUIRED) Index: scripts/Python/modules/CMakeLists.txt =================================================================== --- scripts/Python/modules/CMakeLists.txt +++ scripts/Python/modules/CMakeLists.txt @@ -5,7 +5,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-macro-redefined") endif () -# build the Python readline suppression module only on Linux -if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT __ANDROID_NDK__) +# build the Python readline suppression module only on Linux or GNU systems +if ((CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "GNU" OR CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD") AND NOT __ANDROID_NDK__) add_subdirectory(readline) endif() Index: scripts/utilsOsType.py =================================================================== --- scripts/utilsOsType.py +++ scripts/utilsOsType.py @@ -35,6 +35,7 @@ Linux = 3 NetBSD = 4 Windows = 5 + kFreeBSD = 6 else: class EnumOsType(object): values = ["Unknown", @@ -42,7 +43,8 @@ "FreeBSD", "Linux", "NetBSD", - "Windows"] + "Windows", + "kFreeBSD"] class __metaclass__(type): #++--------------------------------------------------------------------------- # Details: Fn acts as an enumeration. @@ -86,5 +88,7 @@ eOSType = EnumOsType.NetBSD elif strOS == "win32": eOSType = EnumOsType.Windows + elif strOS.startswith("gnukfreebsd"): + eOSType = EnumOsType.kFreeBSD return eOSType