This revision was automatically updated to reflect the committed changes.
Closed by commit rL290044: Support of lldb on Kfreebsd  (authored by sylvestre).

Changed prior to commit:
  https://reviews.llvm.org/D23977?vs=77714&id=81842#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D23977

Files:
  lldb/trunk/cmake/LLDBDependencies.cmake
  lldb/trunk/cmake/modules/LLDBConfig.cmake
  lldb/trunk/scripts/Python/modules/CMakeLists.txt
  lldb/trunk/scripts/utilsOsType.py


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/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/scripts/utilsOsType.py
===================================================================
--- lldb/trunk/scripts/utilsOsType.py
+++ lldb/trunk/scripts/utilsOsType.py
@@ -36,14 +36,16 @@
         Linux = 3
         NetBSD = 4
         Windows = 5
+        kFreeBSD = 6
 else:
     class EnumOsType(object):
         values = ["Unknown",
                   "Darwin",
                   "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
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/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/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/scripts/utilsOsType.py
===================================================================
--- lldb/trunk/scripts/utilsOsType.py
+++ lldb/trunk/scripts/utilsOsType.py
@@ -36,14 +36,16 @@
         Linux = 3
         NetBSD = 4
         Windows = 5
+        kFreeBSD = 6
 else:
     class EnumOsType(object):
         values = ["Unknown",
                   "Darwin",
                   "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
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()
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to