2007-01-16 00:40:26 +01:00
|
|
|
#
|
2011-03-16 13:17:26 +01:00
|
|
|
# spec file for package valgrind
|
2007-01-16 00:40:26 +01:00
|
|
|
#
|
2011-03-16 13:17:26 +01:00
|
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-16 00:40:26 +01:00
|
|
|
#
|
2008-11-07 15:52:12 +01:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-16 00:40:26 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2008-04-28 02:03:35 +02:00
|
|
|
|
2007-01-16 00:40:26 +01:00
|
|
|
Name: valgrind
|
2011-11-30 14:18:34 +01:00
|
|
|
BuildRequires: automake docbook-xsl-stylesheets docbook_4 gcc-c++ glibc-devel-32bit libxslt xorg-x11-devel
|
2007-09-12 16:49:23 +02:00
|
|
|
%ifarch x86_64 ppc64
|
2011-05-23 11:59:22 +02:00
|
|
|
BuildRequires: gcc-32bit glibc-devel-32bit
|
2007-01-16 00:40:26 +01:00
|
|
|
%endif
|
2007-09-14 16:28:27 +02:00
|
|
|
Url: http://valgrind.org/
|
2011-11-30 14:18:34 +01:00
|
|
|
License: GPL-2+
|
2007-01-16 00:40:26 +01:00
|
|
|
Group: Development/Tools/Debuggers
|
2010-10-22 10:03:08 +02:00
|
|
|
Summary: Memory Management Debugger
|
2007-01-16 00:40:26 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-11-09 20:07:31 +01:00
|
|
|
Version: 3.7.0
|
2011-11-30 14:18:34 +01:00
|
|
|
Release: 0
|
2007-12-12 21:29:12 +01:00
|
|
|
Source0: %{name}-%{version}.tar.bz2
|
2010-09-23 13:16:38 +02:00
|
|
|
# svn di svn://svn.valgrind.org/valgrind/tags/VALGRIND_3_5_0 svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_5_BRANCH > 3_5_BRANCH.diff
|
|
|
|
# svn di svn://svn.valgrind.org/vex/tags/VEX_3_5_0 svn://svn.valgrind.org/vex/branches/VEX_3_5_BRANCH > VEX_3_5_BRANCH.diff
|
2010-01-07 13:04:11 +01:00
|
|
|
Patch1: jit-register-unregister.diff
|
2011-08-19 19:24:56 +02:00
|
|
|
# during building the major version of glibc is built into the suppression file
|
2011-08-24 00:53:39 +02:00
|
|
|
%define glibc_main_version %(getconf GNU_LIBC_VERSION | cut -d' ' -f2 | cut -d. -f1)
|
|
|
|
%define glibc_major_version %(getconf GNU_LIBC_VERSION | cut -d' ' -f2 | cut -d. -f2)
|
|
|
|
Requires: glibc >= %glibc_main_version.%glibc_major_version
|
|
|
|
Requires: glibc < %glibc_main_version.%{lua: print(rpm.expand("%glibc_major_version")+1)}
|
2010-10-18 17:14:58 +02:00
|
|
|
%if %suse_version <= 1100
|
|
|
|
Provides: valgrind-devel = %version
|
|
|
|
%endif
|
2007-12-03 23:48:02 +01:00
|
|
|
Provides: callgrind = %version
|
|
|
|
Obsoletes: callgrind < %version
|
2011-10-02 21:05:40 +02:00
|
|
|
ExclusiveArch: %ix86 x86_64 ppc ppc64 s390x %arm
|
2010-10-22 10:03:08 +02:00
|
|
|
%if %suse_version > 1100
|
|
|
|
%define building_docs 1
|
|
|
|
%else
|
|
|
|
%define building_docs 0
|
|
|
|
%endif
|
2007-01-16 00:40:26 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Valgrind checks all memory operations in an application, like read,
|
|
|
|
write, malloc, new, free, and delete. Valgrind can find uses of
|
|
|
|
uninitialized memory, access to already freed memory, overflows,
|
2010-10-22 10:03:08 +02:00
|
|
|
illegal stack operations, memory leaks, and any illegal
|
2007-01-16 00:40:26 +01:00
|
|
|
new/malloc/free/delete commands. Another program in the package is
|
2010-10-22 10:03:08 +02:00
|
|
|
"cachegrind," a profiler based on the valgrind engine.
|
2007-09-14 16:28:27 +02:00
|
|
|
|
2010-10-22 10:03:08 +02:00
|
|
|
To use valgrind you should compile your application with "-g -O0"
|
|
|
|
compiler options. Afterwards you can use it with:
|
2007-01-16 00:40:26 +01:00
|
|
|
|
2010-10-22 10:03:08 +02:00
|
|
|
valgrind --tool=memcheck --sloppy-malloc=yes --leak-check=yes
|
|
|
|
--db-attach=yes my_application, for example.
|
2007-01-16 00:40:26 +01:00
|
|
|
|
|
|
|
More valgrind options can be listed via "valgrind --help". There is
|
|
|
|
also complete documentation in the /usr/share/doc/packages/valgrind/
|
|
|
|
directory. A debugged application runs slower and needs much more
|
2010-10-22 10:03:08 +02:00
|
|
|
memory, but is usually still usable. Valgrind is still in development,
|
|
|
|
but it has been successfully used to optimize several KDE applications.
|
2007-01-16 00:40:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-06 00:31:09 +02:00
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Julian Seward <jseward@acm.org>
|
|
|
|
Cerion Armour-Brown
|
|
|
|
Jeremy Fitzhardinge
|
|
|
|
Tom Hughes
|
|
|
|
Nicholas Nethercote
|
|
|
|
Paul Mackerras
|
|
|
|
Dirk Mueller
|
|
|
|
Robert Walsh
|
|
|
|
|
2010-10-18 17:14:58 +02:00
|
|
|
%if %suse_version > 1100
|
2010-10-22 10:03:08 +02:00
|
|
|
|
2007-04-06 00:31:09 +02:00
|
|
|
%package devel
|
2011-03-16 11:30:14 +01:00
|
|
|
License: GPLv2+
|
2010-10-22 10:03:08 +02:00
|
|
|
Summary: Memory Management Debugger
|
2007-04-06 00:31:09 +02:00
|
|
|
Group: Development/Tools/Debuggers
|
|
|
|
Requires: %name = %version
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
Valgrind checks all memory operations in an application, like read,
|
|
|
|
write, malloc, new, free, and delete. Valgrind can find uses of
|
|
|
|
uninitialized memory, access to already freed memory, overflows,
|
2010-10-22 10:03:08 +02:00
|
|
|
illegal stack operations, memory leaks, and any illegal
|
2007-04-06 00:31:09 +02:00
|
|
|
new/malloc/free/delete commands. Another program in the package is
|
2010-10-22 10:03:08 +02:00
|
|
|
"cachegrind," a profiler based on the valgrind engine.
|
2007-04-06 00:31:09 +02:00
|
|
|
|
2010-10-22 10:03:08 +02:00
|
|
|
To use valgrind you should compile your application with "-g -O0"
|
|
|
|
compiler options. Afterwards you can use it with:
|
2007-04-06 00:31:09 +02:00
|
|
|
|
2010-10-22 10:03:08 +02:00
|
|
|
valgrind --tool=memcheck --sloppy-malloc=yes --leak-check=yes
|
|
|
|
--db-attach=yes my_application, for example.
|
2007-04-06 00:31:09 +02:00
|
|
|
|
|
|
|
More valgrind options can be listed via "valgrind --help". There is
|
|
|
|
also complete documentation in the /usr/share/doc/packages/valgrind/
|
|
|
|
directory. A debugged application runs slower and needs much more
|
2010-10-22 10:03:08 +02:00
|
|
|
memory, but is usually still usable. Valgrind is still in development,
|
|
|
|
but it has been successfully used to optimize several KDE applications.
|
2007-04-06 00:31:09 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-16 00:40:26 +01:00
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Julian Seward <jseward@acm.org>
|
|
|
|
Cerion Armour-Brown
|
|
|
|
Jeremy Fitzhardinge
|
|
|
|
Tom Hughes
|
|
|
|
Nicholas Nethercote
|
|
|
|
Paul Mackerras
|
|
|
|
Dirk Mueller
|
|
|
|
Robert Walsh
|
2010-10-22 10:03:08 +02:00
|
|
|
|
2010-10-18 17:14:58 +02:00
|
|
|
%endif
|
2007-01-16 00:40:26 +01:00
|
|
|
|
|
|
|
%prep
|
2007-12-12 21:29:12 +01:00
|
|
|
%setup -q -n %{name}-%{version}
|
2007-01-16 00:40:26 +01:00
|
|
|
cd VEX
|
|
|
|
cd ..
|
2010-01-07 13:04:11 +01:00
|
|
|
%patch1
|
2007-01-16 00:40:26 +01:00
|
|
|
|
|
|
|
%build
|
2011-10-11 21:13:19 +02:00
|
|
|
%ifarch %arm
|
|
|
|
# Valgrind doesn't support compiling for Thumb yet. Remove when it gets
|
|
|
|
# native thumb support.
|
|
|
|
RPM_OPT_FLAGS=${RPM_OPT_FLAGS/-mthumb/-mthumb-interwork -marm}
|
|
|
|
%endif
|
2011-11-09 22:32:50 +01:00
|
|
|
# not a good idea to build valgrind with fortify, as it does not link glibc
|
|
|
|
RPM_OPT_FLAGS="${RPM_OPT_FLAGS/-D_FORTIFY_SOURCE=2/}"
|
2007-01-16 00:40:26 +01:00
|
|
|
export CFLAGS="$RPM_OPT_FLAGS"
|
|
|
|
export CXXFLAGS="$RPM_OPT_FLAGS"
|
|
|
|
autoreconf -fi
|
|
|
|
export GDB=/usr/bin/gdb
|
|
|
|
%configure
|
|
|
|
make %{?jobs:-j%jobs}
|
2010-10-22 10:03:08 +02:00
|
|
|
%if %building_docs
|
- update to 3.6.0 snapshot:
- Valgrind runs much faster when the --smc-check=all option is given.
- Cachegrind has a new processing script, cg_diff, which finds the
difference between two profiles. It's very useful for evaluating the
performance effects of a change in a program.
Related to this change, the meaning of cg_annotate's (rarely-used)
--threshold option has changed; this is unlikely to affect many people, if
you do use it please see the user manual for details.
- Callgrind now can do branch prediction simulation, similar to Cachegrind.
In addition, it optionally can count the number of executed global bus events.
Both can be used for a better approximation of a "Cycle Estimation" as
derived event (you need to update the event formula in KCachegrind yourself).
- Cachegrind and Callgrind now refer to the LL (last-level) cache rather
than the L2 cache. This is to accommodate machines with three levels of
caches -- if Cachegrind/Callgrind auto-detects the cache configuration of
such a machine it will run the simulation as if the L2 cache isn't
present. This means the results are less likely to match the true result
for the machine, but Cachegrind/Callgrind's results are already only
approximate, and should not be considered authoritative. The results are
still useful for giving a general idea about a program's locality.
- Massif has a new option, --pages-as-heap, which is disabled by default.
When enabled, instead of tracking allocations at the level of heap blocks
(as allocated with malloc/new/new[]), it instead tracks memory allocations
at the level of memory pages (as mapped by mmap, brk, etc). Each mapped
page is treated as its own block. Interpreting the page-level output is
harder than the heap-level output, but this option is useful if you want
to account for every byte of memory used by a program.
- Added new memcheck command-line option --show-possibly-lost.
OBS-URL: https://build.opensuse.org/package/show/devel:tools/valgrind?expand=0&rev=17
2010-10-13 13:43:20 +02:00
|
|
|
pushd docs
|
|
|
|
#make all-docs
|
2010-10-22 10:03:08 +02:00
|
|
|
# building the docs needs network access at the moment :-(
|
- update to 3.6.0 snapshot:
- Valgrind runs much faster when the --smc-check=all option is given.
- Cachegrind has a new processing script, cg_diff, which finds the
difference between two profiles. It's very useful for evaluating the
performance effects of a change in a program.
Related to this change, the meaning of cg_annotate's (rarely-used)
--threshold option has changed; this is unlikely to affect many people, if
you do use it please see the user manual for details.
- Callgrind now can do branch prediction simulation, similar to Cachegrind.
In addition, it optionally can count the number of executed global bus events.
Both can be used for a better approximation of a "Cycle Estimation" as
derived event (you need to update the event formula in KCachegrind yourself).
- Cachegrind and Callgrind now refer to the LL (last-level) cache rather
than the L2 cache. This is to accommodate machines with three levels of
caches -- if Cachegrind/Callgrind auto-detects the cache configuration of
such a machine it will run the simulation as if the L2 cache isn't
present. This means the results are less likely to match the true result
for the machine, but Cachegrind/Callgrind's results are already only
approximate, and should not be considered authoritative. The results are
still useful for giving a general idea about a program's locality.
- Massif has a new option, --pages-as-heap, which is disabled by default.
When enabled, instead of tracking allocations at the level of heap blocks
(as allocated with malloc/new/new[]), it instead tracks memory allocations
at the level of memory pages (as mapped by mmap, brk, etc). Each mapped
page is treated as its own block. Interpreting the page-level output is
harder than the heap-level output, but this option is useful if you want
to account for every byte of memory used by a program.
- Added new memcheck command-line option --show-possibly-lost.
OBS-URL: https://build.opensuse.org/package/show/devel:tools/valgrind?expand=0&rev=17
2010-10-13 13:43:20 +02:00
|
|
|
make FAQ.txt man-pages html-docs
|
|
|
|
popd
|
2010-10-22 10:03:08 +02:00
|
|
|
%endif
|
|
|
|
|
2007-01-16 00:40:26 +01:00
|
|
|
%install
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
2010-10-22 16:21:29 +02:00
|
|
|
mkdir -p $RPM_BUILD_ROOT/%_defaultdocdir
|
|
|
|
if test -d $RPM_BUILD_ROOT/usr/share/doc/valgrind; then
|
|
|
|
mv $RPM_BUILD_ROOT/usr/share/doc/valgrind $RPM_BUILD_ROOT/%_defaultdocdir
|
|
|
|
fi
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/packages/%name
|
|
|
|
cp -a README* NEWS AUTHORS COPYING COPYING.DOCS $RPM_BUILD_ROOT/%_defaultdocdir/%name
|
2007-01-16 00:40:26 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/usr/bin/*
|
2010-10-22 16:21:29 +02:00
|
|
|
%doc %_defaultdocdir/%name
|
2010-10-22 10:03:08 +02:00
|
|
|
%doc %_mandir/*/*
|
2011-08-24 00:53:39 +02:00
|
|
|
%dir %_libdir/valgrind
|
|
|
|
%ifarch x86_64
|
|
|
|
%_libdir/valgrind/*-amd64-linux
|
|
|
|
%endif
|
|
|
|
%ifarch %ix86 x86_64
|
|
|
|
%_libdir/valgrind/*-x86-linux
|
|
|
|
%endif
|
|
|
|
%ifarch ppc ppc64
|
|
|
|
%_libdir/valgrind/*-ppc32-linux
|
2011-10-25 15:16:31 +02:00
|
|
|
%endif
|
|
|
|
%ifarch ppc64
|
2011-08-24 00:53:39 +02:00
|
|
|
%_libdir/valgrind/*-ppc64-linux
|
|
|
|
%endif
|
|
|
|
%ifarch s390 s390x
|
2011-08-25 09:35:01 +02:00
|
|
|
%_libdir/valgrind/*-s390x-linux
|
2011-08-24 00:53:39 +02:00
|
|
|
%endif
|
2011-10-11 21:13:19 +02:00
|
|
|
%ifarch %arm
|
|
|
|
%_libdir/valgrind/*-arm-linux
|
|
|
|
%endif
|
2011-08-24 00:53:39 +02:00
|
|
|
%_libdir/valgrind/*-linux.so
|
|
|
|
%_libdir/valgrind/*.supp
|
2011-11-09 20:07:31 +01:00
|
|
|
%_libdir/valgrind/32bit-core.xml
|
|
|
|
%_libdir/valgrind/32bit-linux.xml
|
|
|
|
%_libdir/valgrind/32bit-sse.xml
|
|
|
|
%_libdir/valgrind/64bit-core.xml
|
|
|
|
%_libdir/valgrind/64bit-linux.xml
|
|
|
|
%_libdir/valgrind/64bit-sse.xml
|
|
|
|
%_libdir/valgrind/32bit-core-valgrind-s*.xml
|
|
|
|
%_libdir/valgrind/32bit-linux-valgrind-s*.xml
|
|
|
|
%_libdir/valgrind/32bit-sse-valgrind-s*.xml
|
|
|
|
%_libdir/valgrind/64bit-core-valgrind-s*.xml
|
|
|
|
%_libdir/valgrind/64bit-linux-valgrind-s*.xml
|
|
|
|
%_libdir/valgrind/64bit-sse-valgrind-s*.xml
|
|
|
|
%_libdir/valgrind/amd64-coresse-valgrind.xml
|
|
|
|
%_libdir/valgrind/amd64-linux-valgrind.xml
|
|
|
|
%_libdir/valgrind/arm-core-valgrind-s*.xml
|
|
|
|
%_libdir/valgrind/arm-core.xml
|
|
|
|
%_libdir/valgrind/arm-vfpv3-valgrind-s*.xml
|
|
|
|
%_libdir/valgrind/arm-vfpv3.xml
|
|
|
|
%_libdir/valgrind/arm-with-vfpv3-valgrind.xml
|
|
|
|
%_libdir/valgrind/arm-with-vfpv3.xml
|
|
|
|
%_libdir/valgrind/i386-coresse-valgrind.xml
|
|
|
|
%_libdir/valgrind/i386-linux-valgrind.xml
|
|
|
|
%_libdir/valgrind/power-altivec-valgrind-s*.xml
|
|
|
|
%_libdir/valgrind/power-altivec.xml
|
|
|
|
%_libdir/valgrind/power-core.xml
|
|
|
|
%_libdir/valgrind/power-fpu-valgrind-s*.xml
|
|
|
|
%_libdir/valgrind/power-fpu.xml
|
|
|
|
%_libdir/valgrind/power-linux-valgrind-s*.xml
|
|
|
|
%_libdir/valgrind/power-linux.xml
|
|
|
|
%_libdir/valgrind/power64-core-valgrind-s*.xml
|
|
|
|
%_libdir/valgrind/power64-core.xml
|
|
|
|
%_libdir/valgrind/power64-linux-valgrind-s*.xml
|
|
|
|
%_libdir/valgrind/power64-linux.xml
|
|
|
|
%_libdir/valgrind/powerpc-altivec32l-valgrind.xml
|
|
|
|
%_libdir/valgrind/powerpc-altivec32l.xml
|
|
|
|
%_libdir/valgrind/powerpc-altivec64l-valgrind.xml
|
|
|
|
%_libdir/valgrind/powerpc-altivec64l.xml
|
2010-10-18 17:14:58 +02:00
|
|
|
|
|
|
|
%if %suse_version > 1100
|
2010-10-22 10:03:08 +02:00
|
|
|
|
2007-04-06 00:31:09 +02:00
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
2010-10-18 17:14:58 +02:00
|
|
|
%endif
|
2011-08-24 00:53:39 +02:00
|
|
|
%_libdir/valgrind/lib*.a
|
2007-04-06 00:31:09 +02:00
|
|
|
/usr/include/valgrind
|
|
|
|
/usr/%_lib/pkgconfig/valgrind.pc
|
|
|
|
|
2007-03-30 11:43:37 +02:00
|
|
|
%changelog
|