Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (f97f9c4609185864868c69c3451b25c8867336d6)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pavel Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (f97f9c4609185864868c69c3451b25c8867336d6)
  • Date: Tue, 5 May 2015 02:12:58 -0500

GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:

devel/llvm/HISTORY | 5 ++
devel/llvm/PRE_BUILD | 4 +
devel/llvm/lldb-shared-libs.patch | 94
++++++++++++++++++++++++++++++++++++++
3 files changed, 102 insertions(+), 1 deletion(-)

New commits:
commit f97f9c4609185864868c69c3451b25c8867336d6
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>

devel/llvm: added a fix for building lldb with shared llvm and system
libraries

diff --git a/devel/llvm/HISTORY b/devel/llvm/HISTORY
index 9b0f44c..2e25994 100644
--- a/devel/llvm/HISTORY
+++ b/devel/llvm/HISTORY
@@ -1,3 +1,8 @@
+2015-05-05 Pavel Vinogradov <public AT sourcemage.org>
+ * PRE_BUILD, lldb-shared-libs.patch: added a fix for building lldb
+ with shared llvm and system libraries (found here:
+ https://llvm.org/bugs/show_bug.cgi?id=21670#c8)
+
2015-04-06 Florian Franzmann <siflfran AT hawo.stw.uni-erlangen.de>
* PRE_BUILD: use absolute path when sediting CMakeLists.txt

diff --git a/devel/llvm/PRE_BUILD b/devel/llvm/PRE_BUILD
index 335bfa9..22a9421 100755
--- a/devel/llvm/PRE_BUILD
+++ b/devel/llvm/PRE_BUILD
@@ -18,7 +18,9 @@ fi &&
if [[ "$LLVM_WITH_LLDB" == y ]]; then
cd ${SOURCE_DIRECTORY}/tools &&
unpack_file 7 &&
- mv lldb-${VERSION}.src lldb
+ mv lldb-${VERSION}.src lldb &&
+ cd lldb &&
+ patch -p1 < ${SPELL_DIRECTORY}/lldb-shared-libs.patch
fi &&

# small cmake related fix for libffi
diff --git a/devel/llvm/lldb-shared-libs.patch
b/devel/llvm/lldb-shared-libs.patch
new file mode 100644
index 0000000..f267336
--- /dev/null
+++ b/devel/llvm/lldb-shared-libs.patch
@@ -0,0 +1,94 @@
+diff --git a/cmake/LLDBDependencies.cmake b/cmake/LLDBDependencies.cmake
+index 9416a67..86c83d5 100644
+--- a/cmake/LLDBDependencies.cmake
++++ b/cmake/LLDBDependencies.cmake
+@@ -161,6 +161,7 @@ set( LLVM_LINK_COMPONENTS
+ mcdisassembler
+ executionengine
+ option
++ support
+ )
+
+ if ( NOT LLDB_DISABLE_PYTHON )
+diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
+index d551ebb..37ffb8f 100644
+--- a/source/CMakeLists.txt
++++ b/source/CMakeLists.txt
+@@ -30,6 +30,10 @@ endif ()
+ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows" )
+ add_subdirectory(API)
+ endif ()
++
++if (BUILD_SHARED_LIBS)
++ set(SHARED_LIBRARY 1)
++endif()
+ add_subdirectory(Breakpoint)
+ add_subdirectory(Commands)
+ add_subdirectory(Core)
+diff --git a/tools/lldb-gdbserver/CMakeLists.txt
b/tools/lldb-gdbserver/CMakeLists.txt
+index 1dc2e1c..e38e69d 100644
+--- a/tools/lldb-gdbserver/CMakeLists.txt
++++ b/tools/lldb-gdbserver/CMakeLists.txt
+@@ -17,26 +17,33 @@ include_directories(../../source)
+
+ include(../../cmake/LLDBDependencies.cmake)
+
+-# have to include lldb and lldb-log files since those are not libraries and
llgs depends on them
+-add_lldb_executable(lldb-gdbserver
+- lldb-gdbserver.cpp
+- ../../source/lldb-log.cpp
+- ../../source/lldb.cpp
+- )
++if ( BUILD_SHARED_LIBS )
++ add_lldb_executable(lldb-gdbserver
++ lldb-gdbserver.cpp
++ )
+
+-# The Darwin linker doesn't understand --start-group/--end-group.
+-if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT "${CMAKE_SYSTEM_NAME}" MATCHES
"Darwin")
+- target_link_libraries(lldb-gdbserver
+- -Wl,--start-group ${LLDB_USED_LIBS} -Wl,--end-group)
++ target_link_libraries(lldb-gdbserver liblldb)
+ else()
+- target_link_libraries(lldb-gdbserver ${LLDB_USED_LIBS})
++ # have to include lldb and lldb-log files since those are not libraries
and llgs depends on them
++ add_lldb_executable(lldb-gdbserver
++ lldb-gdbserver.cpp
++ ../../source/lldb-log.cpp
++ ../../source/lldb.cpp
++ )
++
++ # The Darwin linker doesn't understand --start-group/--end-group.
++ if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT "${CMAKE_SYSTEM_NAME}"
MATCHES "Darwin")
++ target_link_libraries(lldb-gdbserver
++ -Wl,--start-group ${LLDB_USED_LIBS}
-Wl,--end-group)
++ else()
++ target_link_libraries(lldb-gdbserver ${LLDB_USED_LIBS})
++ endif()
++ target_link_libraries(lldb-gdbserver ${CLANG_USED_LIBS})
++ llvm_config(lldb-gdbserver ${LLVM_LINK_COMPONENTS})
++
++ target_link_libraries(lldb-gdbserver ${LLDB_SYSTEM_LIBS})
+ endif()
+-target_link_libraries(lldb-gdbserver ${CLANG_USED_LIBS})
+-llvm_config(lldb-gdbserver ${LLVM_LINK_COMPONENTS})
+-
+-target_link_libraries(lldb-gdbserver ${LLDB_SYSTEM_LIBS})
+
+ set_target_properties(lldb-gdbserver PROPERTIES VERSION ${LLDB_VERSION})
+-
+ install(TARGETS lldb-gdbserver
+ RUNTIME DESTINATION bin)
+diff --git a/tools/lldb-mi/CMakeLists.txt b/tools/lldb-mi/CMakeLists.txt
+index cc4347f..9bdca83 100644
+--- a/tools/lldb-mi/CMakeLists.txt
++++ b/tools/lldb-mi/CMakeLists.txt
+@@ -164,7 +164,7 @@ add_lldb_executable(lldb-mi
+ )
+ endif ()
+
+-target_link_libraries(lldb-mi liblldb)
++target_link_libraries(lldb-mi liblldb pthread)
+ # TODO: why isn't this done by add_lldb_executable?
+ #target_link_libraries(lldb-mi ${LLDB_USED_LIBS})
+ #llvm_config(lldb-mi ${LLVM_LINK_COMPONENTS})



  • [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (f97f9c4609185864868c69c3451b25c8867336d6), Pavel Vinogradov, 05/05/2015

Archive powered by MHonArc 2.6.24.

Top of Page