diff --git a/llvm13.changes b/llvm13.changes index d484277..b4eb0b5 100644 --- a/llvm13.changes +++ b/llvm13.changes @@ -7,6 +7,9 @@ Sun Apr 3 13:42:27 UTC 2022 - Aaron Puchert can't have multiple LLVM versions generate the same package, we prefix it for the non-default LLVM with a mechanism inspired by the GCC packaging. +- Patch exported clang/ClangTargets-relwithdebinfo.cmake to refer + to libclang only by soname, because the installed library might + be newer than the one originally build with the package. - Use the same mechanism to for libc++ and package Clang scripts only for the default version. This means we'll no longer have to touch the package when a new major version comes out. diff --git a/llvm13.spec b/llvm13.spec index 609aeb7..0497df1 100644 --- a/llvm13.spec +++ b/llvm13.spec @@ -1067,6 +1067,11 @@ sed -i "$( done )" %{buildroot}%{_libdir}/cmake/{llvm/LLVMExports,clang/ClangTargets}-relwithdebinfo.cmake +# For libclang, have the CMake export list refer to the library via soname. +# The original library might not be available. (We might have a newer version.) +sed -i "s|\"\${_IMPORT_PREFIX}/%{_lib}/libclang.so.%{_relver}\"|\"\${_IMPORT_PREFIX}/%{_lib}/libclang.so.%{_soclang}\"|g" \ + %{buildroot}%{_libdir}/cmake/clang/ClangTargets-relwithdebinfo.cmake + # rpm macro for version checking mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d/ cat > %{buildroot}%{_rpmconfigdir}/macros.d/macros.llvm <