0e3731
%global toolchain clang
0e3731
%global compiler_rt_version 15.0.7
0e3731
%global crt_srcdir compiler-rt-%{compiler_rt_version}.src
356306
356306
# see https://sourceware.org/bugzilla/show_bug.cgi?id=25271
356306
%global optflags %(echo %{optflags} -D_DEFAULT_SOURCE)
356306
356306
# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93615
356306
%global optflags %(echo %{optflags} -Dasm=__asm__)
356306
356306
Name:		compiler-rt
0e3731
Version:	%{compiler_rt_version}
d467ee
Release:	1%{?dist}
356306
Summary:	LLVM "compiler-rt" runtime libraries
356306
356306
License:	NCSA or MIT
356306
URL:		http://llvm.org
0e3731
Source0:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}/%{crt_srcdir}.tar.xz
0e3731
Source1:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}/%{crt_srcdir}.tar.xz.sig
0e3731
Source2:	release-keys.asc
356306
0e3731
BuildRequires:	clang
356306
BuildRequires:	cmake
356306
BuildRequires:	ninja-build
356306
BuildRequires:	python3
997f30
# We need python3-devel for %%py3_shebang_fix
356306
BuildRequires:	python3-devel
356306
BuildRequires:	llvm-devel = %{version}
356306
356306
# For gpg source verification
356306
BuildRequires:	gnupg2
356306
356306
Requires: clang-resource-filesystem%{?isa} = %{version}
356306
356306
%description
356306
The compiler-rt project is a part of the LLVM project. It provides
356306
implementation of the low-level target-specific hooks required by
356306
code generation, sanitizer runtimes and profiling library for code
356306
instrumentation, and Blocks C language extension.
356306
356306
%prep
356306
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
356306
%autosetup -n %{crt_srcdir} -p2
356306
997f30
%py3_shebang_fix lib/hwasan/scripts/hwasan_symbolize
356306
356306
%build
0e3731
# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
0e3731
export ASMFLAGS=$CFLAGS
0e3731
997f30
%cmake	-GNinja \
356306
	-DCMAKE_BUILD_TYPE=RelWithDebInfo \
0e3731
	-DCMAKE_MODULE_PATH=%{_libdir}/cmake/llvm \
d467ee
	-DCMAKE_SKIP_RPATH:BOOL=ON \
356306
	\
356306
%if 0%{?__isa_bits} == 64
356306
	-DLLVM_LIBDIR_SUFFIX=64 \
356306
%else
356306
	-DLLVM_LIBDIR_SUFFIX= \
356306
%endif
356306
	-DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF # could be on?
