- realize -fsanitizer=foo failures were due to missing buildrequires...
- add bcond for building with sanitizer(s)
This commit is contained in:
parent
f2b1ddb50a
commit
e1b7ad0d36
15
rpm.spec
15
rpm.spec
@ -6,6 +6,8 @@
|
|||||||
%bcond_without check
|
%bcond_without check
|
||||||
# disable plugins initially
|
# disable plugins initially
|
||||||
%bcond_with plugins
|
%bcond_with plugins
|
||||||
|
# build with sanitizers?
|
||||||
|
%bcond_without sanitizer
|
||||||
|
|
||||||
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
|
||||||
|
|
||||||
@ -128,6 +130,14 @@ BuildRequires: binutils-devel
|
|||||||
# Couple of patches change makefiles so, require for now...
|
# Couple of patches change makefiles so, require for now...
|
||||||
BuildRequires: automake libtool
|
BuildRequires: automake libtool
|
||||||
|
|
||||||
|
%if %{with sanitizer}
|
||||||
|
BuildRequires: libasan
|
||||||
|
BuildRequires: libubsan
|
||||||
|
#BuildRequires: liblsan
|
||||||
|
#BuildRequires: libtsan
|
||||||
|
%global sanitizer_flags -fsanitize=address -fsanitize=undefined
|
||||||
|
%endif
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -296,7 +306,7 @@ ln -s db-%{bdbver} db
|
|||||||
#LDFLAGS=-L%{_libdir}/db%{bdbver}
|
#LDFLAGS=-L%{_libdir}/db%{bdbver}
|
||||||
%endif
|
%endif
|
||||||
CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`"
|
CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`"
|
||||||
CFLAGS="$RPM_OPT_FLAGS -fsanitize=address"
|
CFLAGS="$RPM_OPT_FLAGS %{?sanitizer_flags}"
|
||||||
export CPPFLAGS CFLAGS LDFLAGS
|
export CPPFLAGS CFLAGS LDFLAGS
|
||||||
|
|
||||||
autoreconf -i -f
|
autoreconf -i -f
|
||||||
@ -528,7 +538,8 @@ exit 0
|
|||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Apr 11 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.2-6
|
* Fri Apr 11 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.2-6
|
||||||
- build with -fsanitize=address for now
|
- build with -fsanitize=address and -fsanitize=undefined for now
|
||||||
|
- add spec build conditional for sanitizer build
|
||||||
|
|
||||||
* Tue Apr 08 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.2-5
|
* Tue Apr 08 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.2-5
|
||||||
- replace unmaintained dependency generator scripts with rpmdeps wrappers
|
- replace unmaintained dependency generator scripts with rpmdeps wrappers
|
||||||
|
Loading…
Reference in New Issue
Block a user