summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurice van der Pot <griffon26@gentoo.org>2008-12-13 10:57:06 +0000
committerMaurice van der Pot <griffon26@gentoo.org>2008-12-13 10:57:06 +0000
commitf023d27694816491ee2946589bb7260a242812cb (patch)
tree9300d41c587e6df038ed5cf532a4d38a0be8a5e6 /dev-util/valgrind
parentDeclare i var as local (diff)
downloadgentoo-2-f023d27694816491ee2946589bb7260a242812cb.tar.gz
gentoo-2-f023d27694816491ee2946589bb7260a242812cb.tar.bz2
gentoo-2-f023d27694816491ee2946589bb7260a242812cb.zip
Added patch valgrind to support glibc 2.9 (bug #250570).
(Portage version: 2.1.6/cvs/Linux 2.6.26.2 x86_64)
Diffstat (limited to 'dev-util/valgrind')
-rw-r--r--dev-util/valgrind/ChangeLog9
-rw-r--r--dev-util/valgrind/files/valgrind-3.3.1-glibc-2.9.patch141
-rw-r--r--dev-util/valgrind/valgrind-3.3.1-r1.ebuild98
3 files changed, 247 insertions, 1 deletions
diff --git a/dev-util/valgrind/ChangeLog b/dev-util/valgrind/ChangeLog
index 6a42668382ee..604b5fd776a0 100644
--- a/dev-util/valgrind/ChangeLog
+++ b/dev-util/valgrind/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-util/valgrind
# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/ChangeLog,v 1.93 2008/08/24 11:41:59 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/ChangeLog,v 1.94 2008/12/13 10:57:06 griffon26 Exp $
+
+*valgrind-3.3.1-r1 (13 Dec 2008)
+
+ 13 Dec 2008; Maurice van der Pot <griffon26@gentoo.org>
+ +files/valgrind-3.3.1-glibc-2.9.patch, +valgrind-3.3.1-r1.ebuild:
+ Added patch to support glibc-2.9, submitted by Bartosz Szreder
+ <cfiend@talent.edu.pl> in bug #250570.
24 Aug 2008; Markus Rothe <corsair@gentoo.org> valgrind-3.3.1.ebuild:
Stable on ppc64; bug #234526
diff --git a/dev-util/valgrind/files/valgrind-3.3.1-glibc-2.9.patch b/dev-util/valgrind/files/valgrind-3.3.1-glibc-2.9.patch
new file mode 100644
index 000000000000..bbae3ab2e52f
--- /dev/null
+++ b/dev-util/valgrind/files/valgrind-3.3.1-glibc-2.9.patch
@@ -0,0 +1,141 @@
+diff -ruN valgrind-3.3.1/configure.in valgrind-3.3.1-fixed/configure.in
+--- valgrind-3.3.1/configure.in 2008-12-13 11:41:07.000000000 +0100
++++ valgrind-3.3.1-fixed/configure.in 2008-12-13 11:43:06.000000000 +0100
+@@ -479,6 +479,16 @@
+ ],
+ libc="2.8")
+
++AC_EGREP_CPP([GLIBC_29], [
++#include <features.h>
++#ifdef __GNU_LIBRARY__
++ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ == 9)
++ GLIBC_29
++ #endif
++#endif
++],
++libc="2.9")
++
+ AC_EGREP_CPP([AIX5_LIBC], [
+ #include <standards.h>
+ #if defined(_AIXVERSION_510) || defined(_AIXVERSION_520) || defined(_AIXVERSION_530)
+@@ -535,6 +545,12 @@
+ DEFAULT_SUPP="glibc-2.8.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ ;;
++ 2.9)
++ AC_MSG_RESULT(2.9 family)
++ AC_DEFINE([GLIBC_2_9], 1, [Define to 1 if you're using glibc 2.9.x])
++ DEFAULT_SUPP="glibc-2.9.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
++ ;;
+ aix5)
+ AC_MSG_RESULT(AIX 5.1 or 5.2 or 5.3)
+ AC_DEFINE([AIX5_LIBC], 1, [Define to 1 if you're using AIX 5.1 or 5.2 or 5.3])
+@@ -543,7 +559,7 @@
+
+ *)
+ AC_MSG_RESULT(unsupported version)
+- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.7])
++ AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.9])
+ AC_MSG_ERROR([or AIX 5.1 or 5.2 or 5.3 libc])
+ ;;
+ esac
+diff -ruN valgrind-3.3.1/glibc-2.9.supp valgrind-3.3.1-fixed/glibc-2.9.supp
+--- valgrind-3.3.1/glibc-2.9.supp 1970-01-01 01:00:00.000000000 +0100
++++ valgrind-3.3.1-fixed/glibc-2.9.supp 2008-12-13 11:38:58.000000000 +0100
+@@ -0,0 +1,95 @@
++
++# Errors to suppress by default with glibc 2.9.x
++
++# Format of this file is:
++# {
++# name_of_suppression
++# tool_name:supp_kind
++# (optional extra info for some suppression types)
++# caller0 name, or /name/of/so/file.so
++# caller1 name, or ditto
++# (optionally: caller2 name)
++# (optionally: caller3 name)
++# }
++#
++# For Memcheck, the supp_kinds are:
++#
++# Param Value1 Value2 Value4 Value8 Value16 Jump
++# Free Addr1 Addr2 Addr4 Addr8 Addr16
++# Cond (previously known as Value0)
++#
++# and the optional extra info is:
++# if Param: name of system call param
++
++{
++ dl-hack3-cond-1
++ Memcheck:Cond
++ obj:/lib*/ld-2.9*.so*
++ obj:/lib*/ld-2.9*.so*
++ obj:/lib*/ld-2.9*.so*
++}
++{
++ dl-hack3-cond-2
++ Memcheck:Cond
++ obj:/lib*/ld-2.9*.so*
++ obj:/lib*/ld-2.9*.so*
++ obj:/lib*/libc-2.9*.so*
++}
++{
++ dl-hack3-cond-3
++ Memcheck:Cond
++ obj:/lib*/ld-2.9*.so*
++ obj:/lib*/libc-2.9*.so*
++ obj:/lib*/libc-2.9*.so*
++}
++{
++ dl-hack3-cond-4
++ Memcheck:Cond
++ obj:/lib*/ld-2.9*.so*
++ obj:/lib*/ld-2.9*.so*
++ obj:/lib*/libdl-2.9*.so*
++}
++
++{
++ dl-hack4-64bit-addr-1
++ Memcheck:Addr8
++ obj:/lib*/ld-2.9*.so*
++ obj:/lib*/ld-2.9*.so*
++ obj:/lib*/ld-2.9*.so*
++}
++{
++ dl-hack4-64bit-addr-2
++ Memcheck:Addr8
++ obj:/lib*/ld-2.9*.so*
++ obj:/lib*/ld-2.9*.so*
++ obj:/lib*/libc-2.9*.so*
++}
++{
++ dl-hack4-64bit-addr-3
++ Memcheck:Addr8
++ obj:/lib*/ld-2.9*.so*
++ obj:/lib*/ld-2.9*.so*
++ obj:/lib*/libdl-2.9*.so*
++}
++
++{
++ dl-hack5-32bit-addr-1
++ Memcheck:Addr4
++ obj:/lib/ld-2.9*.so
++ obj:/lib/ld-2.9*.so
++ obj:/lib/ld-2.9*.so
++}
++{
++ dl-hack5-32bit-addr-3
++ Memcheck:Addr4
++ obj:/lib/ld-2.9*.so
++ obj:/lib/ld-2.9*.so
++ obj:/lib/libdl-2.9*.so*
++}
++{
++ dl-hack5-32bit-addr-4
++ Memcheck:Addr4
++ obj:/lib/ld-2.9*.so
++ obj:/lib/libdl-2.9*.so*
++ obj:/lib/ld-2.9*.so
++}
diff --git a/dev-util/valgrind/valgrind-3.3.1-r1.ebuild b/dev-util/valgrind/valgrind-3.3.1-r1.ebuild
new file mode 100644
index 000000000000..802e2b5511c3
--- /dev/null
+++ b/dev-util/valgrind/valgrind-3.3.1-r1.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/valgrind-3.3.1-r1.ebuild,v 1.1 2008/12/13 10:57:06 griffon26 Exp $
+
+inherit autotools eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="An open-source memory debugger for GNU/Linux"
+HOMEPAGE="http://www.valgrind.org"
+SRC_URI="http://www.valgrind.org/downloads/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~ppc ~ppc64 ~x86"
+IUSE="X"
+
+RDEPEND="!dev-util/callgrind"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # make sure our CFLAGS are respected
+ einfo "Changing configure.in to respect CFLAGS"
+ sed -i -e 's:^CFLAGS="-Wno-long-long":CFLAGS="$CFLAGS -Wno-long-long":' configure.in
+
+ # undefined references to __guard and __stack_smash_handler in VEX (bug #114347)
+ einfo "Changing Makefile.flags.am to disable SSP"
+ sed -i -e 's:^AM_CFLAGS_BASE = :AM_CFLAGS_BASE = -fno-stack-protector :' Makefile.flags.am
+
+ # Correct hard coded doc location
+ sed -i -e "s:doc/valgrind:doc/${P}:" docs/Makefile.am
+
+ # Fix incorrect --libs output in valgrind.pc (bug #147904)
+ epatch "${FILESDIR}/${PN}-3.2.3-pkg-config.patch"
+
+ # Remove defaulting to ppc32-linux on ppc64 without multilib
+ # "valgrind: failed to start tool 'memcheck' for platform 'ppc32-linux':
+ # No such file or directory"
+ if use ppc64 && ! has_multilib_profile; then
+ epatch "${FILESDIR}/valgrind-3.3.0-only64bit.patch"
+ fi
+
+ # Use local labels in inline asm to prevent 'symbol already defined' errors
+ # when optimisation is on (bug #234644).
+ epatch "${FILESDIR}/valgrind-3.3.1-local-labels.patch"
+
+ # Add suppression file for glibc 2.9 and don't bail out on configure
+ epatch "${FILESDIR}/valgrind-3.3.1-glibc-2.9.patch"
+
+ # Regenerate autotools files
+ eautoreconf
+}
+
+src_compile() {
+ local myconf
+
+ # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
+ # while compiling insn_sse.c in none/tests/x86
+ # -fpie valgrind seemingly hangs when built with pie on
+ # amd64 (bug #102157)
+ # -fstack-protector more undefined references to __guard and __stack_smash_handler
+ # because valgrind doesn't link to glibc (bug #114347)
+ # -ggdb3 segmentation fault on startup
+ filter-flags -fomit-frame-pointer
+ filter-flags -fpie
+ filter-flags -fstack-protector
+ replace-flags -ggdb3 -ggdb2
+
+ # gcc 3.3.x fails to compile valgrind with -O3 (bug #129776)
+ if [ "$(gcc-version)" == "3.3" ] && is-flagq -O3; then
+ ewarn "GCC 3.3 cannot compile valgrind with -O3 in CFLAGS, using -O2 instead."
+ replace-flags -O3 -O2
+ fi
+
+ # Optionally build in X suppression files
+ use X && myconf="--with-x" || myconf="--with-x=no"
+
+ if use amd64 || use ppc64; then
+ ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
+ fi
+
+ econf ${myconf} --without-mpicc || die "Configure failed!"
+ emake || die "Make failed!"
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "Install failed!"
+ dodoc ACKNOWLEDGEMENTS AUTHORS FAQ.txt NEWS README*
+}
+
+pkg_postinst() {
+ if use ppc || use ppc64 ; then
+ ewarn "Valgrind will not work on ppc or ppc64 if glibc does not have"
+ ewarn "debug symbols (see https://bugs.gentoo.org/show_bug.cgi?id=214065)"
+ ewarn "To fix this you can add splitdebug to FEATURES in make.conf and"
+ ewarn "remerge glibc."
+ fi
+}