e58e4ce
%ifarch s390 s390x
e58e4ce
# only limited set of libs available on s390(x) and the existing ones (stats, ubsan) don't provide debuginfo
e58e4ce
%global debug_package %{nil}
e58e4ce
%endif
e58e4ce
a00e029
#%%global rc_ver 6
c70c667
%global baserelease 1
f296815
5899a94
%global crt_srcdir compiler-rt-%{version}%{?rc_ver:rc%{rc_ver}}.src
5899a94
f80596e
# see https://sourceware.org/bugzilla/show_bug.cgi?id=25271
f80596e
%global optflags %(echo %{optflags} -D_DEFAULT_SOURCE)
f80596e
b1b7fc4
# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93615
f80596e
%global optflags %(echo %{optflags} -Dasm=__asm__)
f80596e
ce075fc
Name:		compiler-rt
c70c667
Version:	10.0.1
aea4652
Release:	%{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist}
ce075fc
Summary:	LLVM "compiler-rt" runtime libraries
ce075fc
ce075fc
License:	NCSA or MIT
ce075fc
URL:		http://llvm.org
a00e029
%if 0%{?rc_ver:1}
a00e029
Source0:	https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{crt_srcdir}.tar.xz
a00e029
Source1:	https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{crt_srcdir}.tar.xz.sig
a00e029
%else
a00e029
Source0:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{crt_srcdir}.tar.xz
a00e029
Source3:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{crt_srcdir}.tar.xz.sig
a00e029
%endif
f80596e
Source2:	https://prereleases.llvm.org/%{version}/hans-gpg-key.asc
ce075fc
049fbf7
Patch0:		0001-PATCH-std-thread-copy.patch
b19eff0
e317298
BuildRequires:	gcc
e317298
BuildRequires:	gcc-c++
ce075fc
BuildRequires:	cmake
b19eff0
BuildRequires:	python3
b19eff0
# We need python3-devel for pathfix.py.
b19eff0
BuildRequires:	python3-devel
e317298
BuildRequires:	llvm-devel = %{version}
e317298
BuildRequires:	llvm-static = %{version}
ce075fc
ce075fc
%description
ce075fc
The compiler-rt project is a part of the LLVM project. It provides
ce075fc
implementation of the low-level target-specific hooks required by
ce075fc
code generation, sanitizer runtimes and profiling library for code
ce075fc
instrumentation, and Blocks C language extension.
ce075fc
ce075fc
%prep
5899a94
%autosetup -n %{crt_srcdir} -p1
ce075fc
f80596e
pathfix.py -i %{__python3} -pn lib/hwasan/scripts/hwasan_symbolize
b19eff0
ce075fc
%build
ce075fc
mkdir -p _build
ce075fc
cd _build
ce075fc
%cmake .. \
ce075fc
	-DCMAKE_BUILD_TYPE=RelWithDebInfo \
ce075fc
	-DLLVM_CONFIG_PATH:FILEPATH=%{_bindir}/llvm-config-%{__isa_bits} \
ce075fc
	\
0eef7c3
%if 0%{?__isa_bits} == 64
e317298
	-DLLVM_LIBDIR_SUFFIX=64 \
0eef7c3
%else
e317298
	-DLLVM_LIBDIR_SUFFIX= \
0eef7c3
%endif
ce075fc
	-DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF # could be on?
