Blame SPECS/compiler-rt.spec

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