X-Git-Url: http://git.pld-linux.org/?p=packages%2Fvalgrind.git;a=blobdiff_plain;f=valgrind.spec;h=e94237df53c94cdb277674026e2b6e152c01c726;hp=09bcdb7712a376f607f0944bd0b4220180d7489a;hb=644f5b95edb253b6858682e2787c80dc89f020e5;hpb=c3bdd59e451643f50e46d832ef8a8829543b3396 diff --git a/valgrind.spec b/valgrind.spec index 09bcdb7..e94237d 100644 --- a/valgrind.spec +++ b/valgrind.spec @@ -1,82 +1,128 @@ -Summary: An open-source memory debugger for x86-GNU/Linux -Summary(pl): Otwarty odpluskwiacz pamiêci dla Linuksa x86 +# TODO: +# - fix CC detection in configure, so CC=gcc won't be needed +# +# Conditional build: +%bcond_with mpi # MPI wrapper module +# +Summary: An open-source memory debugger +Summary(pl.UTF-8): Otwarty odpluskwiacz pamięci Name: valgrind -Version: 1.0.3 +Version: 3.14.0 Release: 1 -License: GPL -ExclusiveArch: %{ix86} -Group: Networking/Utilities -Source0: http://developer.kde.org/~sewardj/%{name}-%{version}.tar.bz2 -URL: http://developer.kde.org/~sewardj/ -BuildRequires: autoconf -BuildRequires: automake +License: GPL v2+ +Group: Development/Tools +Source0: https://sourceware.org/pub/valgrind/%{name}-%{version}.tar.bz2 +# Source0-md5: 74175426afa280184b62591b58c671b3 +Patch0: %{name}-native-cpuid.patch +Patch1: %{name}-ld_linux_strlen.patch +URL: http://valgrind.org/ +BuildRequires: autoconf >= 2.50 +BuildRequires: automake >= 1:1.10 +BuildRequires: gcc >= 5:3.0 +%ifarch x32 +BuildRequires: gcc-multilib-64 >= 5:3.0 +%endif +# check in configure.ac:882 AC_MSG_CHECKING([the GLIBC_VERSION version]) +BuildRequires: glibc-devel >= 6:2.2 +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 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -# Valgrind binaries should _never_ be stripped -%define no_install_post_strip 1 - -# Same name as libpthread -%define _noautoprovfiles %{_libdir}/%{name}/libpthread.so.0 %{_libdir}/%{name}/libpthread.so %{_libdir}/%{name}/valgrind.so %{_libdir}/%{name}/valgrinq.so +%define _noautostrip .*/vgpreload.*\\.so +%define filterout_c -fstack-protector-strong +# ld portion broken +%undefine with_ccache %description -Valgrind is a GPL'd tool to help you find memory-management problems -in your programs. When a program is run under Valgrind's supervision, -all reads and writes of memory are checked, and calls to -malloc/new/free/delete are intercepted. As a result, Valgrind can -detect problems such as: - -- Use of uninitialised memory -- Reading/writing memory after it has been free'd -- Reading/writing off the end of malloc'd blocks -- Reading/writing inappropriate areas on the stack -- Memory leaks -- where pointers to malloc'd blocks are lost forever -- Passing of uninitialised and/or unaddressible memory to system calls -- Mismatched use of malloc/new/new [] vs free/delete/delete [] -- Some misuses of the POSIX pthreads API +Valgrind is a GPL'd system for debugging and profiling Linux programs. +With the tools that come with Valgrind, you can automatically detect +many memory management and threading bugs, avoiding hours of +frustrating bug-hunting, making your programs more stable. You can +also perform detailed profiling to help speed up your programs. -%description -l pl -Valgrind jest narzêdziem rozwi±zuj±cym problemy zwi±zane z zarz±dzaniem -pamiêci± w programach. Gdy program zostaje uruchomiony pod nadzorem -Valgrinda wszystkie odczyty i zapisy do pamiêci s± sprawdzane. -Przechwytywane s± te¿ odwo³ania do malloc/new/free/delete. Dziêki temu -mo¿na wykryæ nastêpuj±ce problemy: - -- U¿ycie niezainicjalizowanej pamiêci -- Odczytywanie/zapisywanie do obszaru pamiêci, który zosta³ zwolniony -- Odczytywanie/zapisywanie na koñcach zaalokowanych bloków -- Odczytywanie/zapisywanie niew³a¶ciwych obszarów na stosie -- Wycieki pamiêci -- gdy wska¼niki do zaalokowanych bloków s± stracone na - zawsze -- Przekazywanie niezainicjalizowanej i/lub nieadresowalnej pamiêci do - odwo³añ systemowych -- Niekonsekwencja w u¿ywaniu malloc/new/new [] kontra free/delete/delete [] -- Niektóre nadu¿ycia API POSIX pthreads +%description -l pl.UTF-8 +Valgrind jest systemem służącym do odpluskwiania i profilowania +programów na Linuksie. Używając dostarczanych z nim narzędzi można +automatycznie wykrywać wiele błędów związanych z zarządzaniem pamięcią +i wątkowaniem, dzięki czemu unika się frustrującego polowania na +błędy, a także czyni się programy bardziej stabilnymi. Możliwe jest +również dokładne profilowanie, dzięki któremu programy zaczną szybciej +pracować. %prep %setup -q +%patch0 -p1 +%patch1 -p1 + +sed -i -e 's:^CFLAGS="-Wno-long-long":CFLAGS="$CFLAGS -Wno-long-long":' configure.ac %build -rm -f missing -aclocal +%{__aclocal} %{__autoconf} +%{__autoheader} %{__automake} + +ac_cv_path_GDB=/usr/bin/gdb \ %configure \ + CC=gcc \ + --enable-tls \ +%if %{_lib} != "lib" + --enable-only64bit \ +%endif \ + --enable-lto=yes \ LDFLAGS="" # no strip! + %{__make} %install rm -rf $RPM_BUILD_ROOT -%{__make} install DESTDIR=$RPM_BUILD_ROOT +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT + +%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc +cp -p docs/index.pdf docs/valgrind_manual.pdf +cp -p docs/index.ps docs/valgrind_manual.ps %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) -%doc ACKNOWLEDGEMENTS AUTHORS ChangeLog PATCHES_APPLIED -%doc README README_MISSING_SYSCALL_OR_IOCTL TODO -%doc docs/*.html -%attr(755,root,root) %{_bindir}/* -%{_includedir}/* -%{_libdir}/%{name} +%doc AUTHORS NEWS README README_MISSING_SYSCALL_OR_IOCTL +%doc docs/html docs/valgrind_manual.pdf docs/valgrind_manual.ps +%attr(755,root,root) %{_bindir}/callgrind_annotate +%attr(755,root,root) %{_bindir}/callgrind_control +%attr(755,root,root) %{_bindir}/cg_annotate +%attr(755,root,root) %{_bindir}/cg_diff +%attr(755,root,root) %{_bindir}/cg_merge +%attr(755,root,root) %{_bindir}/ms_print +%attr(755,root,root) %{_bindir}/valgrind +%attr(755,root,root) %{_bindir}/valgrind-di-server +%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 +%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 +%{_includedir}/valgrind +%{_mandir}/man1/callgrind_annotate.1* +%{_mandir}/man1/callgrind_control.1* +%{_mandir}/man1/cg_annotate.1* +%{_mandir}/man1/cg_diff.1* +%{_mandir}/man1/cg_merge.1* +%{_mandir}/man1/ms_print.1* +%{_mandir}/man1/valgrind.1* +%{_mandir}/man1/valgrind-listener.1* +%{_mandir}/man1/vgdb.1* +%{_pkgconfigdir}/valgrind.pc