From ac51d7f887476d9f6b83b7a35f9ea10cd06a4c7d Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Tue, 4 Oct 2016 08:39:01 +0200 Subject: sys-devel/llvm: SOVERSIONs have been fixed upst, backport new to 3.9.0 --- ...ke-Restore-SOVERSIONs-on-shared-libraries.patch | 28 ++++++++++ ...roduce-ldconfig-compatible-SOVERSIONs-on-.patch | 62 ++++++++++++++++++++++ ...ke-Restore-SOVERSIONs-on-shared-libraries.patch | 28 ---------- sys-devel/llvm/llvm-3.8.0-r3.ebuild | 2 +- sys-devel/llvm/llvm-3.8.1-r2.ebuild | 2 +- sys-devel/llvm/llvm-3.8.1.ebuild | 2 +- sys-devel/llvm/llvm-3.9.0.ebuild | 2 +- sys-devel/llvm/llvm-9999.ebuild | 4 -- 8 files changed, 94 insertions(+), 36 deletions(-) create mode 100644 sys-devel/llvm/files/3.8.1/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch create mode 100644 sys-devel/llvm/files/3.9.0/0008-cmake-Reintroduce-ldconfig-compatible-SOVERSIONs-on-.patch delete mode 100644 sys-devel/llvm/files/9999/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch (limited to 'sys-devel') diff --git a/sys-devel/llvm/files/3.8.1/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch b/sys-devel/llvm/files/3.8.1/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch new file mode 100644 index 000000000000..c333bc4b9627 --- /dev/null +++ b/sys-devel/llvm/files/3.8.1/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch @@ -0,0 +1,28 @@ +From 597ebcc28580a8532f6634e2a723901c3448b9ff Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Mon, 28 Mar 2016 22:21:19 +0200 +Subject: [PATCH 08/10] cmake: Restore SOVERSIONs on shared libraries + +--- + cmake/modules/AddLLVM.cmake | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake +index 9590a1b..83a2359 100644 +--- a/cmake/modules/AddLLVM.cmake ++++ b/cmake/modules/AddLLVM.cmake +@@ -445,6 +445,11 @@ function(llvm_add_library name) + PREFIX "" + ) + endif() ++ ++ set_target_properties(${name} ++ PROPERTIES ++ SOVERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR} ++ VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}) + endif() + + if(ARG_MODULE OR ARG_SHARED) +-- +2.9.3 + diff --git a/sys-devel/llvm/files/3.9.0/0008-cmake-Reintroduce-ldconfig-compatible-SOVERSIONs-on-.patch b/sys-devel/llvm/files/3.9.0/0008-cmake-Reintroduce-ldconfig-compatible-SOVERSIONs-on-.patch new file mode 100644 index 000000000000..6634cdebe351 --- /dev/null +++ b/sys-devel/llvm/files/3.9.0/0008-cmake-Reintroduce-ldconfig-compatible-SOVERSIONs-on-.patch @@ -0,0 +1,62 @@ +From aeddc35a35c55f487977d7609060225e03e2028b Mon Sep 17 00:00:00 2001 +From: Michal Gorny +Date: Tue, 4 Oct 2016 06:09:18 +0000 +Subject: [PATCH] [cmake] Reintroduce (ldconfig-compatible) SOVERSIONs on + shared libraries + +Reintroduce versioning of shared libraries via SOVERSION, addressing +the issues with the previous design, since Gentoo is relying +on shared-split install of LLVM. The SOVERSIONs were originally +introduced in r229720 for all libraries, and removed in r252093 in favor +of custom SONAME. As far as I understand, the major concern with the old +versioning was that the used versions were incompatible with ldconfig. + +Having considered that, this commit introduce SOVERSIONS with the +following considerations: + +1. SOVERSIONs are formed of major & minor version concatenated -- i.e. +for 4.0 its .so.40. This matches the common practice where the first +version number indicates ABI breakage, and therefore fixes the issues +with ldconfig. Additionally, VERSION with the remaining verion +components appended is used, however this is not strictly necessary. + +2. The versioning is only applied to libraries with no explicit SONAME +specified -- i.e. it won't apply to libLLVM but only to the split +libraries. It will also apply to libraries installed by the subprojects. + +3. The versioning is only done on *nix systems, Darwin excluded. This +matches the current use of SONAME. + +Differential Revision: https://reviews.llvm.org/D24757 + +git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283189 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + cmake/modules/AddLLVM.cmake | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake +index 37b3b80..7cb1b0c 100644 +--- a/cmake/modules/AddLLVM.cmake ++++ b/cmake/modules/AddLLVM.cmake +@@ -450,6 +450,18 @@ function(llvm_add_library name) + 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) +-- +2.10.0 + diff --git a/sys-devel/llvm/files/9999/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch b/sys-devel/llvm/files/9999/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch deleted file mode 100644 index c333bc4b9627..000000000000 --- a/sys-devel/llvm/files/9999/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 597ebcc28580a8532f6634e2a723901c3448b9ff Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= -Date: Mon, 28 Mar 2016 22:21:19 +0200 -Subject: [PATCH 08/10] cmake: Restore SOVERSIONs on shared libraries - ---- - cmake/modules/AddLLVM.cmake | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake -index 9590a1b..83a2359 100644 ---- a/cmake/modules/AddLLVM.cmake -+++ b/cmake/modules/AddLLVM.cmake -@@ -445,6 +445,11 @@ function(llvm_add_library name) - PREFIX "" - ) - endif() -+ -+ set_target_properties(${name} -+ PROPERTIES -+ SOVERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR} -+ VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}) - endif() - - if(ARG_MODULE OR ARG_SHARED) --- -2.9.3 - diff --git a/sys-devel/llvm/llvm-3.8.0-r3.ebuild b/sys-devel/llvm/llvm-3.8.0-r3.ebuild index b08f4d65cca5..e45720084cf4 100644 --- a/sys-devel/llvm/llvm-3.8.0-r3.ebuild +++ b/sys-devel/llvm/llvm-3.8.0-r3.ebuild @@ -167,7 +167,7 @@ src_prepare() { # Restore SOVERSIONs for shared libraries # https://bugs.gentoo.org/show_bug.cgi?id=578392 - eapply "${FILESDIR}"/9999/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch + eapply "${FILESDIR}"/3.8.1/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch # disable use of SDK on OSX, bug #568758 sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die diff --git a/sys-devel/llvm/llvm-3.8.1-r2.ebuild b/sys-devel/llvm/llvm-3.8.1-r2.ebuild index d2cdc518f0dd..62662f78144a 100644 --- a/sys-devel/llvm/llvm-3.8.1-r2.ebuild +++ b/sys-devel/llvm/llvm-3.8.1-r2.ebuild @@ -168,7 +168,7 @@ src_prepare() { # Restore SOVERSIONs for shared libraries # https://bugs.gentoo.org/show_bug.cgi?id=578392 - eapply "${FILESDIR}"/9999/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch + eapply "${FILESDIR}"/3.8.1/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch # support building llvm against musl-libc use elibc_musl && eapply "${FILESDIR}"/9999/musl-fixes.patch diff --git a/sys-devel/llvm/llvm-3.8.1.ebuild b/sys-devel/llvm/llvm-3.8.1.ebuild index 29b637d22d06..dee841fe04cf 100644 --- a/sys-devel/llvm/llvm-3.8.1.ebuild +++ b/sys-devel/llvm/llvm-3.8.1.ebuild @@ -167,7 +167,7 @@ src_prepare() { # Restore SOVERSIONs for shared libraries # https://bugs.gentoo.org/show_bug.cgi?id=578392 - eapply "${FILESDIR}"/9999/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch + eapply "${FILESDIR}"/3.8.1/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch # disable use of SDK on OSX, bug #568758 sed -i -e 's/xcrun/false/' utils/lit/lit/util.py || die diff --git a/sys-devel/llvm/llvm-3.9.0.ebuild b/sys-devel/llvm/llvm-3.9.0.ebuild index 9ec259c6e5a2..91712b50a09c 100644 --- a/sys-devel/llvm/llvm-3.9.0.ebuild +++ b/sys-devel/llvm/llvm-3.9.0.ebuild @@ -176,7 +176,7 @@ src_prepare() { # Restore SOVERSIONs for shared libraries # https://bugs.gentoo.org/show_bug.cgi?id=578392 - eapply "${FILESDIR}"/9999/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch + eapply "${FILESDIR}"/3.9.0/0008-cmake-Reintroduce-ldconfig-compatible-SOVERSIONs-on-.patch # support building llvm against musl-libc use elibc_musl && eapply "${FILESDIR}"/9999/musl-fixes.patch diff --git a/sys-devel/llvm/llvm-9999.ebuild b/sys-devel/llvm/llvm-9999.ebuild index 5e3780217156..1367dddbbb1a 100644 --- a/sys-devel/llvm/llvm-9999.ebuild +++ b/sys-devel/llvm/llvm-9999.ebuild @@ -109,10 +109,6 @@ src_prepare() { # https://bugs.gentoo.org/show_bug.cgi?id=565358 eapply "${FILESDIR}"/9999/0007-llvm-config-Clean-up-exported-values-update-for-shar.patch - # Restore SOVERSIONs for shared libraries - # https://bugs.gentoo.org/show_bug.cgi?id=578392 - eapply "${FILESDIR}"/9999/0008-cmake-Restore-SOVERSIONs-on-shared-libraries.patch - # support building llvm against musl-libc use elibc_musl && eapply "${FILESDIR}"/9999/musl-fixes.patch -- cgit v1.2.3-65-gdbad