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 maj_ver 17
%global min_ver 0 %global min_ver 0
%global patch_ver 6 %global patch_ver 6
%global baserelease 1 %global baserelease 3
# Limit build jobs on ppc64 systems to avoid running out of memory. # Limit build jobs on ppc64 systems to avoid running out of memory.
%global _smp_mflags -j8 %global _smp_mflags -j8
@ -9,12 +9,6 @@
%global install_prefix %{_libdir}/llvm%{maj_ver} %global install_prefix %{_libdir}/llvm%{maj_ver}
%global pkg_libdir %{install_prefix}/lib/ %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 Name: llvm-compat
Version: %{maj_ver}.%{min_ver}.%{patch_ver} Version: %{maj_ver}.%{min_ver}.%{patch_ver}
Release: %{baserelease}%{?dist} Release: %{baserelease}%{?dist}
@ -67,6 +61,17 @@ Obsoletes: llvm-libs = %{version}
%description libs %description libs
Shared libraries for the LLVM compiler infrastructure. 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 %prep
%setup -T -q -b 2 -n cmake-%{version}.src %setup -T -q -b 2 -n cmake-%{version}.src
cd .. cd ..
@ -108,6 +113,7 @@ pushd llvm-build
%endif %endif
\ \
-DLLVM_TARGETS_TO_BUILD="X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF;WebAssembly" \ -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_LIBCXX:BOOL=OFF \
-DLLVM_ENABLE_ZLIB:BOOL=ON \ -DLLVM_ENABLE_ZLIB:BOOL=ON \
-DLLVM_ENABLE_FFI:BOOL=ON \ -DLLVM_ENABLE_FFI:BOOL=ON \
@ -121,15 +127,14 @@ pushd llvm-build
-DCMAKE_INSTALL_PREFIX=%{install_prefix} -DCMAKE_INSTALL_PREFIX=%{install_prefix}
DESTDIR=%{buildroot} %__ninja %__ninja_common_opts DESTDIR=%{buildroot} %__ninja %__ninja_common_opts distribution
popd popd
%install %install
cd .. cd ..
DESTDIR=%{buildroot} %__ninja %__ninja_common_opts -l 8 -C llvm-build \ DESTDIR=%{buildroot} %__ninja %__ninja_common_opts -l 8 -C llvm-build install-distribution
install-LLVM install-libclang install-clang-cpp
# Create ld.so.conf.d entry # Create ld.so.conf.d entry
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d 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} %{pkg_libdir}
EOF EOF
# Remove unversioned symlinks
rm -Rf %{buildroot}%{pkg_libdir}/libclang.so
rm -Rf %{buildroot}%{pkg_libdir}/libclang-cpp.so
%check %check
%post libs -p /sbin/ldconfig %post libs -p /sbin/ldconfig
@ -151,9 +152,27 @@ rm -Rf %{buildroot}%{pkg_libdir}/libclang-cpp.so
%files libs %files libs
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf %config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
%{pkg_libdir}/libLLVM-%{maj_ver}.so %{pkg_libdir}/libLLVM-%{maj_ver}.so
%{pkg_libdir}/libLLVM-%{version}.so
%{pkg_libdir}/libclang*.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 %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 * Fri Apr 19 2024 Tom Stellard <tstellar@redhat.com> - 17.0.6-1
- 17.0.6 Release - 17.0.6 Release