Blame SPECS/compiler-rt.spec

23e2a8
#%%global rc_ver 5
aa9b77
212512
%global crt_srcdir compiler-rt-%{version}%{?rc_ver:rc%{rc_ver}}.src
212512
ff3df4
# see https://sourceware.org/bugzilla/show_bug.cgi?id=25271
ff3df4
%global optflags %(echo %{optflags} -D_DEFAULT_SOURCE)
ff3df4
ff3df4
# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93615
ff3df4
%global optflags %(echo %{optflags} -Dasm=__asm__)
ff3df4
212512
Name:		compiler-rt
23e2a8
Version:	12.0.1%{?rc_ver:~rc%{rc_ver}}
23e2a8
Release:	1%{?dist}
212512
Summary:	LLVM "compiler-rt" runtime libraries
212512
212512
License:	NCSA or MIT
212512
URL:		http://llvm.org
ffba90
Source0:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{crt_srcdir}.tar.xz
ffba90
Source1:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{crt_srcdir}.tar.xz.sig
23e2a8
Source2:	tstellar-gpg-key.asc
212512
23e2a8
Patch0:		0001-PATCH-compiler-rt-Workaround-libstdc-limitation-wrt..patch
26d72b
26d72b
# RHEL-specific patches
26d72b
Patch100:	0001-Drop-fno-stack-protector-from-the-compiler-flags.patch
212512
aa9b77
BuildRequires:	gcc
aa9b77
BuildRequires:	gcc-c++
212512
BuildRequires:	cmake
ffba90
BuildRequires:	ninja-build
aa9b77
BuildRequires:	python3
212512
# We need python3-devel for pathfix.py.
212512
BuildRequires:	python3-devel
212512
BuildRequires:	llvm-devel = %{version}
23e2a8
23e2a8
Requires: clang-resource-filesystem%{?isa} = %{version}
212512
212512
%description
212512
The compiler-rt project is a part of the LLVM project. It provides
212512
implementation of the low-level target-specific hooks required by
212512
code generation, sanitizer runtimes and profiling library for code
212512
instrumentation, and Blocks C language extension.
212512
212512
%prep
23e2a8
23e2a8
%autosetup -n %{crt_srcdir} -p2
212512
ff3df4
pathfix.py -i %{__python3} -pn lib/hwasan/scripts/hwasan_symbolize
212512
212512
%build
23e2a8
mkdir -p %{_vpath_builddir}
23e2a8
cd %{_vpath_builddir}
23e2a8
ffba90
%cmake .. -GNinja \
212512
	-DCMAKE_BUILD_TYPE=RelWithDebInfo \
aa9b77
	-DLLVM_CONFIG_PATH:FILEPATH=%{_bindir}/llvm-config-%{__isa_bits} \
212512
	\
212512
%if 0%{?__isa_bits} == 64
212512
	-DLLVM_LIBDIR_SUFFIX=64 \
212512
%else
212512
	-DLLVM_LIBDIR_SUFFIX= \
212512
%endif
212512
	-DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF # could be on?
