%ifarch s390 s390x # only limited set of libs available on s390(x) and the existing ones (stats, ubsan) don't provide debuginfo %global debug_package %{nil} %endif %global maj_ver 10 %global min_ver 0 %global patch_ver 0 %global baserelease 1 %global download_url https://github.com/llvm/llvm-project/releases/download %define _prefix /usr/local/tools/llvm-%{maj_ver} %global crt_srcdir compiler-rt-%{version}.src Name: compiler-rt-%{maj_ver} Version: %{maj_ver}.%{min_ver}.%{patch_ver} Release: %{baserelease}%{?dist} Summary: LLVM "compiler-rt" runtime libraries License: NCSA or MIT URL: http://llvm.org Source0: %{download_url}/llvmorg-%{version}/%{crt_srcdir}.tar.xz BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: ninja-build BuildRequires: llvm-%{maj_ver}-devel = %{version} BuildRequires: llvm-%{maj_ver}-static = %{version} %description The compiler-rt project is a part of the LLVM project. It provides implementation of the low-level target-specific hooks required by code generation, sanitizer runtimes and profiling library for code instrumentation, and Blocks C language extension. %prep %setup -q -n %{crt_srcdir} %build mkdir -p _build cd _build cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DLLVM_CONFIG_PATH:FILEPATH=%{_bindir}/llvm-config-%{__isa_bits} \ \ %if 0%{?__isa_bits} == 64 -DLLVM_LIBDIR_SUFFIX=64 \ %else -DLLVM_LIBDIR_SUFFIX= \ %endif -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF # could be on? ninja-build %{_smp_mflags} %install DESTDIR=%{buildroot} ninja-build %{_smp_mflags} install -C _build # move sanitizer lists to better place mkdir -p %{buildroot}%{_libdir}/clang/%{version}/share mv -v %{buildroot}%{_datadir}/*list.txt %{buildroot}%{_libdir}/clang/%{version}/share/ # move sanitizer libs to better place %global libclang_rt_installdir lib/linux mkdir -p %{buildroot}%{_libdir}/clang/%{version}/lib mv -v %{buildroot}%{_prefix}/%{libclang_rt_installdir}/*clang_rt* %{buildroot}%{_libdir}/clang/%{version}/lib mkdir -p %{buildroot}%{_libdir}/clang/%{version}/lib/linux/ pushd %{buildroot}%{_libdir}/clang/%{version}/lib for i in *.a *.syms *.so; do ln -s ../$i linux/$i done %files %{_includedir}/* %{_libdir}/clang/%{version} %ifarch x86_64 aarch64 %{_bindir}/hwasan_symbolize %endif %changelog * Tue Jul 21 2020 Evgeny Akhmetkhanov - 10.0.0-1 - Initial spec for EL7 from FC33