From 5eae99171a495bc3d488f3901e4b9ebc0302ea60 Mon Sep 17 00:00:00 2001 From: LLVM Packaging Team Date: Sun, 12 Mar 2017 08:49:18 +0000 Subject: [PATCH] lldb-soname Gbp-Pq: Name lldb-soname.diff --- lldb/lib/Makefile | 3 ++- lldb/scripts/Python/finishSwigPythonLLDB.py | 2 +- lldb/source/API/CMakeLists.txt | 14 +++++++------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lldb/lib/Makefile b/lldb/lib/Makefile index 02959354..aa005195 100644 --- a/lldb/lib/Makefile +++ b/lldb/lib/Makefile @@ -16,6 +16,7 @@ LIBRARYNAME = lldb NO_BUILD_ARCHIVE = 1 LINK_LIBS_IN_SHARED = 1 SHARED_LIBRARY = 1 +SONAME_EXTENSION = 1 ifeq (,$(findstring -DLLDB_DISABLE_PYTHON,$(CXXFLAGS))) PYTHON_CONFIG?= python-config @@ -191,7 +192,7 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU GNU/kFreeBSD)) LLVMLibsOptions += -Wl,--no-undefined # Link in python LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -ledit -lncurses -lpanel -lpthread - LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT) + LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT).$(SONAME_EXTENSION) ifneq (,$(filter $(shell dpkg-architecture -qDEB_HOST_ARCH), mips mipsel powerpc powerpcspe)) # Link GCC atomic helper library LLVMLibsOptions += -latomic diff --git a/lldb/scripts/Python/finishSwigPythonLLDB.py b/lldb/scripts/Python/finishSwigPythonLLDB.py index e9a614d5..f75b27f3 100644 --- a/lldb/scripts/Python/finishSwigPythonLLDB.py +++ b/lldb/scripts/Python/finishSwigPythonLLDB.py @@ -379,7 +379,7 @@ def make_symlink_liblldb(vDictArgs, vstrFrameworkPythonDir, vstrLiblldbFileName, if eOSType == utilsOsType.EnumOsType.Darwin: strLibFileExtn = ".dylib" else: - strLibFileExtn = ".so" + strLibFileExtn = "-3.8.so.1" strSrc = os.path.join(vstrLldbLibDir, "liblldb" + strLibFileExtn) bOk, strErrMsg = make_symlink(vDictArgs, vstrFrameworkPythonDir, strSrc, strTarget) diff --git a/lldb/source/API/CMakeLists.txt b/lldb/source/API/CMakeLists.txt index 06a26e17..80c8f9c7 100644 --- a/lldb/source/API/CMakeLists.txt +++ b/lldb/source/API/CMakeLists.txt @@ -6,7 +6,12 @@ endif() # for liblldb to link against include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake) -add_lldb_library(liblldb SHARED +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 @@ -78,7 +83,7 @@ target_link_libraries(liblldb PRIVATE set_target_properties(liblldb PROPERTIES - VERSION ${LLDB_VERSION} + VERSION 1 ) if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows") @@ -105,11 +110,6 @@ if ( CMAKE_SYSTEM_NAME MATCHES "Windows" ) if (MSVC AND NOT LLDB_DISABLE_PYTHON) target_link_libraries(liblldb PRIVATE ${PYTHON_LIBRARY}) endif() -else() - set_target_properties(liblldb - PROPERTIES - OUTPUT_NAME lldb - ) endif() if (LLDB_WRAP_PYTHON) -- 2.30.2