[llvm] r208721 - autoconf: Fix soname for libLLVM-Major.Minor.so (2nd try)
Tom Stellard
thomas.stellard at amd.com
Tue May 13 12:37:03 PDT 2014
Author: tstellar
Date: Tue May 13 14:37:03 2014
New Revision: 208721
URL: http://llvm.org/viewvc/llvm-project?rev=208721&view=rev
Log:
autoconf: Fix soname for libLLVM-Major.Minor.so (2nd try)
We were using libLLVM-Major.Minor.Patch.so for the soname, but we
need the soname to stay consistent for all Major.Minor.* releases
otherwise operating system distributors will need to rebuild all
packages that link with LLVM every time there is a new point release.
This patch also reverses the compatibility symlink, so
libLLVM-Major.Minor.Patch.so is now a symlink that points
to libLLVM-Major-Minor.so.
Modified:
llvm/trunk/Makefile.rules
llvm/trunk/tools/llvm-shlib/Makefile
Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=208721&r1=208720&r2=208721&view=diff
==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Tue May 13 14:37:03 2014
@@ -1063,8 +1063,9 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), C
LLVMLibsOptions += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc \
-L $(SharedLibDir)
endif
-LLVMLibsOptions += -lLLVM-$(LLVMVersion)
-LLVMLibsPaths += $(SharedLibDir)/$(SharedPrefix)LLVM-$(LLVMVersion)$(SHLIBEXT)
+LLVM_SO_NAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(LLVM_VERSION_SUFFIX)
+LLVMLibsOptions += -l$(LLVM_SO_NAME)
+LLVMLibsPaths += $(SharedLibDir)/$(SharedPrefix)$(LLVM_SO_NAME)$(SHLIBEXT)
else
ifndef NO_LLVM_CONFIG
@@ -1180,7 +1181,12 @@ LibName.O := $(LibDir)/$(LIBRARYNAME).o
#---------------------------------------------------------
ifdef SHARED_LIBRARY
-all-local:: $(LibName.SO)
+all-local:: $(AliasName.SO)
+
+$(AliasName.SO): $(LibName.SO)
+ifdef SHARED_ALIAS
+ $(Verb) $(AliasTool) $(BaseLibName.SO) $(AliasName.SO)
+endif
ifdef EXPORTED_SYMBOL_FILE
$(LibName.SO): $(NativeExportsFile)
@@ -1238,6 +1244,9 @@ endif
uninstall-local::
$(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib)
-$(Verb) $(RM) -f $(DestSharedLib)
+ifdef SHARED_ALIAS
+ -$(Verb) $(RM) -f $(DestSharedAlias)
+endif
endif
endif
Modified: llvm/trunk/tools/llvm-shlib/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-shlib/Makefile?rev=208721&r1=208720&r2=208721&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-shlib/Makefile (original)
+++ llvm/trunk/tools/llvm-shlib/Makefile Tue May 13 14:37:03 2014
@@ -9,8 +9,8 @@
LEVEL := ../..
-LIBRARYNAME = LLVM-$(LLVMVersion)
-LIBRARYALIASNAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(LLVM_VERSION_SUFFIX)
+LIBRARYNAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(LLVM_VERSION_SUFFIX)
+LIBRARYALIASNAME = LLVM-$(LLVMVersion)
NO_BUILD_ARCHIVE := 1
LINK_LIBS_IN_SHARED := 1
More information about the llvm-commits
mailing list