Blame SPECS/compiler-rt.spec

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