summaryrefslogtreecommitdiff
path: root/debian/patches/lldb
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2019-12-02 17:06:08 +0300
committerIgor Pashev <pashev.igor@gmail.com>2019-12-02 17:06:08 +0300
commit18583eaa2c6fa769ce80605422fa10a60d353af7 (patch)
tree4b6730afc2006e86ae8b91c8c4cf52b313b5c188 /debian/patches/lldb
downloadllvm-toolchain-8-debian.tar.gz
Import llvm-toolchain-8 (1:8.0.1-4)debian/8.0.1-4debian
Diffstat (limited to 'debian/patches/lldb')
-rw-r--r--debian/patches/lldb/lldb-addversion-suffix-to-llvm-server-exec.patch34
-rw-r--r--debian/patches/lldb/lldb-disable-swig-error.diff13
-rw-r--r--debian/patches/lldb/lldb-link-atomic-cmake.patch27
-rw-r--r--debian/patches/lldb/lldb-missing-install.diff24
4 files changed, 98 insertions, 0 deletions
diff --git a/debian/patches/lldb/lldb-addversion-suffix-to-llvm-server-exec.patch b/debian/patches/lldb/lldb-addversion-suffix-to-llvm-server-exec.patch
new file mode 100644
index 0000000..598deb5
--- /dev/null
+++ b/debian/patches/lldb/lldb-addversion-suffix-to-llvm-server-exec.patch
@@ -0,0 +1,34 @@
+lldb-server exec users always /usr/bin/lldb-server. Server is required
+for any debugging with lldb which makes it unusable unless default version
+package has been installed. Small changes to code and debian/rules allows
+a workaround for lldb-server start up.
+
+To use this one needs to add cmake definition during configure. eg
+-DDEBIAN_VERSION_SUFFIX=-$(LLVM_VERSION)
+
+Better implementation would be to use /usr/share/llvm-$(VERSION)/bin but
+that change seems to require a big change to the path handling code
+which could then break something else.
+
+This probably should have upstream bug but I couldn't find any existing report.
+
+Index: llvm-toolchain-snapshot_8~svn349668/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+===================================================================
+--- llvm-toolchain-snapshot_8~svn349668.orig/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
++++ llvm-toolchain-snapshot_8~svn349668/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+@@ -33,13 +33,14 @@
+ #include "lldb/Utility/StreamString.h"
+ #include "llvm/ADT/SmallString.h"
+ #include "llvm/Support/ScopedPrinter.h"
++#include "llvm/Config/llvm-config.h"
+
+ #include "ProcessGDBRemoteLog.h"
+
+ #if defined(__APPLE__)
+ #define DEBUGSERVER_BASENAME "debugserver"
+ #else
+-#define DEBUGSERVER_BASENAME "lldb-server"
++# define DEBUGSERVER_BASENAME "lldb-server-" LLVM_VERSION_STRING
+ #endif
+
+ #if defined(__APPLE__)
diff --git a/debian/patches/lldb/lldb-disable-swig-error.diff b/debian/patches/lldb/lldb-disable-swig-error.diff
new file mode 100644
index 0000000..a715805
--- /dev/null
+++ b/debian/patches/lldb/lldb-disable-swig-error.diff
@@ -0,0 +1,13 @@
+Index: llvm-toolchain-snapshot_5.0~svn306792/lldb/scripts/lldb.swig
+===================================================================
+--- llvm-toolchain-snapshot_5.0~svn306792.orig/lldb/scripts/lldb.swig
++++ llvm-toolchain-snapshot_5.0~svn306792/lldb/scripts/lldb.swig
+@@ -50,7 +50,7 @@ except ImportError:
+ %enddef
+ // These versions will not generate working python modules, so error out early.
+ #if SWIG_VERSION >= 0x030009 && SWIG_VERSION < 0x030011
+-#error Swig versions 3.0.9 and 3.0.10 are incompatible with lldb.
++#warning Swig versions 3.0.9 and 3.0.10 are incompatible with lldb.
+ #endif
+
+ // The name of the module to be created.
diff --git a/debian/patches/lldb/lldb-link-atomic-cmake.patch b/debian/patches/lldb/lldb-link-atomic-cmake.patch
new file mode 100644
index 0000000..f4f2cab
--- /dev/null
+++ b/debian/patches/lldb/lldb-link-atomic-cmake.patch
@@ -0,0 +1,27 @@
+Description: Link with -latomic when mips* processor is detected
+Author: Gianfranco Costamagna <locutusofborg@debian.org>
+Last-Update: 2016-07-27
+
+---
+ lldb/cmake/LLDBDependencies.cmake | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+Index: llvm-toolchain-snapshot_8~svn349138/lldb/source/Utility/CMakeLists.txt
+===================================================================
+--- llvm-toolchain-snapshot_8~svn349138.orig/lldb/source/Utility/CMakeLists.txt
++++ llvm-toolchain-snapshot_8~svn349138/lldb/source/Utility/CMakeLists.txt
+@@ -32,6 +32,14 @@ endif()
+
+ list(APPEND LLDB_SYSTEM_LIBS ${system_libs})
+
++if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips" OR
++ CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mipsel" OR
++ CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips64el" OR
++ CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "powerpcspe")
++ list(APPEND LLDB_SYSTEM_LIBS atomic)
++endif()
++
++
+ if (LLVM_BUILD_STATIC)
+ if (NOT LLDB_DISABLE_PYTHON)
+ list(APPEND LLDB_SYSTEM_LIBS python2.7 util)
diff --git a/debian/patches/lldb/lldb-missing-install.diff b/debian/patches/lldb/lldb-missing-install.diff
new file mode 100644
index 0000000..a9541a6
--- /dev/null
+++ b/debian/patches/lldb/lldb-missing-install.diff
@@ -0,0 +1,24 @@
+Index: llvm-toolchain-snapshot_8~svn342269/lldb/tools/argdumper/CMakeLists.txt
+===================================================================
+--- llvm-toolchain-snapshot_8~svn342269.orig/lldb/tools/argdumper/CMakeLists.txt
++++ llvm-toolchain-snapshot_8~svn342269/lldb/tools/argdumper/CMakeLists.txt
+@@ -4,3 +4,7 @@ add_lldb_tool(lldb-argdumper INCLUDE_IN_
+ LINK_LIBS
+ lldbUtility
+ )
++
++install(TARGETS lldb-argdumper
++ RUNTIME DESTINATION bin)
++
+Index: llvm-toolchain-snapshot_8~svn342269/lldb/tools/lldb-server/CMakeLists.txt
+===================================================================
+--- llvm-toolchain-snapshot_8~svn342269.orig/lldb/tools/lldb-server/CMakeLists.txt
++++ llvm-toolchain-snapshot_8~svn342269/lldb/tools/lldb-server/CMakeLists.txt
+@@ -64,3 +64,7 @@ add_lldb_tool(lldb-server INCLUDE_IN_SUI
+ )
+
+ target_link_libraries(lldb-server PRIVATE ${LLDB_SYSTEM_LIBS})
++
++install(TARGETS lldb-server
++ RUNTIME DESTINATION bin)
++