Blame SPECS/compiler-rt.spec

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