Summary: An open-source memory debugger
Summary(pl.UTF-8): Otwarty odpluskwiacz pamięci
Name: valgrind
-Version: 3.11.0
-Release: 2
+Version: 3.23.0
+Release: 1
License: GPL v2+
Group: Development/Tools
-Source0: http://valgrind.org/downloads/%{name}-%{version}.tar.bz2
-# Source0-md5: 4ea62074da73ae82e0162d6550d3f129
+Source0: https://sourceware.org/pub/valgrind/%{name}-%{version}.tar.bz2
+# Source0-md5: c59775fcbfa82fcce796843d0aaa7538
Patch0: %{name}-native-cpuid.patch
Patch1: %{name}-ld_linux_strlen.patch
-Patch2: valgrind-3.11.0-wrapmalloc.patch
-Patch3: valgrind-3.11.0-no-rdrand.patch
-URL: http://valgrind.org/
+Patch2: %{name}-datadir.patch
+URL: https://www.valgrind.org/
BuildRequires: autoconf >= 2.50
BuildRequires: automake >= 1:1.10
BuildRequires: gcc >= 5:3.0
BuildRequires: libgomp-devel
BuildRequires: libstdc++-devel
%{?with_mpi:BuildRequires: mpi-devel}
-Obsoletes: valgrind-callgrind
-Obsoletes: valgrind-calltree
-ExclusiveArch: %{ix86} %{x8664} arm ppc ppc64 s390x x32
+BuildRequires: rpmbuild(macros) >= 2.007
+Obsoletes: valgrind-callgrind < 0.11
+Obsoletes: valgrind-calltree < 0.10
+ExclusiveArch: %{ix86} %{x8664} %{armv7} ppc ppc64 s390x x32 aarch64
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _noautostrip .*/vgpreload.*\\.so
# ld portion broken
%undefine with_ccache
+%define specflags_arm -marm
+
%description
Valgrind is a GPL'd system for debugging and profiling Linux programs.
With the tools that come with Valgrind, you can automatically detect
%patch0 -p1
%patch1 -p1
%patch2 -p1
-%patch3 -p1
-sed -i -e 's:^CFLAGS="-Wno-long-long":CFLAGS="$CFLAGS -Wno-long-long":' configure.ac
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
+ cachegrind/cg_annotate.in \
+ cachegrind/cg_merge.in \
+ cachegrind/cg_diff.in
+
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\1,' \
+ callgrind/callgrind_annotate.in \
+ callgrind/callgrind_control.in
%build
%{__aclocal}
ac_cv_path_GDB=/usr/bin/gdb \
%configure \
- CC=gcc \
--enable-tls \
-%if %{_lib} != "lib"
+ %{!?with_mpi:--with-mpicc=/bin/false} \
+%if "%{_lib}" != "lib"
--enable-only64bit \
-%endif
+%endif \
+ --enable-lto \
LDFLAGS="" # no strip!
%{__make}
%attr(755,root,root) %{_bindir}/valgrind-listener
%attr(755,root,root) %{_bindir}/vgdb
%dir %{_libdir}/%{name}
-%attr(755,root,root) %{_libdir}/%{name}/*-linux
-%attr(755,root,root) %{_libdir}/%{name}/vgpreload_*-linux.so
+%{_libdir}/%{name}/lib*-linux.a
%if %{with mpi}
# TODO: subpackage?
%attr(755,root,root) %{_libdir}/%{name}/libmpiwrap-*-linux.so
%endif
-%{_libdir}/%{name}/*.xml
-%{_libdir}/%{name}/default.supp
-%{_libdir}/%{name}/lib*-linux.a
+%if "%{_libexecdir}" != "%{_libdir}"
+%dir %{_libexecdir}/%{name}
+%endif
+%attr(755,root,root) %{_libexecdir}/%{name}/*-linux
+%attr(755,root,root) %{_libexecdir}/%{name}/valgrind-monitor.py
+%attr(755,root,root) %{_libexecdir}/%{name}/valgrind-monitor-def.py
+%attr(755,root,root) %{_libexecdir}/%{name}/vgpreload_*-linux.so
+%{_libexecdir}/%{name}/*.xml
+%{_libexecdir}/%{name}/default.supp
+%{_datadir}/%{name}
%{_includedir}/valgrind
%{_mandir}/man1/callgrind_annotate.1*
%{_mandir}/man1/callgrind_control.1*
%{_mandir}/man1/cg_merge.1*
%{_mandir}/man1/ms_print.1*
%{_mandir}/man1/valgrind.1*
+%{_mandir}/man1/valgrind-di-server.1*
%{_mandir}/man1/valgrind-listener.1*
%{_mandir}/man1/vgdb.1*
%{_pkgconfigdir}/valgrind.pc