mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-06-11 07:35:54 +00:00
Update patches to set SONAME in CMake build
This commit is contained in:
parent
ff27c6a81a
commit
a78bc09a9e
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -2,6 +2,7 @@ llvm-toolchain-snapshot (1:3.8~svn256489-1~exp1) experimental; urgency=medium
|
||||
|
||||
* New snapshot release
|
||||
* Cmake migration. Done by Andrew Wilkins. Many thanks to him
|
||||
- Update patches to set SONAME in CMake build
|
||||
|
||||
-- Sylvestre Ledru <sylvestre@debian.org> Mon, 28 Dec 2015 09:31:25 +0100
|
||||
|
||||
|
29
debian/patches/0044-soname.diff
vendored
29
debian/patches/0044-soname.diff
vendored
@ -1,8 +1,6 @@
|
||||
Index: llvm-toolchain-snapshot_3.7~svn241915/tools/llvm-shlib/Makefile
|
||||
===================================================================
|
||||
--- llvm-toolchain-snapshot_3.7~svn241915.orig/tools/llvm-shlib/Makefile
|
||||
+++ llvm-toolchain-snapshot_3.7~svn241915/tools/llvm-shlib/Makefile
|
||||
@@ -67,7 +67,7 @@ endif
|
||||
--- a/tools/llvm-shlib/Makefile
|
||||
+++ b/tools/llvm-shlib/Makefile
|
||||
@@ -67,7 +67,7 @@
|
||||
|
||||
ifeq ($(HOST_OS), $(filter $(HOST_OS), DragonFly Linux FreeBSD GNU/kFreeBSD GNU))
|
||||
# Add soname to the library.
|
||||
@ -11,3 +9,24 @@ Index: llvm-toolchain-snapshot_3.7~svn241915/tools/llvm-shlib/Makefile
|
||||
endif
|
||||
|
||||
ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU GNU/kFreeBSD))
|
||||
--- a/tools/llvm-shlib/CMakeLists.txt
|
||||
+++ b/tools/llvm-shlib/CMakeLists.txt
|
||||
@@ -39,6 +39,7 @@
|
||||
endif()
|
||||
|
||||
add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES})
|
||||
+set_property(TARGET LLVM PROPERTY VERSION "1") # Append .1 to SONAME
|
||||
|
||||
list(REMOVE_DUPLICATES LIB_NAMES)
|
||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") # FIXME: It should be "GNU ld for elf"
|
||||
--- a/clang/tools/libclang/CMakeLists.txt
|
||||
+++ b/clang/tools/libclang/CMakeLists.txt
|
||||
@@ -82,7 +82,7 @@
|
||||
set(output_name "clang")
|
||||
endif()
|
||||
|
||||
-add_clang_library(libclang ${ENABLE_SHARED} ${ENABLE_STATIC}
|
||||
+add_clang_library(libclang ${ENABLE_SHARED} ${ENABLE_STATIC} SONAME
|
||||
OUTPUT_NAME ${output_name}
|
||||
${SOURCES}
|
||||
DEPENDS clang-headers
|
||||
|
47
debian/patches/lldb-soname.diff
vendored
47
debian/patches/lldb-soname.diff
vendored
@ -1,8 +1,6 @@
|
||||
Index: llvm-toolchain-snapshot_3.8~svn253186/lldb/lib/Makefile
|
||||
===================================================================
|
||||
--- llvm-toolchain-snapshot_3.8~svn253186.orig/lldb/lib/Makefile
|
||||
+++ llvm-toolchain-snapshot_3.8~svn253186/lldb/lib/Makefile
|
||||
@@ -16,6 +16,7 @@ LIBRARYNAME = lldb
|
||||
--- a/lldb/lib/Makefile
|
||||
+++ b/lldb/lib/Makefile
|
||||
@@ -16,6 +16,7 @@
|
||||
NO_BUILD_ARCHIVE = 1
|
||||
LINK_LIBS_IN_SHARED = 1
|
||||
SHARED_LIBRARY = 1
|
||||
@ -10,7 +8,7 @@ Index: llvm-toolchain-snapshot_3.8~svn253186/lldb/lib/Makefile
|
||||
|
||||
ifeq (,$(findstring -DLLDB_DISABLE_PYTHON,$(CXXFLAGS)))
|
||||
PYTHON_CONFIG?= python-config
|
||||
@@ -191,7 +192,7 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), L
|
||||
@@ -191,7 +192,7 @@
|
||||
LLVMLibsOptions += -Wl,--no-undefined
|
||||
# Link in python
|
||||
LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -ledit -lncurses -lpanel -lpthread
|
||||
@ -19,3 +17,40 @@ Index: llvm-toolchain-snapshot_3.8~svn253186/lldb/lib/Makefile
|
||||
ifneq (,$(filter $(shell dpkg-architecture -qDEB_HOST_ARCH), mips mipsel powerpc powerpcspe))
|
||||
# Link GCC atomic helper library
|
||||
LLVMLibsOptions += -latomic
|
||||
--- a/lldb/source/API/CMakeLists.txt
|
||||
+++ b/lldb/source/API/CMakeLists.txt
|
||||
@@ -6,7 +6,12 @@
|
||||
# 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 @@
|
||||
|
||||
set_target_properties(liblldb
|
||||
PROPERTIES
|
||||
- VERSION ${LLDB_VERSION}
|
||||
+ VERSION 1
|
||||
)
|
||||
|
||||
if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
@@ -105,11 +110,6 @@
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user