1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-25 12:15:32 +03:00
aports/community/llvm5/cmake-fix-libLLVM-name.patch
Leo 4948c3c3f2 community/llvm5: move from unmaintained
Turns out ghc still needs it
2019-08-11 23:56:17 -03:00

26 lines
955 B
Diff

Include version in name of shared libs
libLLVM.so -> libLLVM-$MAJOR.$MINOR.so
Source: http://pkgs.fedoraproject.org/cgit/rpms/llvm3.9.git/tree/llvm-soversion.patch?id=3dac83eaa5b88f550ae50125b14b8f644e10617b
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -450,6 +450,18 @@
PREFIX ""
)
endif()
+
+ # Set SOVERSION on shared libraries that lack explicit SONAME
+ # specifier, on *nix systems that are not Darwin.
+ if(UNIX AND NOT APPLE AND NOT ARG_SONAME)
+ set_target_properties(${name}
+ PROPERTIES
+ # Concatenate the version numbers since ldconfig expects exactly
+ # one component indicating the ABI version, while LLVM uses
+ # major+minor for that.
+ SOVERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}
+ VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX})
+ endif()
endif()
if(ARG_MODULE OR ARG_SHARED)