[Lldb-commits] [PATCH] D23977: Support of lldb on Kfreebsd

Sylvestre Ledru via lldb-commits lldb-commits at lists.llvm.org
Sun Aug 28 14:20:34 PDT 2016


sylvestre.ledru created this revision.
sylvestre.ledru added a reviewer: tfiala.
sylvestre.ledru added a subscriber: LLDB.
sylvestre.ledru added a project: LLDB.
Herald added subscribers: srhines, danalbert, tberghammer.

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

https://reviews.llvm.org/D23977

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

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
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: cmake/LLDBDependencies.cmake
===================================================================
--- cmake/LLDBDependencies.cmake
+++ cmake/LLDBDependencies.cmake
@@ -165,7 +165,7 @@
 endif()
 
 # On FreeBSD/NetBSD backtrace() is provided by libexecinfo, not libc.
-if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD")
+if ((CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD") AND NOT CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD")
   list(APPEND LLDB_SYSTEM_LIBS execinfo)
 endif()
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23977.69522.patch
Type: text/x-patch
Size: 2107 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160828/024b3ccc/attachment.bin>


More information about the lldb-commits mailing list