- Split off clang shared runtime libraries into libclang_rtX, so

that they can be used by other packages without requiring the
  entire compiler tool chain. This is still not ergonomical: the
  libraries don't sit in %{_libdir}, so an RPATH or setting
  LD_LIBRARY_PATH is required, and they don't have an SO version,
  so zypper won't know which version to is needed. (boo#1225784)

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm18?expand=0&rev=24
This commit is contained in:
Aaron Puchert 2024-08-23 22:46:50 +00:00 committed by Git OBS Bridge
parent 2bcdc17738
commit ba65734252
2 changed files with 38 additions and 3 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Fri Aug 23 21:41:32 UTC 2024 - Aaron Puchert <aaronpuchert@alice-dsl.net>
- Split off clang shared runtime libraries into libclang_rtX, so
that they can be used by other packages without requiring the
entire compiler tool chain. This is still not ergonomical: the
libraries don't sit in %{_libdir}, so an RPATH or setting
LD_LIBRARY_PATH is required, and they don't have an SO version,
so zypper won't know which version to is needed. (boo#1225784)
-------------------------------------------------------------------
Tue Aug 20 21:20:37 UTC 2024 - Aaron Puchert <aaronpuchert@alice-dsl.net>

View File

@ -531,6 +531,7 @@ This package contains documentation for the LLVM infrastructure.
Summary: CLANG frontend for LLVM
Group: Development/Languages/C and C++
URL: https://clang.llvm.org/
Requires: libclang_rt%{_sonum}
Requires(post): update-alternatives
Requires(postun): update-alternatives
Recommends: clang-tools
@ -543,6 +544,15 @@ Suggests: libc++-devel
%description -n clang%{_sonum}
This package contains the clang (C language) frontend for LLVM.
%package -n libclang_rt%{_sonum}
Summary: Clang shared runtime libraries
Group: System/Libraries
URL: https://compiler-rt.llvm.org/
%description -n libclang_rt%{_sonum}
The runtime libraries needed to run programs compiled with the -shared-libsan
of Clang. Also known as compiler-rt.
%package -n clang-tools
Summary: Tools for Clang
Group: Development/Languages/C and C++
@ -1626,12 +1636,27 @@ fi
%{lapply -p man_sonum_path %clang_manfiles}
%{lapply -p ghost_ua_man_link %clang_manfiles}
%dir %{_libdir}/clang/
%dir %{_libdir}/clang/%{_sonum}/
%dir %{_libdir}/clang
%dir %{_libdir}/clang/%{_sonum}
%dir %{_libdir}/clang/%{_sonum}/lib
%dir %{_libdir}/clang/%{_sonum}/lib/linux
%{_libdir}/clang/%{_sonum}/lib/linux/clang-rt.*.o
%{_libdir}/clang/%{_sonum}/lib/linux/libclang_rt.*.a
%{_libdir}/clang/%{_sonum}/lib/linux/libclang_rt.*.a.syms
%ifarch aarch64 %{arm} ppc64le x86_64
%{_libdir}/clang/%{_sonum}/lib/linux/liborc_rt-*.a
%endif
%files -n libclang_rt%{_sonum}
%license CREDITS.TXT LICENSE.TXT
%dir %{_libdir}/clang
%dir %{_libdir}/clang/%{_sonum}
%ifarch aarch64 riscv64 x86_64
%{_libdir}/clang/%{_sonum}/bin
%endif
%{_libdir}/clang/%{_sonum}/lib
%dir %{_libdir}/clang/%{_sonum}/lib
%dir %{_libdir}/clang/%{_sonum}/lib/linux
%{_libdir}/clang/%{_sonum}/lib/linux/libclang_rt.*.so
# The sanitizer runtime is not available for ppc.
%ifnarch ppc
%{_libdir}/clang/%{_sonum}/share