From 048172c6797e0c2b3121e8b7d6b4f17a85676569 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 8 Sep 2022 12:42:56 +0200 Subject: [PATCH] Install libunwindo.so.1 in %{_libdir} Keep the unversioned name in a private location, but make sure the versioned one live in a default location. That way we're still compatible with clang -unwindlib=libunwind --- llvm-libunwind.spec | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/llvm-libunwind.spec b/llvm-libunwind.spec index 2767559..c93398f 100644 --- a/llvm-libunwind.spec +++ b/llvm-libunwind.spec @@ -8,7 +8,7 @@ Name: llvm-libunwind Version: %{libunwind_version}%{?rc_ver:~rc%{rc_ver}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: LLVM libunwind License: ASL 2.0 or NCSA or MIT @@ -82,12 +82,22 @@ Documentation for LLVM libunwind %cmake_install -# We can't install on default location because that would conflict with +# We can't install the unversionned path on default location because that would conflict with # https://src.fedoraproject.org/rpms/libunwind +# +# The versionned path has a different soname (libunwind.so.1 compared to +# libunwind.so.8) so they can live together in %{_libdir} +# # ABI wise, even though llvm-libunwind's library is named libunwind, it doesn't # have the exact same ABI has gcc's libunwind (it actually provides a subset). +rm %{buildroot}%{_libdir}/libunwind.so mkdir -p %{buildroot}/%{_libdir}/llvm-unwind/ -mv %{buildroot}%{_libdir}/libunwind* %{buildroot}/%{_libdir}/llvm-unwind/ + +pushd %{buildroot}/%{_libdir}/llvm-unwind +ln -s ../libunwind.so.1.0 libunwind.so +popd + + # Same applies to the documentation mv %{buildroot}%{_docdir}/libunwind/libunwind %{buildroot}%{_docdir}/llvm-libunwind @@ -100,10 +110,11 @@ mv %{buildroot}%{_docdir}/libunwind/libunwind %{buildroot}%{_docdir}/llvm-libunw %files %license LICENSE.TXT -%dir %{_libdir}/llvm-unwind -%{_libdir}/llvm-unwind/libunwind.so.* +%{_libdir}/libunwind.so.1 +%{_libdir}/libunwind.so.1.0 %files devel +%dir %{_libdir}/llvm-unwind %{_libdir}/llvm-unwind/libunwind.so %files doc @@ -112,6 +123,9 @@ mv %{buildroot}%{_docdir}/libunwind/libunwind %{buildroot}%{_docdir}/llvm-libunw %doc %{_docdir}/llvm-libunwind/html %changelog +* Thu Sep 8 2022 sguelton@redhat.com - 14.0.5-2 +- Install versionned library in standard location + * Mon Aug 29 2022 sguelton@redhat.com - 14.0.5-1 - Update to LLVM 14.0.5