Blame SPECS/compiler-rt.spec

d0a164
%ifarch s390 s390x
d0a164
# only limited set of libs available on s390(x) and the existing ones (stats, ubsan) don't provide debuginfo
d0a164
%global debug_package %{nil}
d0a164
%endif
d0a164
d0a164
#%%global rc_ver 6
286992
%global baserelease 1
d0a164
d0a164
%global crt_srcdir 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
286992
Version:	10.0.1
d0a164
Release:	%{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist}
d0a164
Summary:	LLVM "compiler-rt" runtime libraries
d0a164
d0a164
License:	NCSA or MIT
d0a164
URL:		http://llvm.org
d0a164
%if 0%{?rc_ver:1}
d0a164
Source0:	https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{crt_srcdir}.tar.xz
d0a164
Source1:	https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{crt_srcdir}.tar.xz.sig
d0a164
%else
d0a164
Source0:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{crt_srcdir}.tar.xz
d0a164
Source3:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{crt_srcdir}.tar.xz.sig
d0a164
%endif
d0a164
Source2:	https://prereleases.llvm.org/%{version}/hans-gpg-key.asc
d0a164
d0a164
Patch0:		0001-PATCH-std-thread-copy.patch
0c55e0
Patch1:		0001-Fix-strict-aliasing-warning-in-msan.cpp.patch
d0a164
d0a164
# RHEL-specific patches
d0a164
Patch100:	0001-Drop-fno-stack-protector-from-the-compiler-flags.patch
d0a164
d0a164
BuildRequires:	gcc
d0a164
BuildRequires:	gcc-c++
d0a164
BuildRequires:	cmake
d0a164
BuildRequires:	python3
d0a164
# We need python3-devel for pathfix.py.
d0a164
BuildRequires:	python3-devel
d0a164
BuildRequires:	llvm-devel = %{version}
d0a164
BuildRequires:	llvm-static = %{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
d0a164
%autosetup -n %{crt_srcdir} -p1
d0a164
d0a164
pathfix.py -i %{__python3} -pn lib/hwasan/scripts/hwasan_symbolize
d0a164
d0a164
%build
d0a164
mkdir -p _build
d0a164
cd _build
d0a164
%cmake .. \
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
d0a164
make %{?_smp_mflags}
d0a164
d0a164
%install
d0a164
cd _build
d0a164
make install DESTDIR=%{buildroot}
d0a164
d0a164
# move blacklist/abilist files to where clang expect them
d0a164
mkdir -p %{buildroot}%{_libdir}/clang/%{version}/share
d0a164
mv -v %{buildroot}%{_datadir}/*list.txt  %{buildroot}%{_libdir}/clang/%{version}/share/
d0a164
d0a164
# move sanitizer libs to better place
d0a164
%global libclang_rt_installdir lib/linux
d0a164
mkdir -p %{buildroot}%{_libdir}/clang/%{version}/lib
d0a164
mv -v %{buildroot}%{_prefix}/%{libclang_rt_installdir}/*clang_rt* %{buildroot}%{_libdir}/clang/%{version}/lib
d0a164
mkdir -p %{buildroot}%{_libdir}/clang/%{version}/lib/linux/
d0a164
pushd %{buildroot}%{_libdir}/clang/%{version}/lib
d0a164
for i in *.a *.so
d0a164
do
d0a164
	ln -s ../$i linux/$i
d0a164
done
d0a164
popd
d0a164
d0a164
# multilib support: also create symlink from lib to lib64
d0a164
# fixes rhbz#1678240
d0a164
%ifarch %{ix86}
d0a164
%post
d0a164
if test "`uname -m`" = x86_64
d0a164
then
d0a164
	cd %{_libdir}/clang/%{version}/lib
d0a164
	mkdir -p ../../../../lib64/clang/%{version}/lib
d0a164
	for i in *.a *.so
d0a164
	do
d0a164
		ln -s ../../../../%{_lib}/clang/%{version}/lib/$i ../../../../lib64/clang/%{version}/lib/$i
d0a164
	done
d0a164
fi
d0a164
d0a164
%preun
d0a164
d0a164
if test "`uname -m`" = x86_64
d0a164
then
d0a164
	cd %{_libdir}/clang/%{version}/lib
d0a164
	for i in *.a *.so
d0a164
	do
d0a164
		rm ../../../../lib64/clang/%{version}/lib/$i
d0a164
	done
d0a164
	rmdir -p ../../../../lib64/clang/%{version}/lib 2>/dev/null 1>/dev/null || :
d0a164
fi
d0a164
d0a164
%endif
d0a164
d0a164
%check
d0a164
#make check-all -C _build
d0a164
d0a164
%files
d0a164
%{_includedir}/*
d0a164
%{_libdir}/clang/%{version}
d0a164
%ifarch x86_64 aarch64
d0a164
%{_bindir}/hwasan_symbolize
d0a164
%endif
d0a164
d0a164
%changelog
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