diff --git a/debian/patches/lldb/lldb-libname.diff b/debian/patches/lldb/lldb-libname.diff new file mode 100644 index 00000000..feb99140 --- /dev/null +++ b/debian/patches/lldb/lldb-libname.diff @@ -0,0 +1,17 @@ +--- + lldb/scripts/Python/finishSwigPythonLLDB.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: llvm-toolchain-snapshot_15~svn3315515/lldb/scripts/Python/finishSwigPythonLLDB.py +=================================================================== +--- llvm-toolchain-snapshot_15~svn3315515.orig/lldb/scripts/Python/finishSwigPythonLLDB.py ++++ llvm-toolchain-snapshot_15~svn3315515/lldb/scripts/Python/finishSwigPythonLLDB.py +@@ -443,7 +443,7 @@ def make_symlink_liblldb( + if eOSType == utilsOsType.EnumOsType.Darwin: + strLibFileExtn = ".dylib" + else: +- strLibFileExtn = ".so" ++ strLibFileExtn = "-15.so" + strSrc = os.path.join(vstrLldbLibDir, "liblldb" + strLibFileExtn) + + bOk, strErrMsg = make_symlink( diff --git a/debian/patches/lldb/lldb-soname.diff b/debian/patches/lldb/lldb-soname.diff new file mode 100644 index 00000000..363397be --- /dev/null +++ b/debian/patches/lldb/lldb-soname.diff @@ -0,0 +1,50 @@ +--- + lldb/source/API/CMakeLists.txt | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +Index: llvm-toolchain-snapshot_14~++20220119063448+5fa826f4e284/lldb/source/API/CMakeLists.txt +=================================================================== +--- llvm-toolchain-snapshot_14~++20220119063448+5fa826f4e284.orig/lldb/source/API/CMakeLists.txt ++++ llvm-toolchain-snapshot_14~++20220119063448+5fa826f4e284/lldb/source/API/CMakeLists.txt +@@ -15,7 +15,12 @@ if(LLDB_ENABLE_LUA) + set(lldb_lua_wrapper ${lua_bindings_dir}/LLDBWrapLua.cpp) + endif() + +-add_lldb_library(liblldb SHARED ${option_framework} ++set(output_name lldb) ++if (CMAKE_SYSTEM_NAME MATCHES "Windows") ++ set(output_name liblldb) ++endif() ++ ++add_lldb_library(liblldb SHARED OUTPUT_NAME ${output_name} SONAME + SBAddress.cpp + SBAttachInfo.cpp + SBBlock.cpp +@@ -158,7 +163,7 @@ endif() + + set_target_properties(liblldb + PROPERTIES +- VERSION ${LLDB_VERSION} ++ VERSION 1 + ) + + target_compile_definitions(liblldb PRIVATE LLDB_IN_LIBLLDB) +@@ -178,12 +183,12 @@ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windo + set_target_properties(liblldb_exports PROPERTIES FOLDER "lldb misc") + endif() + +-if (NOT MSVC) +- set_target_properties(liblldb +- PROPERTIES +- OUTPUT_NAME lldb +- ) +-endif() ++#if (NOT MSVC) ++# set_target_properties(liblldb ++# PROPERTIES ++# OUTPUT_NAME lldb ++# ) ++#endif() + + # The Clang expression parser in LLDB requires the Clang resource directory to function. + if (TARGET clang-resource-headers) diff --git a/debian/patches/lldb/lldb-swig-2.diff b/debian/patches/lldb/lldb-swig-2.diff new file mode 100644 index 00000000..54763838 --- /dev/null +++ b/debian/patches/lldb/lldb-swig-2.diff @@ -0,0 +1,13 @@ +diff --git a/lldb/bindings/python/python-typemaps.swig b/lldb/bindings/python/python-typemaps.swig +index 203be803d2ebd..11f68d59ae7be 100644 +--- a/lldb/bindings/python/python-typemaps.swig ++++ b/lldb/bindings/python/python-typemaps.swig +@@ -435,7 +435,7 @@ template <> bool SetNumberFromPyObject(double &number, PyObject *obj) { + + %typemap(out) lldb::FileSP { + $result = nullptr; +- lldb::FileSP &sp = $1; ++ const lldb::FileSP &sp = $1; + if (sp) { + PythonFile pyfile = unwrapOrSetPythonException(PythonFile::FromFile(*sp)); + if (!pyfile.IsValid()) diff --git a/debian/patches/lldb/lldb-swig.diff b/debian/patches/lldb/lldb-swig.diff new file mode 100644 index 00000000..93b54528 --- /dev/null +++ b/debian/patches/lldb/lldb-swig.diff @@ -0,0 +1,26 @@ +diff --git a/lldb/bindings/CMakeLists.txt b/lldb/bindings/CMakeLists.txt +index c8aa0bcf96817..9eed2f1e62999 100644 +--- a/lldb/bindings/CMakeLists.txt ++++ b/lldb/bindings/CMakeLists.txt +@@ -26,8 +26,6 @@ set(SWIG_COMMON_FLAGS + -features autodoc + -I${LLDB_SOURCE_DIR}/include + -I${CMAKE_CURRENT_SOURCE_DIR} +- -D__STDC_LIMIT_MACROS +- -D__STDC_CONSTANT_MACROS + ${DARWIN_EXTRAS} + ) + +diff --git a/lldb/bindings/interfaces.swig b/lldb/bindings/interfaces.swig +index fb75513a0df1b..d984711bbd8a2 100644 +--- a/lldb/bindings/interfaces.swig ++++ b/lldb/bindings/interfaces.swig +@@ -1,8 +1,5 @@ + /* Various liblldb typedefs that SWIG needs to know about. */ + #define __extension__ /* Undefine GCC keyword to make Swig happy when processing glibc's stdint.h. */ +-/* The ISO C99 standard specifies that in C++ implementations limit macros such +- as INT32_MAX should only be defined if __STDC_LIMIT_MACROS is. */ +-#define __STDC_LIMIT_MACROS + %include "stdint.i" + + %include "lldb/lldb-defines.h" diff --git a/debian/patches/lldb/print-lldb-path.patch b/debian/patches/lldb/print-lldb-path.patch new file mode 100644 index 00000000..9d9d32cf --- /dev/null +++ b/debian/patches/lldb/print-lldb-path.patch @@ -0,0 +1,16 @@ +Author: Gianfranco Costamagna +Last-Update: 2020-01-21 + +Index: llvm-toolchain-snapshot_15~++20220724113059+7feab85df8e8/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +=================================================================== +--- llvm-toolchain-snapshot_15~++20220724113059+7feab85df8e8.orig/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp ++++ llvm-toolchain-snapshot_15~++20220724113059+7feab85df8e8/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +@@ -239,6 +239,8 @@ void ScriptInterpreterPython::ComputePyt + // x86_64, or bin on Windows). + llvm::sys::path::remove_filename(path); + llvm::sys::path::append(path, LLDB_PYTHON_RELATIVE_LIBDIR); ++ // remove double "lib/lib" statement ++ std::replace(path.begin(), path.end(), '/lib/lib/', '/lib/'); + + #if defined(_WIN32) + // This will be injected directly through FileSpec.GetDirectory().SetString(), diff --git a/debian/patches/lldb/test-disable-lldb-i386.diff b/debian/patches/lldb/test-disable-lldb-i386.diff new file mode 100644 index 00000000..088f937d --- /dev/null +++ b/debian/patches/lldb/test-disable-lldb-i386.diff @@ -0,0 +1,26 @@ +Index: llvm-toolchain-snapshot_15~++20220510103135+63865e1fce62/integration-test-suite/tests/basic_lldb.c +=================================================================== +--- llvm-toolchain-snapshot_15~++20220510103135+63865e1fce62.orig/integration-test-suite/tests/basic_lldb.c ++++ llvm-toolchain-snapshot_15~++20220510103135+63865e1fce62/integration-test-suite/tests/basic_lldb.c +@@ -1,7 +1,7 @@ + // RUN: %clang -g -o %t %s + // RUN: %lldb -s %S/basic_lldb.in %t | grep "main at basic_lldb.c:" + // REQUIRES: lldb, clang +-// XFAIL: ppc64 ++// XFAIL: ppc64, i686, i386 + + int main() { + int a=0; +Index: llvm-toolchain-snapshot_15~++20220510103135+63865e1fce62/integration-test-suite/tests/basic_lldb2.cpp +=================================================================== +--- llvm-toolchain-snapshot_15~++20220510103135+63865e1fce62.orig/integration-test-suite/tests/basic_lldb2.cpp ++++ llvm-toolchain-snapshot_15~++20220510103135+63865e1fce62/integration-test-suite/tests/basic_lldb2.cpp +@@ -1,7 +1,7 @@ + // RUN: %clangxx -g -o %t %s + // RUN: %lldb -s %S/basic_lldb2.in %t | grep "stop reason = step over" + // REQUIRES: lldb, clangxx +-// XFAIL: ppc64 ++// XFAIL: ppc64, i686, i386 + + #include + int main (void)