From 8f724403976335776392b34848ea6f59031d9977 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 11 May 2014 20:50:56 +0000 Subject: [PATCH] Fix the soname. No changes in the ABI, so, no need to update the soname (Closes: #747701) --- debian/changelog | 7 +++++++ debian/libllvm3.4.install.in | 1 + debian/libllvm3.4.links.in | 2 ++ debian/patches/0044-soname.diff | 29 +++++++++++++++++++++++----- debian/patches/compiler-rt-path.diff | 13 +++++++++++++ debian/patches/series | 1 + debian/rules | 1 + 7 files changed, 49 insertions(+), 5 deletions(-) create mode 100644 debian/libllvm3.4.links.in create mode 100644 debian/patches/compiler-rt-path.diff diff --git a/debian/changelog b/debian/changelog index 04ad94ec..649f51c7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-3.4 (1:3.4.1-2) unstable; urgency=medium + + * Fix the soname. No changes in the ABI, so, no need to update the soname + (Closes: #747701) + + -- Sylvestre Ledru Sun, 11 May 2014 17:29:22 +0200 + llvm-toolchain-3.4 (1:3.4.1-1) unstable; urgency=medium * New upstream release. Note that only LLVM & Clang had a new release. diff --git a/debian/libllvm3.4.install.in b/debian/libllvm3.4.install.in index a1ddd288..c8ea2be9 100644 --- a/debian/libllvm3.4.install.in +++ b/debian/libllvm3.4.install.in @@ -1 +1,2 @@ usr/lib/llvm-3.4/lib/libLLVM-3.4.1.so.1 /usr/lib/@DEB_HOST_MULTIARCH@/ +usr/lib/llvm-3.4/lib/libLLVM-3.4.so.1 /usr/lib/@DEB_HOST_MULTIARCH@/ diff --git a/debian/libllvm3.4.links.in b/debian/libllvm3.4.links.in new file mode 100644 index 00000000..e09c799c --- /dev/null +++ b/debian/libllvm3.4.links.in @@ -0,0 +1,2 @@ +usr/lib/llvm-3.4/lib/libLLVM-3.4.1.so.1 /usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-3.4.so.1 + diff --git a/debian/patches/0044-soname.diff b/debian/patches/0044-soname.diff index 7fd876b5..d0fc4812 100644 --- a/debian/patches/0044-soname.diff +++ b/debian/patches/0044-soname.diff @@ -1,13 +1,32 @@ -Index: llvm-toolchain-snapshot_3.4~svn193982/tools/llvm-shlib/Makefile +Index: llvm-toolchain-3.4-3.4.1/tools/llvm-shlib/Makefile =================================================================== ---- llvm-toolchain-snapshot_3.4~svn193982.orig/tools/llvm-shlib/Makefile 2013-11-04 09:46:03.312667676 +0100 -+++ llvm-toolchain-snapshot_3.4~svn193982/tools/llvm-shlib/Makefile 2013-11-04 09:46:03.308667675 +0100 -@@ -76,7 +76,7 @@ +--- llvm-toolchain-3.4-3.4.1.orig/tools/llvm-shlib/Makefile 2014-05-11 20:13:33.000000000 +0200 ++++ llvm-toolchain-3.4-3.4.1/tools/llvm-shlib/Makefile 2014-05-11 20:36:51.662821231 +0200 +@@ -10,6 +10,7 @@ + LEVEL := ../.. + + LIBRARYNAME = LLVM-$(LLVMVersion) ++LIBRARYNAME_SONAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR) + LIBRARYALIASNAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(LLVM_VERSION_SUFFIX) + + NO_BUILD_ARCHIVE := 1 +@@ -47,6 +48,10 @@ + $(ProjLibsOptions) $(LLVMLibsOptions) $(LIBS) + mv $(LibName.SO) $(LibName.SO).1 + ln -s $(notdir $(LibName.SO)).1 $(LibName.SO) ++ # Crappy workaround. I just need to fix Debian quickly ++ ln -s $(notdir $(LibName.SO)).1 $(SharedLibDir)/lib$(LIBRARYNAME_SONAME).so.1 ++ ++ + + ifeq ($(HOST_OS),Darwin) + # set dylib internal version number to llvmCore submission number +@@ -78,7 +83,7 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), DragonFly Linux FreeBSD GNU/kFreeBSD GNU)) # Add soname to the library. - LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT) -Wl,-Bsymbolic-functions -+ LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT).1 -Wl,-Bsymbolic-functions ++ LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME_SONAME)$(SHLIBEXT).1 -Wl,-Bsymbolic-functions endif ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU GNU/kFreeBSD)) diff --git a/debian/patches/compiler-rt-path.diff b/debian/patches/compiler-rt-path.diff new file mode 100644 index 00000000..1743b189 --- /dev/null +++ b/debian/patches/compiler-rt-path.diff @@ -0,0 +1,13 @@ +Index: llvm-toolchain-3.4-3.4.1/compiler-rt/make/platform/clang_linux.mk +=================================================================== +--- llvm-toolchain-3.4-3.4.1.orig/compiler-rt/make/platform/clang_linux.mk 2013-10-03 10:31:14.000000000 +0200 ++++ llvm-toolchain-3.4-3.4.1/compiler-rt/make/platform/clang_linux.mk 2014-05-11 21:15:17.379960560 +0200 +@@ -11,7 +11,7 @@ + # cross compilers). For now, we just find the target architecture of the + # compiler and only define configurations we know that compiler can generate. + CompilerTargetTriple := $(shell \ +- $(CC) -v 2>&1 | grep 'Target:' | cut -d' ' -f2) ++ LD_LIBRARY_PATH=../build-llvm/Release/lib $(CC) -v 2>&1 | grep 'Target:' | cut -d' ' -f2) + ifeq ($(CompilerTargetTriple),) + $(error "unable to infer compiler target triple for $(CC)") + endif diff --git a/debian/patches/series b/debian/patches/series index 420da260..b503ef00 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -37,3 +37,4 @@ lldb-link-atomic.diff 0007-install-dejagnu-files.patch fix-llvm-config-obj-src-root.patch scan-build-fix-clang-detection.diff +compiler-rt-path.diff diff --git a/debian/rules b/debian/rules index 3bb129a8..9ea70d9e 100755 --- a/debian/rules +++ b/debian/rules @@ -261,6 +261,7 @@ override_dh_auto_install: fi; \ rm -f libLLVM-$(LLVM_VERSION).so; \ ln -s libLLVM-$(LLVM_VERSION_FULL).so.$(SONAME_EXT) libLLVM-$(LLVM_VERSION).so; \ + ln -s libLLVM-$(LLVM_VERSION_FULL).so.$(SONAME_EXT) libLLVM-$(LLVM_VERSION).so.$(SONAME_EXT) rm -f libclang.so # cd $(TARGET_BUILD)/tools/clang/runtime/compiler-rt/ && rm -rf $$(find . -iname "SubDir.lib*" -o -iname .dir) && rm -rf $$(find -empty)