1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
--- a/compiler-rt/cmake/config-ix.cmake
+++ b/compiler-rt/cmake/config-ix.cmake
@@ -560,7 +560,8 @@ endif()
if (SANITIZER_COMMON_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND
(OS_NAME MATCHES "Android|Darwin|Linux|FreeBSD" OR
- (OS_NAME MATCHES "Windows" AND MSVC)))
+ (OS_NAME MATCHES "Windows" AND MSVC))
+ AND NOT (OS_NAME STREQUAL "kFreeBSD"))
set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE)
else()
set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE)
--- a/tools/llvm-shlib/CMakeLists.txt
+++ b/tools/llvm-shlib/CMakeLists.txt
@@ -42,7 +42,7 @@ add_llvm_library(LLVM SHARED DISABLE_LLV
set_property(TARGET LLVM PROPERTY VERSION "1") # Append .1 to SONAME
list(REMOVE_DUPLICATES LIB_NAMES)
-if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") # FIXME: It should be "GNU ld for elf"
+if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "GNU" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "kFreeBSD") # FIXME: It should be "GNU ld for elf"
# GNU ld doesn't resolve symbols in the version script.
set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
--- a/lldb/cmake/LLDBDependencies.cmake
+++ b/lldb/cmake/LLDBDependencies.cmake
@@ -152,10 +152,7 @@ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windo
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})
--- a/lldb/scripts/utilsOsType.py
+++ b/lldb/scripts/utilsOsType.py
@@ -35,6 +35,7 @@ if sys.version_info.major >= 3:
Linux = 3
NetBSD = 4
Windows = 5
+ kFreeBSD = 6
else:
class EnumOsType(object):
values = ["Unknown",
@@ -42,7 +43,8 @@ else:
"FreeBSD",
"Linux",
"NetBSD",
- "Windows"]
+ "Windows",
+ "kFreeBSD"]
class __metaclass__(type):
#++---------------------------------------------------------------------------
# Details: Fn acts as an enumeration.
@@ -86,5 +88,7 @@ def determine_os_type():
eOSType = EnumOsType.NetBSD
elif strOS == "win32":
eOSType = EnumOsType.Windows
+ elif strOS.startswith("gnukfreebsd"):
+ eOSType = EnumOsType.kFreeBSD
return eOSType
--- a/lldb/scripts/Python/modules/CMakeLists.txt
+++ b/lldb/scripts/Python/modules/CMakeLists.txt
@@ -5,7 +5,7 @@ if (CXX_SUPPORTS_NO_MACRO_REDEFINED)
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()
--- a/lldb/cmake/modules/LLDBConfig.cmake
+++ b/lldb/cmake/modules/LLDBConfig.cmake
@@ -410,3 +410,5 @@ if (NOT LLDB_DISABLE_CURSES)
list(APPEND system_libs ${CURSES_LIBRARIES})
include_directories(${CURSES_INCLUDE_DIR})
endif ()
+
+find_package(Backtrace REQUIRED)
|