File lldb-cmake.patch of Package llvm4.8052
Index: lldb-4.0.1.src/source/lldb.cpp
===================================================================
--- lldb-4.0.1.src.orig/source/lldb.cpp
+++ lldb-4.0.1.src/source/lldb.cpp
@@ -23,11 +23,7 @@ using namespace lldb_private;
#endif
static const char *GetLLDBRevision() {
-#ifdef LLDB_REVISION
return LLDB_REVISION;
-#else
- return NULL;
-#endif
}
static const char *GetLLDBRepository() {
Index: lldb-4.0.1.src/source/Core/IOHandler.cpp
===================================================================
--- lldb-4.0.1.src.orig/source/Core/IOHandler.cpp
+++ lldb-4.0.1.src/source/Core/IOHandler.cpp
@@ -9,8 +9,8 @@
// C Includes
#ifndef LLDB_DISABLE_CURSES
-#include <curses.h>
-#include <panel.h>
+#include <ncurses/curses.h>
+#include <ncurses/panel.h>
#endif
// C++ Includes
Index: lldb-4.0.1.src/source/Host/CMakeLists.txt
===================================================================
--- lldb-4.0.1.src.orig/source/Host/CMakeLists.txt
+++ lldb-4.0.1.src/source/Host/CMakeLists.txt
@@ -162,4 +162,6 @@ add_lldb_library(lldbHost ${HOST_SOURCES
if (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
target_link_libraries(lldbHost kvm)
+elseif (CMAKE_SYSTEM_NAME MATCHES "Linux")
+set(EXTRA_LIBS dl pthread)
endif ()
Index: lldb-4.0.1.src/tools/lldb-mi/CMakeLists.txt
===================================================================
--- lldb-4.0.1.src.orig/tools/lldb-mi/CMakeLists.txt
+++ lldb-4.0.1.src/tools/lldb-mi/CMakeLists.txt
@@ -86,9 +86,6 @@ endif ()
set(LLVM_LINK_COMPONENTS Support)
add_lldb_tool(lldb-mi ${LLDB_MI_SOURCES})
-target_link_libraries(lldb-mi liblldb)
-if (HAVE_LIBPTHREAD)
- target_link_libraries(lldb-mi pthread)
-endif ()
+target_link_libraries(lldb-mi liblldb pthread)
set_target_properties(lldb-mi PROPERTIES VERSION ${LLDB_VERSION})