ce075fc
ce075fc
make %{?_smp_mflags}
ce075fc
ce075fc
%install
ce075fc
cd _build
ce075fc
make install DESTDIR=%{buildroot}
ce075fc
e947cdb
# move blacklist/abilist files to where clang expect them
e947cdb
mkdir -p %{buildroot}%{_libdir}/clang/%{version}/share
e947cdb
mv -v %{buildroot}%{_datadir}/*list.txt  %{buildroot}%{_libdir}/clang/%{version}/share/
ce075fc
1f875a6
# move sanitizer libs to better place
e317298
%global libclang_rt_installdir lib/linux
e947cdb
mkdir -p %{buildroot}%{_libdir}/clang/%{version}/lib
aea4652
mv -v %{buildroot}%{_prefix}/%{libclang_rt_installdir}/*clang_rt* %{buildroot}%{_libdir}/clang/%{version}/lib
0df3309
mkdir -p %{buildroot}%{_libdir}/clang/%{version}/lib/linux/
0df3309
pushd %{buildroot}%{_libdir}/clang/%{version}/lib
d67d734
for i in *.a *.so
d67d734
do
0df3309
	ln -s ../$i linux/$i
0df3309
done
d67d734
973d28b
# multilib support: also create symlink from lib to lib64, fixes rhbz#1678240
973d28b
# the symlinks will be dangling if the 32 bits version is not installed, but that should be fine
973d28b
%ifarch x86_64
d67d734
973d28b
mkdir -p %{buildroot}/%{_exec_prefix}/lib/clang/%{version}/lib/linux
973d28b
for i in *.a *.so
973d28b
do
973d28b
	target=`echo "$i" | sed -e 's/x86_64/i386/'`
973d28b
	ln -s ../../../../../lib/clang/%{version}/lib/$target ../../../../%{_lib}/clang/%{version}/lib/linux/
973d28b
done
973d28b
 
d67d734
%endif
973d28b
 
973d28b
popd
1f875a6
ce075fc
%check
049fbf7
#make check-all -C _build
ce075fc
ce075fc
%files
Thierry Vignaud d27e752
%{_includedir}/*
1f875a6
%{_libdir}/clang/%{version}
f80596e
%ifarch x86_64 aarch64
f80596e
%{_bindir}/hwasan_symbolize
f80596e
%endif
ce075fc
ce075fc
%changelog
c70c667
* Mon Jul 27 2020 sguelton@redhat.com - 10.0.0-1
c70c667
- 10.0.1
c70c667
a00e029
* Fri Apr 3 2020 sguelton@redhat.com - 10.0.0-1
a00e029
- 10.0.0 final
a00e029
e947cdb
* Sun Mar 15 2020 sguelton@redhat.com - 10.0.0-0.2.rc4
e947cdb
- 10.0.0 rc4
f80596e
f80596e
* Fri Jan 31 2020 sguelton@redhat.com - 10.0.0-0.1.rc1
f80596e
- 10.0.0 rc1
f80596e
6708015
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 9.0.0-2
6708015
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
6708015
c03feac
* Thu Sep 19 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-1
c03feac
- 9.0.0 Release
c03feac
aea4652
* Thu Aug 22 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-0.1.rc3
aea4652
- 9.0.0-rc3 Release
aea4652
34bc55f
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.0-2.1
34bc55f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
34bc55f
d67d734
* Tue Jun 18 2019 sguelton@redhat.com - 8.0.0-2
d67d734
- Fix rhbz#1678240
d67d734
2e20afe
* Wed Mar 20 2019 sguelton@redhat.com - 8.0.0-1
2e20afe
- 8.0.0 final
2e20afe
ed16262
* Tue Mar 12 2019 sguelton@redhat.com - 8.0.0-0.4.rc4
ed16262
- 8.0.0 Release candidate 4
ed16262
4197eae
* Mon Mar 4 2019 sguelton@redhat.com - 8.0.0-0.3.rc3
4197eae
- 8.0.0 Release candidate 3
4197eae
861c8e1
* Fri Feb 22 2019 sguelton@redhat.com - 8.0.0-0.2.rc2
cf04a22
- 8.0.0 Release candidate 2
cf04a22
861c8e1
* Mon Feb 11 2019 sguelton@redhat.com - 8.0.0-0.1.rc1
049fbf7
- 8.0.0 Release candidate 1
049fbf7
95edda7
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.1-2.1
95edda7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
95edda7
80b9904
* Fri Jan 18 2019 sguelton@redhat.com - 7.0.1-2
80b9904
- GCC-9 compatibility
80b9904
f296815
* Mon Dec 17 2018 sguelton@redhat.com - 7.0.1-1
f296815
- 7.0.1 Release
f296815
e317298
* Tue Dec 04 2018 sguelton@redhat.com - 7.0.0-2
e317298
- Ensure rpmlint passes on specfile
e317298
ad6209d
* Mon Sep 24 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-1
ad6209d
- 7.0.0-1 Release
ad6209d
ee0db98
* Wed Sep 12 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.4.rc3
ee0db98
- 7.0.0-rc3 Release
ee0db98
b19eff0
* Fri Sep 07 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.3.rc1
b19eff0
- Use python3 for build scripts
b19eff0
911d052
* Thu Sep 06 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.2.rc1
911d052
- Drop BuildRequires: python2
911d052
5899a94
* Tue Aug 14 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.1.rc1
5899a94
- 7.0.0-rc1 Release
5899a94
dc54a16
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.1-2
dc54a16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
dc54a16
2325935
* Thu Jun 28 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-1
2325935
- 6.0.1 Release
2325935
3a1d0f1
* Mon Mar 19 2018 Iryna Shcherbina <ishcherb@redhat.com> - 6.0.0-2
3a1d0f1
- Update Python 2 dependency declarations to new packaging standards
3a1d0f1
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
3a1d0f1
f7a7320
* Thu Mar 08 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-1
f7a7320
- 6.0.0 Release
f7a7320
84f2679
* Tue Feb 13 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.4.rc2
84f2679
- 6.0.0-rc2 Release
84f2679
69ca4ed
* Tue Feb 13 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.3.rc1
69ca4ed
- Fix build on AArch64
69ca4ed
433d443
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-0.2.rc1
433d443
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
433d443
d4ed69c
* Thu Jan 25 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.1.rc1
d4ed69c
- 6.0.0-rc1 Release
d4ed69c
90ffd5a
* Wed Jan 17 2018 Tom Stellard <tstellar@redhat.com> - 5.0.1-2
90ffd5a
- Build libFuzzer with gcc
90ffd5a
7af6413
* Wed Dec 20 2017 Tom Stellard <tstellar@redhat.com> - 5.0.1-1
7af6413
- 5.0.1 Release
7af6413
6b9c737
* Fri Oct 13 2017 Tom Stellard <tstellar@redhat.com> - 5.0.0-1
6b9c737
- 5.0.0 Release
6b9c737
b53932b
* Mon Sep 25 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-6
b53932b
- Fix AArch64 build with glibc 2.26
b53932b
edd7467
* Tue Sep 12 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-5
edd7467
- Package libFuzzer
edd7467
b2af444
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-4
b2af444
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
b2af444
1595158
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-3
1595158
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
1595158
5bea6a3
* Fri Jun 23 2017 Tom Stellard <tstelar@redhat.com> - 4.0.1-2
5bea6a3
- Fix build with newer glibc
5bea6a3
ed2ffb6
* Fri Jun 23 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-1
ed2ffb6
- 4.0.1 Release
ed2ffb6
377808d
* Tue Mar 14 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-1
377808d
- compiler-rt 4.0.0 Final Release
377808d
2ff9f55
* Thu Mar 02 2017 Dave Airlie <airlied@redhat.com> - 3.9.1-1
2ff9f55
- compiler-rt 3.9.1
2ff9f55
dfc979e
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.9.0-4
dfc979e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
dfc979e
e58e4ce
* Mon Nov 21 2016 Dan HorĂ¡k <dan[at]danny.cz> - 3.9.0-3
e58e4ce
- disable debuginfo on s390(x)
e58e4ce
a85f5ce
* Wed Nov 02 2016 Dave Airlie <airlied@redhat.com> - 3.9.0-2
a85f5ce
- build for new arches.
a85f5ce
fcb9bc0
* Wed Oct 26 2016 Dave Airlie <airlied@redhat.com> - 3.9.0-1
fcb9bc0
- compiler-rt 3.9.0 final release
fcb9bc0
0df3309
* Mon May  2 2016 Tom Callaway <spot@fedoraproject.org> 3.8.0-2
0df3309
- make symlinks to where the linker thinks these libs are
0df3309
832406b
* Thu Mar 10 2016 Dave Airlie <airlied@redhat.com> 3.8.0-1
832406b
- compiler-rt 3.8.0 final release
832406b
6e46151
* Thu Mar 03 2016 Dave Airlie <airlied@redhat.com> 3.8.0-0.2
6e46151
- compiler-rt 3.8.0rc3
6e46151
9c61c87
* Thu Feb 18 2016 Dave Airlie <airlied@redhat.com> - 3.8.0-0.1
9c61c87
- compiler-rt 3.8.0rc2
9c61c87
1f875a6
* Fri Feb 05 2016 Dave Airlie <airlied@redhat.com> 3.7.1-3
1f875a6
- fix compiler-rt paths - from rwindz0@gmail.com - #1304605
1f875a6
cb23b86
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.1-2
cb23b86
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
cb23b86
ce075fc
* Tue Oct 06 2015 Jan Vcelak <jvcelak@fedoraproject.org> 3.7.0-100
ce075fc
- initial version using cmake build system