diff --git a/debian/patches/lldb-addversion-suffix-to-llvm-server-exec.patch b/debian/patches/lldb-addversion-suffix-to-llvm-server-exec.patch index fda04196..fa2a5f18 100644 --- a/debian/patches/lldb-addversion-suffix-to-llvm-server-exec.patch +++ b/debian/patches/lldb-addversion-suffix-to-llvm-server-exec.patch @@ -12,16 +12,24 @@ which could then break something else. This probably should have upstream bug but I couldn't find any existing report. -Index: llvm-toolchain-snapshot_4.0~svn291344/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +Index: llvm-toolchain-snapshot_4.0~svn291432/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp =================================================================== ---- llvm-toolchain-snapshot_4.0~svn291344.orig/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp -+++ llvm-toolchain-snapshot_4.0~svn291344/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp -@@ -39,7 +39,7 @@ +--- llvm-toolchain-snapshot_4.0~svn291432.orig/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp ++++ llvm-toolchain-snapshot_4.0~svn291432/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +@@ -32,6 +32,7 @@ + #include "lldb/Target/Process.h" + #include "llvm/ADT/SmallString.h" + #include "llvm/Support/ScopedPrinter.h" ++#include "llvm/Config/llvm-config.h" + + // Project includes + #include "ProcessGDBRemoteLog.h" +@@ -39,7 +40,7 @@ #if defined(__APPLE__) #define DEBUGSERVER_BASENAME "debugserver" #else -#define DEBUGSERVER_BASENAME "lldb-server" -+# define DEBUGSERVER_BASENAME "lldb-server-4.0" ++# define DEBUGSERVER_BASENAME "lldb-server-"LLVM_VERSION_STRING #endif #if defined(HAVE_LIBCOMPRESSION) diff --git a/debian/patches/lldb-server-link-issue.patch b/debian/patches/lldb-server-link-issue.patch new file mode 100644 index 00000000..c6204d1e --- /dev/null +++ b/debian/patches/lldb-server-link-issue.patch @@ -0,0 +1,19 @@ +Index: llvm-toolchain-snapshot_4.0~svn291432/lldb/tools/lldb-server/CMakeLists.txt +=================================================================== +--- llvm-toolchain-snapshot_4.0~svn291432.orig/lldb/tools/lldb-server/CMakeLists.txt ++++ llvm-toolchain-snapshot_4.0~svn291432/lldb/tools/lldb-server/CMakeLists.txt +@@ -183,7 +183,13 @@ else() + target_link_libraries(lldb-server ${LLDB_USED_LIBS}) + target_link_libraries(lldb-server ${CLANG_USED_LIBS}) + endif() +-llvm_config(lldb-server ${LLVM_LINK_COMPONENTS}) ++if(NOT LLVM_LINK_LLVM_DYLIB) ++ # This is necessary in !LLVM_LINK_LLVM_DYLIB as LLDB's libs do not track their ++ # dependencies properly. It is conditional because in a LLVM_LINK_LLVM_DYLIB ++ # build it would introduce duplicate symbols (add_lldb_tool links to libLLVM, ++ # and this would add the individual .a files as well). ++ llvm_config(lldb-server ${LLVM_LINK_COMPONENTS}) ++endif() + + target_link_libraries(lldb-server ${LLDB_SYSTEM_LIBS}) + diff --git a/debian/patches/series b/debian/patches/series index a2a5d940..701fb8d9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -43,3 +43,4 @@ clang-fix-cmpxchg8-detection-on-i386.patch lldb-addversion-suffix-to-llvm-server-exec.patch lldb-missing-install.diff silent-test-failing-codeverage.diff +lldb-server-link-issue.patch