212512
23e2a8
%cmake_build
212512
212512
%install
23e2a8
23e2a8
cd %{_vpath_builddir}
23e2a8
%cmake_install
212512
ff3df4
# move blacklist/abilist files to where clang expect them
ff3df4
mkdir -p %{buildroot}%{_libdir}/clang/%{version}/share
ff3df4
mv -v %{buildroot}%{_datadir}/*list.txt  %{buildroot}%{_libdir}/clang/%{version}/share/
212512
212512
# move sanitizer libs to better place
aa9b77
%global libclang_rt_installdir lib/linux
ff3df4
mkdir -p %{buildroot}%{_libdir}/clang/%{version}/lib
26d72b
mv -v %{buildroot}%{_prefix}/%{libclang_rt_installdir}/*clang_rt* %{buildroot}%{_libdir}/clang/%{version}/lib
212512
mkdir -p %{buildroot}%{_libdir}/clang/%{version}/lib/linux/
212512
pushd %{buildroot}%{_libdir}/clang/%{version}/lib
aa9b77
for i in *.a *.so
aa9b77
do
212512
	ln -s ../$i linux/$i
212512
done
aa9b77
ffba90
# multilib support: also create symlink from lib to lib64, fixes rhbz#1678240
ffba90
# the symlinks will be dangling if the 32 bits version is not installed, but that should be fine
ffba90
%ifarch x86_64
aa9b77
ffba90
mkdir -p %{buildroot}/%{_exec_prefix}/lib/clang/%{version}/lib/linux
ffba90
for i in *.a *.so
ffba90
do
ffba90
	target=`echo "$i" | sed -e 's/x86_64/i386/'`
ffba90
	ln -s ../../../../../lib/clang/%{version}/lib/$target ../../../../%{_lib}/clang/%{version}/lib/linux/
ffba90
done
23e2a8
aa9b77
%endif
23e2a8
ffba90
popd
212512
212512
%check
23e2a8
23e2a8
#%%cmake_build --target check-compiler-rt
212512
212512
%files
ffba90
%license LICENSE.TXT
212512
%{_includedir}/*
23e2a8
%{_libdir}/clang/%{version}/lib/*
23e2a8
%{_libdir}/clang/%{version}/share/*
ff3df4
%ifarch x86_64 aarch64
ff3df4
%{_bindir}/hwasan_symbolize
ff3df4
%endif
212512
212512
%changelog
23e2a8
* Fri Jul 16 2021 sguelton@redhat.com - 12.0.1-1
23e2a8
- 12.0.1 release
23e2a8
23e2a8
* Tue May 25 2021 sguelton@redhat.com - 12.0.0-2
23e2a8
- Backport several compatibility patches
23e2a8
23e2a8
* Thu May 6 2021 sguelton@redhat.com - 12.0.0-1
23e2a8
- 12.0.0 release
e3a45e
ffba90
* Thu Oct 29 2020 sguelton@redhat.com - 11.0.0-1
ffba90
- 11.0.0 final release
ffba90
ffba90
* Mon Sep 21 2020 sguelton@redhat.com - 11.0.0-0.1.rc2
ffba90
- 11.0.0-rc2 Release
ffba90
ff3df4
* Fri Jul 24 2020 sguelton@redhat.com - 10.0.1-1
ff3df4
- 10.0.1 release
ff3df4
ff3df4
* Mon Jun 15 2020 sguelton@redhat.com - 10.0.0-2
ff3df4
- Fix msan compilation warnings, see rhbz#1841165
ff3df4
ff3df4
* Wed Apr 8 2020 sguelton@redhat.com - 10.0.0-1
ff3df4
- 10.0.0 final
ff3df4
26d72b
* Mon Jan 06 2020 Tom Stellard <tstellar@redhat.com> - 9.0.1-2
26d72b
- Update fno-stack-protector patch to apply with -p2
26d72b
26d72b
* Fri Dec 20 2019 Tom Stellard <tstellar@redhat.com> - 9.0.1-1
26d72b
- 9.0.1 Release
26d72b
26d72b
* Fri Sep 27 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-1
26d72b
- 9.0.0 Release
26d72b
aa9b77
* Thu Aug 1 2019 sguelton@redhat.com - 8.0.1-1
aa9b77
- 8.0.1 release
aa9b77
aa9b77
* Thu Jul 4 2019 sguelton@redhat.com - 8.0.1-0.2.rc2
aa9b77
- Fix rhbz#1678240
aa9b77
aa9b77
* Thu Jun 13 2019 sguelton@redhat.com - 8.0.1-0.1.rc2
aa9b77
- 8.0.1rc2 Release
aa9b77
aa9b77
* Wed Apr 17 2019 sguelton@redhat.com - 8.0.0-1
aa9b77
- 8.0.0 Release 
aa9b77
212512
* Fri Dec 14 2018 Tom Stellard <tstellar@redhat.com> - 7.0.1-1
212512
- 7.0.1 Release 
212512
212512
* Mon Dec 10 2018 Tom Stellard <tstellar@redhat.com> - 7.0.1-0.1.rc3
212512
- 7.0.1-rc3 Release 
212512
212512
* Tue Nov 27 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-1
212512
- 7.0.0 Release 
212512
212512
* Tue Oct 02 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-5
212512
- Use python3 for build scripts
212512
212512
* Mon Oct 01 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-4
212512
- Drop scl macros
212512
212512
* Thu Sep 06 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-3
212512
- Drop -fno-stack-protector flag
212512
212512
* Thu Sep 06 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-2
212512
- Explicitly BuildRequire: /usr/bin/python3
212512
212512
* Wed Jul 11 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-1
212512
- 6.0.1 Release
212512
212512
* Tue Jan 09 2018 Tom Stellard <tstellar@redhat.com> - 5.0.1-1
212512
- 5.0.1 Release
212512
212512
* Wed Jun 07 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-1
212512
- 4.0.1 Release
212512
212512
* Wed Jun 07 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-3
212512
- Build for llvm-toolset-7 rename
212512
212512
* Thu May 18 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-2
212512
- Fix disabling debug on s390(x)
212512
212512
* Tue Mar 14 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-1
212512
- compiler-rt 4.0.0 Final Release
212512
212512
* Thu Mar 02 2017 Dave Airlie <airlied@redhat.com> - 3.9.1-1
212512
- compiler-rt 3.9.1
212512
212512
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.0-4
212512
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
212512
212512
* Mon Nov 21 2016 Dan HorĂ¡k <dan[at]danny.cz> - 3.9.0-3
212512
- disable debuginfo on s390(x)
212512
212512
* Wed Nov 02 2016 Dave Airlie <airlied@redhat.com> - 3.9.0-2
212512
- build for new arches.
212512
212512
* Wed Oct 26 2016 Dave Airlie <airlied@redhat.com> - 3.9.0-1
212512
- compiler-rt 3.9.0 final release
212512
212512
* Mon May  2 2016 Tom Callaway <spot@fedoraproject.org> 3.8.0-2
212512
- make symlinks to where the linker thinks these libs are
212512
212512
* Thu Mar 10 2016 Dave Airlie <airlied@redhat.com> 3.8.0-1
212512
- compiler-rt 3.8.0 final release
212512
212512
* Thu Mar 03 2016 Dave Airlie <airlied@redhat.com> 3.8.0-0.2
212512
- compiler-rt 3.8.0rc3
212512
212512
* Thu Feb 18 2016 Dave Airlie <airlied@redhat.com> - 3.8.0-0.1
212512
- compiler-rt 3.8.0rc2
212512
212512
* Fri Feb 05 2016 Dave Airlie <airlied@redhat.com> 3.7.1-3
212512
- fix compiler-rt paths - from rwindz0@gmail.com - #1304605
212512
212512
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.1-2
212512
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
212512
212512
* Tue Oct 06 2015 Jan Vcelak <jvcelak@fedoraproject.org> 3.7.0-100
212512
- initial version using cmake build system