import from CS git llvm-compat-17.0.6-3.el8

This commit is contained in:
eabdullin 2024-11-06 07:25:50 +00:00
parent 07a3bc39ca
commit 16c91f0121

View File

@ -1,7 +1,7 @@
%global maj_ver 17
%global min_ver 0
%global patch_ver 6
%global baserelease 1
%global baserelease 3
# Limit build jobs on ppc64 systems to avoid running out of memory.
%global _smp_mflags -j8
@ -9,12 +9,6 @@
%global install_prefix %{_libdir}/llvm%{maj_ver}
%global pkg_libdir %{install_prefix}/lib/
# Disable debuginfo on ppc64le to reduce disk space usage.
%ifarch ppc64le
%global _find_debuginfo_dwz_opts %{nil}
%global debug_package %{nil}
%endif
Name: llvm-compat
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
Release: %{baserelease}%{?dist}
@ -67,6 +61,17 @@ Obsoletes: llvm-libs = %{version}
%description libs
Shared libraries for the LLVM compiler infrastructure.
%package devel
Summary: Libraries and header files for LLVM
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description devel
This package contains library and header files needed to develop new native
programs that use the LLVM infrastructure.
%prep
%setup -T -q -b 2 -n cmake-%{version}.src
cd ..
@ -108,6 +113,7 @@ pushd llvm-build
%endif
\
-DLLVM_TARGETS_TO_BUILD="X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF;WebAssembly" \
-DLLVM_DISTRIBUTION_COMPONENTS="LLVM;libclang;llvm-config;llvm-headers;libclang-headers;cmake-exports;clang-cmake-exports;clang-headers;clang-cpp;clang-resource-headers" \
-DLLVM_ENABLE_LIBCXX:BOOL=OFF \
-DLLVM_ENABLE_ZLIB:BOOL=ON \
-DLLVM_ENABLE_FFI:BOOL=ON \
@ -121,15 +127,14 @@ pushd llvm-build
-DCMAKE_INSTALL_PREFIX=%{install_prefix}
DESTDIR=%{buildroot} %__ninja %__ninja_common_opts
DESTDIR=%{buildroot} %__ninja %__ninja_common_opts distribution
popd
%install
cd ..
DESTDIR=%{buildroot} %__ninja %__ninja_common_opts -l 8 -C llvm-build \
install-LLVM install-libclang install-clang-cpp
DESTDIR=%{buildroot} %__ninja %__ninja_common_opts -l 8 -C llvm-build install-distribution
# Create ld.so.conf.d entry
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
@ -137,10 +142,6 @@ cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf << EOF
%{pkg_libdir}
EOF
# Remove unversioned symlinks
rm -Rf %{buildroot}%{pkg_libdir}/libclang.so
rm -Rf %{buildroot}%{pkg_libdir}/libclang-cpp.so
%check
%post libs -p /sbin/ldconfig
@ -151,9 +152,27 @@ rm -Rf %{buildroot}%{pkg_libdir}/libclang-cpp.so
%files libs
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
%{pkg_libdir}/libLLVM-%{maj_ver}.so
%{pkg_libdir}/libLLVM-%{version}.so
%{pkg_libdir}/libclang*.so.*
%{pkg_libdir}/clang/%{maj_ver}/
%files devel
%dir %{install_prefix}/bin/
%{install_prefix}/include/
%{install_prefix}/bin/llvm-config
%{pkg_libdir}/cmake/llvm/
%{pkg_libdir}/cmake/clang/
%{pkg_libdir}/libLLVM.so
%{pkg_libdir}/libclang-cpp.so
%{pkg_libdir}/libclang.so
%changelog
* Fri Aug 16 2024 Tom Stellard <tstellar@redhat.com> - 17.0.6-3
- Re-enable debuginfo on ppc64le
* Tue Jul 30 2024 Tom Stellard <tstellar@redhat.com> - 17.0.6-2
- Add devel package
* Fri Apr 19 2024 Tom Stellard <tstellar@redhat.com> - 17.0.6-1
- 17.0.6 Release