Dirk Mueller
154ef4c159
Handle glibc 2.16 OBS-URL: https://build.opensuse.org/request/show/128609 OBS-URL: https://build.opensuse.org/package/show/devel:tools/valgrind?expand=0&rev=74
250 lines
8.0 KiB
RPMSpec
250 lines
8.0 KiB
RPMSpec
#
|
|
# spec file for package valgrind
|
|
#
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: valgrind
|
|
BuildRequires: automake
|
|
BuildRequires: docbook-xsl-stylesheets
|
|
BuildRequires: docbook_4
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: glibc-devel-32bit
|
|
BuildRequires: libxslt
|
|
BuildRequires: pkgconfig
|
|
%ifarch x86_64 ppc64
|
|
BuildRequires: gcc-32bit
|
|
BuildRequires: glibc-devel-32bit
|
|
%endif
|
|
Url: http://valgrind.org/
|
|
Summary: Memory Management Debugger
|
|
License: GPL-2.0+
|
|
Group: Development/Tools/Debuggers
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
Version: 3.7.0
|
|
Release: 0
|
|
Source0: %{name}-%{version}.tar.bz2
|
|
# 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
|
|
Patch1: jit-register-unregister.diff
|
|
Patch2: glibc.diff
|
|
# added automake 1.11.2 patch https://bugs.kde.org/show_bug.cgi?id=290719 algrind-3.7.0-automake-1.11.2.patch
|
|
Patch3: valgrind-3.7.0-automake-1.11.2.patch
|
|
# during building the major version of glibc is built into the suppression file
|
|
%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)}
|
|
%if %suse_version <= 1100
|
|
Provides: valgrind-devel = %version
|
|
%endif
|
|
Provides: callgrind = %version
|
|
Obsoletes: callgrind < %version
|
|
ExclusiveArch: %ix86 x86_64 ppc ppc64 s390x armv7hl
|
|
%if %suse_version > 1100
|
|
%define building_docs 1
|
|
%else
|
|
%define building_docs 0
|
|
%endif
|
|
|
|
%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,
|
|
illegal stack operations, memory leaks, and any illegal
|
|
new/malloc/free/delete commands. Another program in the package is
|
|
"cachegrind," a profiler based on the valgrind engine.
|
|
|
|
To use valgrind you should compile your application with "-g -O0"
|
|
compiler options. Afterwards you can use it with:
|
|
|
|
valgrind --tool=memcheck --sloppy-malloc=yes --leak-check=yes
|
|
--db-attach=yes my_application, for example.
|
|
|
|
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
|
|
memory, but is usually still usable. Valgrind is still in development,
|
|
but it has been successfully used to optimize several KDE applications.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Julian Seward <jseward@acm.org>
|
|
Cerion Armour-Brown
|
|
Jeremy Fitzhardinge
|
|
Tom Hughes
|
|
Nicholas Nethercote
|
|
Paul Mackerras
|
|
Dirk Mueller
|
|
Robert Walsh
|
|
|
|
%if %suse_version > 1100
|
|
|
|
%package devel
|
|
Summary: Memory Management Debugger
|
|
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,
|
|
illegal stack operations, memory leaks, and any illegal
|
|
new/malloc/free/delete commands. Another program in the package is
|
|
"cachegrind," a profiler based on the valgrind engine.
|
|
|
|
To use valgrind you should compile your application with "-g -O0"
|
|
compiler options. Afterwards you can use it with:
|
|
|
|
valgrind --tool=memcheck --sloppy-malloc=yes --leak-check=yes
|
|
--db-attach=yes my_application, for example.
|
|
|
|
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
|
|
memory, but is usually still usable. Valgrind is still in development,
|
|
but it has been successfully used to optimize several KDE applications.
|
|
|
|
|
|
|
|
Authors:
|
|
--------
|
|
Julian Seward <jseward@acm.org>
|
|
Cerion Armour-Brown
|
|
Jeremy Fitzhardinge
|
|
Tom Hughes
|
|
Nicholas Nethercote
|
|
Paul Mackerras
|
|
Dirk Mueller
|
|
Robert Walsh
|
|
|
|
%endif
|
|
|
|
%prep
|
|
%setup -q -n %{name}-%{version}
|
|
cd VEX
|
|
cd ..
|
|
%patch1
|
|
%patch2
|
|
%patch3 -p1
|
|
|
|
%build
|
|
%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
|
|
# 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/}"
|
|
export CFLAGS="$RPM_OPT_FLAGS"
|
|
export CXXFLAGS="$RPM_OPT_FLAGS"
|
|
autoreconf -fi
|
|
export GDB=/usr/bin/gdb
|
|
%configure
|
|
make %{?jobs:-j%jobs}
|
|
%if %building_docs
|
|
pushd docs
|
|
#make all-docs
|
|
# building the docs needs network access at the moment :-(
|
|
make FAQ.txt man-pages html-docs
|
|
popd
|
|
%endif
|
|
|
|
%install
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
|
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
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
/usr/bin/*
|
|
%doc %_defaultdocdir/%name
|
|
%doc %_mandir/*/*
|
|
%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
|
|
%endif
|
|
%ifarch ppc64
|
|
%_libdir/valgrind/*-ppc64-linux
|
|
%endif
|
|
%ifarch s390 s390x
|
|
%_libdir/valgrind/*-s390x-linux
|
|
%endif
|
|
%ifarch %arm
|
|
%_libdir/valgrind/*-arm-linux
|
|
%endif
|
|
%_libdir/valgrind/*-linux.so
|
|
%_libdir/valgrind/*.supp
|
|
%_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
|
|
|
|
%if %suse_version > 1100
|
|
|
|
%files devel
|
|
%defattr(-,root,root)
|
|
%endif
|
|
%_libdir/valgrind/lib*.a
|
|
/usr/include/valgrind
|
|
/usr/%_lib/pkgconfig/valgrind.pc
|
|
|
|
%changelog
|