tstellar / rpms / llvm

Forked from rpms/llvm 5 years ago
Clone
8150742
From e47eb279d50f38374a3f5b95a8c4bcc2112ed408 Mon Sep 17 00:00:00 2001
8150742
From: Tom Stellard <thomas.stellard@amd.com>
8150742
Date: Thu, 15 May 2014 00:15:27 +0000
8150742
Subject: [PATCH 2/5] Merging r208721:
8150742
8150742
------------------------------------------------------------------------
8150742
r208721 | thomas.stellard | 2014-05-13 15:37:03 -0400 (Tue, 13 May 2014) | 11 lines
8150742
8150742
autoconf: Fix soname for libLLVM-Major.Minor.so (2nd try)
8150742
8150742
We were using libLLVM-Major.Minor.Patch.so for the soname, but we
8150742
need the soname to stay consistent for all Major.Minor.* releases
8150742
otherwise operating system distributors  will need to rebuild all
8150742
packages that link with LLVM every time there is a new point release.
8150742
8150742
This patch also reverses the compatibility symlink, so
8150742
libLLVM-Major.Minor.Patch.so is now a symlink that points
8150742
to libLLVM-Major-Minor.so.
8150742
8150742
------------------------------------------------------------------------
8150742
8150742
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@208829 91177308-0d34-0410-b5e6-96231b3b80d8
8150742
---
8150742
 Makefile.rules            | 15 ++++++++++++---
8150742
 tools/llvm-shlib/Makefile |  4 ++--
8150742
 2 files changed, 14 insertions(+), 5 deletions(-)
8150742
8150742
diff --git a/Makefile.rules b/Makefile.rules
8150742
index 210abda..18882fa 100644
8150742
--- a/Makefile.rules
8150742
+++ b/Makefile.rules
8150742
@@ -1027,8 +1027,9 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
8150742
 LLVMLibsOptions += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc \
8150742
                    -L $(SharedLibDir)
8150742
 endif
8150742
-LLVMLibsOptions += -lLLVM-$(LLVMVersion)
8150742
-LLVMLibsPaths += $(SharedLibDir)/$(SharedPrefix)LLVM-$(LLVMVersion)$(SHLIBEXT)
8150742
+LLVM_SO_NAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(LLVM_VERSION_SUFFIX)
8150742
+LLVMLibsOptions += -l$(LLVM_SO_NAME)
8150742
+LLVMLibsPaths += $(SharedLibDir)/$(SharedPrefix)$(LLVM_SO_NAME)$(SHLIBEXT)
8150742
 else
8150742
 
8150742
 ifndef NO_LLVM_CONFIG
8150742
@@ -1144,7 +1145,12 @@ LibName.O  := $(LibDir)/$(LIBRARYNAME).o
8150742
 #---------------------------------------------------------
8150742
 ifdef SHARED_LIBRARY
8150742
 
8150742
-all-local:: $(LibName.SO)
8150742
+all-local:: $(AliasName.SO)
8150742
+
8150742
+$(AliasName.SO): $(LibName.SO)
8150742
+ifdef SHARED_ALIAS
8150742
+	$(Verb) $(AliasTool) $(BaseLibName.SO) $(AliasName.SO)
8150742
+endif
8150742
 
8150742
 ifdef EXPORTED_SYMBOL_FILE
8150742
 $(LibName.SO): $(NativeExportsFile)
8150742
@@ -1202,6 +1208,9 @@ endif
8150742
 uninstall-local::
8150742
 	$(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib)
8150742
 	-$(Verb) $(RM) -f $(DestSharedLib)
8150742
+ifdef SHARED_ALIAS
8150742
+	-$(Verb) $(RM) -f $(DestSharedAlias)
8150742
+endif
8150742
 endif
8150742
 endif
8150742
 
8150742
diff --git a/tools/llvm-shlib/Makefile b/tools/llvm-shlib/Makefile
8150742
index 4a0c2ea..b912ea6 100644
8150742
--- a/tools/llvm-shlib/Makefile
8150742
+++ b/tools/llvm-shlib/Makefile
8150742
@@ -9,8 +9,8 @@
8150742
 
8150742
 LEVEL := ../..
8150742
 
8150742
-LIBRARYNAME = LLVM-$(LLVMVersion)
8150742
-LIBRARYALIASNAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(LLVM_VERSION_SUFFIX)
8150742
+LIBRARYNAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(LLVM_VERSION_SUFFIX)
8150742
+LIBRARYALIASNAME = LLVM-$(LLVMVersion)
8150742
 
8150742
 NO_BUILD_ARCHIVE := 1
8150742
 LINK_LIBS_IN_SHARED := 1
8150742
-- 
8150742
1.9.3
8150742