Blame compiler-rt.spec

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
ce075fc
Name:		compiler-rt
ed2ffb6
Version:	4.0.1
edd7467
Release:	5%{?dist}
ce075fc
Summary:	LLVM "compiler-rt" runtime libraries
ce075fc
ce075fc
License:	NCSA or MIT
ce075fc
URL:		http://llvm.org
832406b
Source0:	http://llvm.org/releases/%{version}/%{name}-%{version}.src.tar.xz
edd7467
# Extract libFuzzer sources from the llvm tarball.  We are packaging it as part
edd7467
# of compiler-rt, because upstream moved the code into the compiler-rt project
edd7467
# for LLVM 6.0.0, and we also don't want to add clang as a build dependency for
edd7467
# llvm.
edd7467
# wget http://llvm.org/releases/4.0.1/llvm-4.0.1.src.tar.xz
edd7467
# tar -xJf llvm-4.0.1.src.tar.xz
edd7467
# cd llvm-4.0.1.src/lib/Fuzzer/
edd7467
# tar -cJf Fuzzer.tar.xz Fuzzer/
edd7467
Source1: Fuzzer.tar.xz
5bea6a3
Patch0:	0001-Build-fixes-for-newer-glibc.patch
ce075fc
ce075fc
BuildRequires:	cmake
ce075fc
BuildRequires:	python
ce075fc
BuildRequires:  llvm-devel = %{version}
11b2c3b
BuildRequires:  llvm-static = %{version}
ce075fc
edd7467
# libFuzzer must be built by clang.
edd7467
BuildRequires:  clang
edd7467
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
edd7467
%setup -T -q -b 1 -n Fuzzer
edd7467
5bea6a3
%autosetup -n %{name}-%{version}.src -p1
ce075fc
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
0eef7c3
        -DLLVM_LIBDIR_SUFFIX=64 \
0eef7c3
%else
0eef7c3
        -DLLVM_LIBDIR_SUFFIX= \
0eef7c3
%endif
ce075fc
	-DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF # could be on?
ce075fc
ce075fc
make %{?_smp_mflags}
ce075fc
edd7467
pushd ../../Fuzzer
edd7467
./build.sh
edd7467
popd
edd7467
ce075fc
%install
ce075fc
cd _build
ce075fc
make install DESTDIR=%{buildroot}
ce075fc
edd7467
mkdir -p %{buildroot}%{_libdir}/clang/%{version}/lib
edd7467
edd7467
pushd ../../Fuzzer
edd7467
install -m0644 libFuzzer.a %{buildroot}%{_libdir}/clang/%{version}/lib
edd7467
popd
edd7467
ce075fc
# move sanitizer lists to better place
9c61c87
for file in asan_blacklist.txt msan_blacklist.txt dfsan_blacklist.txt cfi_blacklist.txt dfsan_abilist.txt; do
1f875a6
	mv -v %{buildroot}%{_prefix}/${file} %{buildroot}%{_libdir}/clang/%{version}/ || :
ce075fc
done
ce075fc
1f875a6
# move sanitizer libs to better place
7033c16
mv -v %{buildroot}%{_prefix}/lib/linux/libclang_rt* %{buildroot}%{_libdir}/clang/%{version}/lib
0df3309
mkdir -p %{buildroot}%{_libdir}/clang/%{version}/lib/linux/
0df3309
pushd %{buildroot}%{_libdir}/clang/%{version}/lib
0df3309
for i in *.a *.syms *.so; do
0df3309
	ln -s ../$i linux/$i
0df3309
done
1f875a6
ce075fc
%check
ce075fc
cd _build
ce075fc
#make check-all
ce075fc
ce075fc
%files
Thierry Vignaud d27e752
%{_includedir}/*
1f875a6
%{_libdir}/clang/%{version}
ce075fc
ce075fc
%changelog
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