356306
356306
%cmake_build
356306
356306
%install
356306
356306
%cmake_install
356306
356306
# move blacklist/abilist files to where clang expect them
d467ee
mkdir -p %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/share
d467ee
mv -v %{buildroot}%{_datadir}/*list.txt  %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/share/
356306
356306
# move sanitizer libs to better place
356306
%global libclang_rt_installdir lib/linux
d467ee
mkdir -p %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/lib
d467ee
mv -v %{buildroot}%{_prefix}/%{libclang_rt_installdir}/*clang_rt* %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/lib
d467ee
mkdir -p %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/lib/linux/
d467ee
pushd %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/lib
356306
for i in *.a *.so
356306
do
356306
	ln -s ../$i linux/$i
356306
done
356306
356306
# multilib support: also create symlink from lib to lib64, fixes rhbz#1678240
356306
# the symlinks will be dangling if the 32 bits version is not installed, but that should be fine
356306
%ifarch x86_64
356306
d467ee
mkdir -p %{buildroot}/%{_exec_prefix}/lib/clang/%{compiler_rt_version}/lib/linux
356306
for i in *.a *.so
356306
do
356306
	target=`echo "$i" | sed -e 's/x86_64/i386/'`
d467ee
	ln -s ../../../../../lib/clang/%{compiler_rt_version}/lib/$target ../../../../%{_lib}/clang/%{compiler_rt_version}/lib/linux/
356306
done
356306
356306
%endif
356306
356306
popd
356306
356306
%check
356306
356306
#%%cmake_build --target check-compiler-rt
356306
356306
%files
356306
%license LICENSE.TXT
356306
%{_includedir}/*
997f30
%{_libdir}/clang/%{compiler_rt_version}/lib/*
997f30
%{_libdir}/clang/%{compiler_rt_version}/share/*
356306
%ifarch x86_64 aarch64
356306
%{_bindir}/hwasan_symbolize
356306
%endif
356306
356306
%changelog
0e3731
* Tue Jan 17 2023 Konrad Kleine <kkleine@redhat.com> - 15.0.7-1
0e3731
- Update to LLVM 15.0.7
0e3731
0e3731
* Fri Dec 09 2022 Konrad Kleine <kkleine@redhat.com> - 15.0.6-1
0e3731
- Update to LLVM 15.0.6
0e3731
0e3731
* Thu Sep 29 2022 Konrad Kleine <kkleine@redhat.com> - 15.0.1-1
0e3731
- Update to LLVM 15.0.1
0e3731
997f30
* Wed Jul 20 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.6-1
997f30
- 14.0.6 Release
997f30
997f30
* Wed Jun 22 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.5-1
997f30
- 14.0.5 Release
997f30
997f30
* Thu May 12 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.0-2
997f30
- Disable execstack on s390x
997f30
997f30
* Mon Apr 25 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.0-1
997f30
- 14.0.0 Release
997f30
4194c8
* Thu Feb 03 2022 Tom Stellard <tstellar@redhat.com> - 13.0.1-1
4194c8
- 13.0.1 Release
4194c8
d467ee
* Tue Oct 12 2021 Timm Bäder <tbaeder@redhat.com> - 13.0.0-1
d467ee
- 13.0.0 Release
d467ee
- skip rpath
d467ee
356306
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 12.0.1-3
356306
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
356306
  Related: rhbz#1991688
356306
356306
* Fri Aug  6 2021 Florian Weimer <fweimer@redhat.com> - 12.0.1-2
356306
- Rebuild to pick up new build flags from redhat-rpm-config (#1984652)
356306
356306
* Tue Jul 13 2021 Tom Stellard <tstellar@redhat.com> - 12.0.1-1
356306
- 12.0.1 Release
356306
356306
* Fri Apr 16 2021 Tom Stellard <tstellar@redhat.com> - 12.0.0-1
356306
- 12.0.0 Release
356306
356306
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 11.1.0-0.3.rc2
356306
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
356306
356306
* Fri Jan 22 2021 Serge Guelton - 11.1.0-0.2.rc2
356306
- 11.1.0-rc2 release
356306
356306
* Thu Jan 14 2021 Serge Guelton - 11.1.0-0.1.rc1
356306
- 11.1.0-rc1 release
356306
356306
* Wed Jan 06 2021 Serge Guelton - 11.0.1-3
356306
- LLVM 11.0.1 final
356306
356306
* Tue Dec 22 2020 sguelton@redhat.com - 11.0.1-2.rc2
356306
- llvm 11.0.1-rc2
356306
356306
* Tue Dec 01 2020 sguelton@redhat.com - 11.0.1-1.rc1
356306
- llvm 11.0.1-rc1
356306
356306
* Thu Oct 29 2020 Tom Stellard <tstellar@redhat.com> - 11.0.0-2
356306
- Add dependency on clang-resource-filesystem
356306
356306
* Thu Oct 15 2020 sguelton@redhat.com - 11.0.0-1
356306
- Fix NVR
356306
356306
* Mon Oct 12 2020 sguelton@redhat.com - 11.0.0-0.5
356306
- llvm 11.0.0 - final release
356306
356306
* Thu Oct 08 2020 sguelton@redhat.com - 11.0.0-0.4.rc6
356306
- 11.0.0-rc6
356306
356306
* Fri Oct 02 2020 sguelton@redhat.com - 11.0.0-0.3.rc5
356306
- 11.0.0-rc5 Release
356306
356306
* Sun Sep 27 2020 sguelton@redhat.com - 11.0.0-0.2.rc3
356306
- Fix NVR
356306
356306
* Thu Sep 24 2020 sguelton@redhat.com - 11.0.0-0.1.rc3
356306
- 11.0.0-rc3 Release
356306
356306
* Tue Sep 01 2020 sguelton@redhat.com - 11.0.0-0.1.rc2
356306
- 11.0.0-rc2 Release
356306
356306
* Mon Aug 10 2020 Tom Stellard <tstellar@redhat.com> - 11.0.0-0.1.rc1
356306
- 11.0.0-rc1 Release
356306
356306
* Wed Jul 29 2020 sguelton@redhat.com - 10.0.0-9
356306
- use %%license macro
356306
356306
* Mon Jul 27 2020 sguelton@redhat.com - 10.0.0-8
356306
- Remove now obsolete debuginfo package limitation
356306
356306
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 10.0.0-7
356306
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
356306
356306
* Mon Jul 20 2020 sguelton@redhat.com - 10.0.0-6
356306
- Use modern cmake macros
356306
356306
* Wed Jul 15 2020 sguelton@redhat.com - 10.0.0-5
356306
- Fix multilib runtime links, see rhbz#1855379
356306
356306
* Wed Jul 15 2020 sguelton@redhat.com - 10.0.0-4
356306
- Correctly use gpg verification
356306
356306
* Thu Jul 09 2020 Tom Stellard <tstellar@redhat.com> - 10.0.0-3
356306
- Drop dependency on llvm-static
356306
356306
* Thu Jun 11 2020 sguelton@redhat.com - 10.0.0-2
356306
- Fix msan compilation warnings, see af38074874c605f9 upstream
356306
356306
* Mon Mar 30 2020 sguelton@redhat.com - 10.0.0-1
356306
- 10.0.0 final
356306
356306
* Wed Mar 25 2020 sguelton@redhat.com - 10.0.0-0.6.rc6
356306
- 10.0.0 rc6
356306
356306
* Fri Mar 20 2020 sguelton@redhat.com - 10.0.0-0.5.rc5
356306
- 10.0.0 rc5
356306
356306
* Sun Mar 15 2020 sguelton@redhat.com - 10.0.0-0.4.rc4
356306
- 10.0.0 rc4
356306
356306
* Thu Mar 5 2020 sguelton@redhat.com - 10.0.0-0.3.rc3
356306
- 10.0.0 rc3
356306
356306
* Fri Feb 14 2020 sguelton@redhat.com - 10.0.0-0.1.rc2
356306
- 10.0.0 rc2
356306
356306
* Wed Feb 12 2020 sguelton@redhat.com - 10.0.0-0.2.rc1
356306
- Ship blacklist files in the proper directory, see rhbz#1794936
356306
356306
* Fri Jan 31 2020 sguelton@redhat.com - 10.0.0-0.1.rc1
356306
- 10.0.0 rc1
356306
356306
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 9.0.0-2
356306
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
356306
356306
* Thu Sep 19 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-1
356306
- 9.0.0 Release
356306
356306
* Thu Aug 22 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-0.1.rc3
356306
- 9.0.0-rc3 Release
356306
356306
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.0-2.1
356306
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
356306
356306
* Tue Jun 18 2019 sguelton@redhat.com - 8.0.0-2
356306
- Fix rhbz#1678240
356306
356306
* Wed Mar 20 2019 sguelton@redhat.com - 8.0.0-1
356306
- 8.0.0 final
356306
356306
* Tue Mar 12 2019 sguelton@redhat.com - 8.0.0-0.4.rc4
356306
- 8.0.0 Release candidate 4
356306
356306
* Mon Mar 4 2019 sguelton@redhat.com - 8.0.0-0.3.rc3
356306
- 8.0.0 Release candidate 3
356306
356306
* Fri Feb 22 2019 sguelton@redhat.com - 8.0.0-0.2.rc2
356306
- 8.0.0 Release candidate 2
356306
356306
* Mon Feb 11 2019 sguelton@redhat.com - 8.0.0-0.1.rc1
356306
- 8.0.0 Release candidate 1
356306
356306
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.1-2.1
356306
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
356306
356306
* Fri Jan 18 2019 sguelton@redhat.com - 7.0.1-2
356306
- GCC-9 compatibility
356306
356306
* Mon Dec 17 2018 sguelton@redhat.com - 7.0.1-1
356306
- 7.0.1 Release
356306
356306
* Tue Dec 04 2018 sguelton@redhat.com - 7.0.0-2
356306
- Ensure rpmlint passes on specfile
356306
356306
* Mon Sep 24 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-1
356306
- 7.0.0-1 Release
356306
356306
* Wed Sep 12 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.4.rc3
356306
- 7.0.0-rc3 Release
356306
356306
* Fri Sep 07 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.3.rc1
356306
- Use python3 for build scripts
356306
356306
* Thu Sep 06 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.2.rc1
356306
- Drop BuildRequires: python2
356306
356306
* Tue Aug 14 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.1.rc1
356306
- 7.0.0-rc1 Release
356306
356306
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.1-2
356306
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
356306
356306
* Thu Jun 28 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-1
356306
- 6.0.1 Release
356306
356306
* Mon Mar 19 2018 Iryna Shcherbina <ishcherb@redhat.com> - 6.0.0-2
356306
- Update Python 2 dependency declarations to new packaging standards
356306
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
356306
356306
* Thu Mar 08 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-1
356306
- 6.0.0 Release
356306
356306
* Tue Feb 13 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.4.rc2
356306
- 6.0.0-rc2 Release
356306
356306
* Tue Feb 13 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.3.rc1
356306
- Fix build on AArch64
356306
356306
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-0.2.rc1
356306
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
356306
356306
* Thu Jan 25 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.1.rc1
356306
- 6.0.0-rc1 Release
356306
356306
* Wed Jan 17 2018 Tom Stellard <tstellar@redhat.com> - 5.0.1-2
356306
- Build libFuzzer with gcc
356306
356306
* Wed Dec 20 2017 Tom Stellard <tstellar@redhat.com> - 5.0.1-1
356306
- 5.0.1 Release
356306
356306
* Fri Oct 13 2017 Tom Stellard <tstellar@redhat.com> - 5.0.0-1
356306
- 5.0.0 Release
356306
356306
* Mon Sep 25 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-6
356306
- Fix AArch64 build with glibc 2.26
356306
356306
* Tue Sep 12 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-5
356306
- Package libFuzzer
356306
356306
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-4
356306
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
356306
356306
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-3
356306
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
356306
356306
* Fri Jun 23 2017 Tom Stellard <tstelar@redhat.com> - 4.0.1-2
356306
- Fix build with newer glibc
356306
356306
* Fri Jun 23 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-1
356306
- 4.0.1 Release
356306
356306
* Tue Mar 14 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-1
356306
- compiler-rt 4.0.0 Final Release
356306
356306
* Thu Mar 02 2017 Dave Airlie <airlied@redhat.com> - 3.9.1-1
356306
- compiler-rt 3.9.1
356306
356306
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.0-4
356306
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
356306
356306
* Mon Nov 21 2016 Dan HorĂ¡k <dan[at]danny.cz> - 3.9.0-3
356306
- disable debuginfo on s390(x)
356306
356306
* Wed Nov 02 2016 Dave Airlie <airlied@redhat.com> - 3.9.0-2
356306
- build for new arches.
356306
356306
* Wed Oct 26 2016 Dave Airlie <airlied@redhat.com> - 3.9.0-1
356306
- compiler-rt 3.9.0 final release
356306
356306
* Mon May  2 2016 Tom Callaway <spot@fedoraproject.org> 3.8.0-2
356306
- make symlinks to where the linker thinks these libs are
356306
356306
* Thu Mar 10 2016 Dave Airlie <airlied@redhat.com> 3.8.0-1
356306
- compiler-rt 3.8.0 final release
356306
356306
* Thu Mar 03 2016 Dave Airlie <airlied@redhat.com> 3.8.0-0.2
356306
- compiler-rt 3.8.0rc3
356306
356306
* Thu Feb 18 2016 Dave Airlie <airlied@redhat.com> - 3.8.0-0.1
356306
- compiler-rt 3.8.0rc2
356306
356306
* Fri Feb 05 2016 Dave Airlie <airlied@redhat.com> 3.7.1-3
356306
- fix compiler-rt paths - from rwindz0@gmail.com - #1304605
356306
356306
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.1-2
356306
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
356306
356306
* Tue Oct 06 2015 Jan Vcelak <jvcelak@fedoraproject.org> 3.7.0-100
356306
- initial version using cmake build system