Support of lldb on Kfreebsd

Summary: Patch by Pino Toscano. Reported in http://bugs.debian.org/835665

Reviewers: tfiala, emaste

Subscribers: beanz, mgorny, emaste, krytarowski, brucem, tberghammer, danalbert, srhines, #lldb

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D23977

llvm-svn: 290044
This commit is contained in:
Sylvestre Ledru 2016-12-17 12:48:06 +00:00
parent fa1030e40b
commit 47b071deff
4 changed files with 9 additions and 6 deletions

View File

@ -161,10 +161,7 @@ if (NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB )
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})

View File

@ -416,3 +416,5 @@ endif()
if(LLDB_USE_BUILTIN_DEMANGLER)
add_definitions(-DLLDB_USE_BUILTIN_DEMANGLER)
endif()
find_package(Backtrace)

View File

@ -6,6 +6,6 @@ if (CXX_SUPPORTS_NO_MACRO_REDEFINED)
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()

View File

@ -36,6 +36,7 @@ if sys.version_info.major >= 3:
Linux = 3
NetBSD = 4
Windows = 5
kFreeBSD = 6
else:
class EnumOsType(object):
values = ["Unknown",
@ -43,7 +44,8 @@ else:
"FreeBSD",
"Linux",
"NetBSD",
"Windows"]
"Windows",
"kFreeBSD"]
class __metaclass__(type):
#++----------------------------------------------------------------
@ -91,5 +93,7 @@ def determine_os_type():
eOSType = EnumOsType.NetBSD
elif strOS == "win32":
eOSType = EnumOsType.Windows
elif strOS.startswith("gnukfreebsd"):
eOSType = EnumOsType.kFreeBSD
return eOSType