diff options
author | Maurice van der Pot <griffon26@gentoo.org> | 2009-07-26 12:05:52 +0000 |
---|---|---|
committer | Maurice van der Pot <griffon26@gentoo.org> | 2009-07-26 12:05:52 +0000 |
commit | a2e3f01c03ea65e0585ea860d403ba28be109b06 (patch) | |
tree | d5d6b09562a9f78d7ed90630b446d532731fd9ab /dev-util/valgrind | |
parent | add <herd> tag (diff) | |
download | historical-a2e3f01c03ea65e0585ea860d403ba28be109b06.tar.gz historical-a2e3f01c03ea65e0585ea860d403ba28be109b06.tar.bz2 historical-a2e3f01c03ea65e0585ea860d403ba28be109b06.zip |
Added valgrind-3.4.1-r1 to handle incompatibility with glibc 2.10's strlen (bug #274771) and add optional mpi support (bug #258832).
Package-Manager: portage-2.1.6.13/cvs/Linux x86_64
Diffstat (limited to 'dev-util/valgrind')
-rw-r--r-- | dev-util/valgrind/ChangeLog | 11 | ||||
-rw-r--r-- | dev-util/valgrind/Manifest | 11 | ||||
-rw-r--r-- | dev-util/valgrind/files/valgrind-3.4.1-glibc-2.10.1.patch | 49 | ||||
-rw-r--r-- | dev-util/valgrind/files/valgrind-3.4.1-x86_64-ldso-strlen.patch | 82 | ||||
-rw-r--r-- | dev-util/valgrind/valgrind-3.4.1-r1.ebuild | 106 |
5 files changed, 254 insertions, 5 deletions
diff --git a/dev-util/valgrind/ChangeLog b/dev-util/valgrind/ChangeLog index f9e2cfd8725e..7fb45cdf271a 100644 --- a/dev-util/valgrind/ChangeLog +++ b/dev-util/valgrind/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for dev-util/valgrind # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/ChangeLog,v 1.102 2009/07/22 20:23:50 josejx Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/ChangeLog,v 1.103 2009/07/26 12:05:52 griffon26 Exp $ + +*valgrind-3.4.1-r1 (26 Jul 2009) + + 26 Jul 2009; Maurice van der Pot <griffon26@gentoo.org> + +valgrind-3.4.1-r1.ebuild, +files/valgrind-3.4.1-glibc-2.10.1.patch, + +files/valgrind-3.4.1-x86_64-ldso-strlen.patch: + Added -r1 with fix for bug #274771. Thanks to Nikos Chantziaras + <realnc@gmail.com> for the bug report and the reference to a patch. + Also added mpi use flag to support debugging MPI programs (bug #258832). 22 Jul 2009; Joseph Jezak <josejx@gentoo.org> valgrind-3.4.1.ebuild: Marked ppc stable for bug #278534. diff --git a/dev-util/valgrind/Manifest b/dev-util/valgrind/Manifest index f7f756888b24..c533e3f64390 100644 --- a/dev-util/valgrind/Manifest +++ b/dev-util/valgrind/Manifest @@ -5,19 +5,22 @@ AUX valgrind-3.2.3-pkg-config.patch 670 RMD160 26d8f37182da50110e4c40c5be0ec9d06 AUX valgrind-3.3.0-only64bit.patch 580 RMD160 f4304ad005586541400e6c1466dabf8cdaac2b72 SHA1 7c890914ec0fd53b8de662783b230ec78e57e345 SHA256 23485d4b03c66db3c58f3a7e9d0aca439a50b87ea60f2edaaf94229b54a80ee9 AUX valgrind-3.3.1-glibc-2.9.patch 3428 RMD160 43564fd811561a8857a7a63cf960c234547e80e3 SHA1 fe2c4e880c4778b74715926fb1b978d8f26de917 SHA256 19c1dff2e83c876cdd49facb1308c6442b516a8c9d5f68750d6fc025ba38af14 AUX valgrind-3.3.1-local-labels.patch 1186 RMD160 3eeb3a847f85b2b68e32ce5966539067103b12c1 SHA1 07c6afbc4eb2565404ffe12aa8cd0357fd736ab4 SHA256 79a0e65903ce1b7ec0c0759c4face9a23bd9724831bf0b8c201dced2dc7dbb71 +AUX valgrind-3.4.1-glibc-2.10.1.patch 1305 RMD160 27586a6140bc0c96589f7077a3c9ee266010ac9c SHA1 dc5df31911c93c98d7876fc6ad9157ab62b38de2 SHA256 b250a3f7e8654cbc835570b0647d035f25a866a51312a8c0d82119db474eddd6 +AUX valgrind-3.4.1-x86_64-ldso-strlen.patch 2767 RMD160 0b6047712706f0cda86e80a4174415591bd035fe SHA1 a08cd4d62d0950188c734f6884cc460032b07a2a SHA256 43d667bc2db7c7d7ee96a0108166a1cfa06ecabde86313a5fb96c47ad26062cc DIST valgrind-3.3.1.tar.bz2 4544805 RMD160 32fb26de2ffd0d62e66a1f29cfa6785b7ffa8c36 SHA1 3a64ee5f6439815fa6c5200dcfd0399f9dc83348 SHA256 95b7b4d815bd479332637c93e69ec24167cd28d4f9d9f9b718e1b091bb88aafa DIST valgrind-3.4.0.tar.bz2 5175209 RMD160 3db249843f0845ca0892e557bede7d21d3112e3f SHA1 ae68418a4c283d14ae6454aca4a720ac936422df SHA256 d5ea4ae5b1ef9fca677a38959060a9acb70b38540721c8bf5c73d09a265f9f74 DIST valgrind-3.4.1.tar.bz2 5183739 RMD160 425127a02b3707d8d8f2e1ff37e9609a2d0dccbd SHA1 935ea4642b6d9b33a6686c5b0ce70f2f0929fe0d SHA256 669ee7aab8a3a905520159b6d7be35d3911e1a4d7a67d90dc1c12c00693184a9 EBUILD valgrind-3.3.1-r1.ebuild 3385 RMD160 d1c102300788ba35b15a565817c44a053ecc65a9 SHA1 7f48f883bbbdc7f083fa3429c3522906829ecd38 SHA256 8eb9036a730fa488a92e207551b2443d6dd5846e96b8d76febb3c6abcbf6c793 EBUILD valgrind-3.3.1.ebuild 3252 RMD160 43b41c41747035258ae2d745823e48658426ed90 SHA1 5c085791efd179327ab0f317ec8f09a08e36cef1 SHA256 399f4bd21c1cce2c3c4bab5b96cd0886f74481bce8c6f6750e6bee78242d850b EBUILD valgrind-3.4.0.ebuild 3255 RMD160 feb78ead8a3f3ed9bf69dda9f533875779b6d18f SHA1 88a2ffdfc83c260050fe3ed03462f03d19c920b7 SHA256 16243a1b3895c284835ef9b16cdbe19673f3896e1209960647b23c3853325369 +EBUILD valgrind-3.4.1-r1.ebuild 3744 RMD160 87119b0ab1ebf195d448af8fd3abd468210d4ef1 SHA1 c35c72c678f0bf39d38c046fbb259e5797ea43ab SHA256 8c22699d22cd5b2177fda20930b72e1d0f4bafc5347f6c5efd5efc508c6431b1 EBUILD valgrind-3.4.1.ebuild 3043 RMD160 b5e3cd0f89827e539bf63105f36efe0db5f228eb SHA1 e11c00e3d2e8c2922c91e4ca797b22f7e0491f84 SHA256 dd6387376666f498dcd67eef938036943ff4ad4cb506e19bd58e03a5b3317700 -MISC ChangeLog 15987 RMD160 0773740cd685bfc42fdbbf0478d6293ac347844c SHA1 4868b7517d14a02c5027d984dfc67cbac081db78 SHA256 9ae735463a9b5e36c0e5f0672357dea725a1ecea1ecf97df7a4d2197612c4143 +MISC ChangeLog 16417 RMD160 d0c0fd8973b679676dc737e6bd78a0c57bb53724 SHA1 3c4d3c4adaa89ae4081660840dc7a00d76a561d4 SHA256 0228e7c56f1de418936b32d9a897a3ed05c1ae79637cc8225190a6985d9fb4d6 MISC metadata.xml 1003 RMD160 e8ef4473e3545a4b98d46101edb49923112ac9e0 SHA1 f76bd7adb86b156832175f968d60c6372fcf8968 SHA256 2bf62ba94d772ac968485392127cf4f4303cccf5a1e6d0733d80507005ca7847 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (GNU/Linux) -iEYEARECAAYFAkpndIIACgkQcsIHjyDViGQ6ygCgxmz1TwraHiYTWXqf2ljR1V2q -8ogAnRPinFX0HWkI8JHvLSANyfJ8L2tx -=vy/K +iEYEARECAAYFAkpsRrEACgkQMGnpIbeahxw1yQCgyLkDgFWSi2kyyubbn5wcgN99 +wLgAnAuu1W67d7kYFJKYllXdPlnEKNAS +=g+p6 -----END PGP SIGNATURE----- diff --git a/dev-util/valgrind/files/valgrind-3.4.1-glibc-2.10.1.patch b/dev-util/valgrind/files/valgrind-3.4.1-glibc-2.10.1.patch new file mode 100644 index 000000000000..393dc7c2fc6d --- /dev/null +++ b/dev-util/valgrind/files/valgrind-3.4.1-glibc-2.10.1.patch @@ -0,0 +1,49 @@ +--- valgrind-3.4.1/glibc-2.X.supp.in.jj 2009-03-01 17:04:51.000000000 -0500 ++++ valgrind-3.4.1/glibc-2.X.supp.in 2009-05-11 11:17:35.605396000 -0400 +@@ -168,9 +168,9 @@ + Memcheck:Param + socketcall.sendto(msg) + fun:__sendto_nocancel +- obj:/*libc-@GLIBC_VERSION@.so +- obj:/*libc-@GLIBC_VERSION@.so +- obj:/*libc-@GLIBC_VERSION@.so ++ obj:/*libc-@GLIBC_VERSION@*.so ++ obj:/*libc-@GLIBC_VERSION@*.so ++ obj:/*libc-@GLIBC_VERSION@*.so + } + { + glibc24-64bit-padding-1c +@@ -180,7 +180,7 @@ + fun:__nscd_get_map_ref + fun:nscd_get*_r + fun:*nscd* +- obj:/*libc-@GLIBC_VERSION@.so ++ obj:/*libc-@GLIBC_VERSION@*.so + } + + +@@ -199,18 +199,18 @@ + Memcheck:Param + socketcall.sendto(msg) + fun:send +- obj:/*libc-@GLIBC_VERSION@.so +- obj:/*libc-@GLIBC_VERSION@.so +- obj:/*libc-@GLIBC_VERSION@.so ++ obj:/*libc-@GLIBC_VERSION@*.so ++ obj:/*libc-@GLIBC_VERSION@*.so ++ obj:/*libc-@GLIBC_VERSION@*.so + } + { + X11-64bit-padding-4b + Memcheck:Param + socketcall.send(msg) + fun:send +- obj:/*libc-@GLIBC_VERSION@.so +- obj:/*libc-@GLIBC_VERSION@.so +- obj:/*libc-@GLIBC_VERSION@.so ++ obj:/*libc-@GLIBC_VERSION@*.so ++ obj:/*libc-@GLIBC_VERSION@*.so ++ obj:/*libc-@GLIBC_VERSION@*.so + } + + ##----------------------------------------------------------------------## diff --git a/dev-util/valgrind/files/valgrind-3.4.1-x86_64-ldso-strlen.patch b/dev-util/valgrind/files/valgrind-3.4.1-x86_64-ldso-strlen.patch new file mode 100644 index 000000000000..a6ddfec33446 --- /dev/null +++ b/dev-util/valgrind/files/valgrind-3.4.1-x86_64-ldso-strlen.patch @@ -0,0 +1,82 @@ +--- valgrind/coregrind/pub_core_trampoline.h.jj 2009-04-22 12:10:54.000000000 +0200 ++++ valgrind/coregrind/pub_core_trampoline.h 2009-04-22 14:50:39.000000000 +0200 +@@ -66,6 +66,7 @@ extern Char* VG_(x86_linux_REDIR_FOR_ind + extern void VG_(amd64_linux_SUBST_FOR_rt_sigreturn); + extern void VG_(amd64_linux_REDIR_FOR_vgettimeofday); + extern void VG_(amd64_linux_REDIR_FOR_vtime); ++extern UInt VG_(amd64_linux_REDIR_FOR_strlen)( void* ); + #endif + + #if defined(VGP_ppc32_linux) +--- valgrind/coregrind/m_redir.c.jj 2009-04-22 12:10:54.000000000 +0200 ++++ valgrind/coregrind/m_redir.c 2009-04-22 15:32:19.000000000 +0200 +@@ -879,6 +879,20 @@ void VG_(redir_initialise) ( void ) + (Addr)&VG_(amd64_linux_REDIR_FOR_vtime) + ); + ++ /* If we're using memcheck, use these intercepts right from ++ the start, otherwise ld.so makes a lot of noise. */ ++ if (0==VG_(strcmp)("Memcheck", VG_(details).name)) { ++ ++ static const HChar croakage[] ++ = "Possible fix: add splitdebug to FEATURES in make.conf and remerge glibc."; ++ ++ /* this is mandatory - can't sanely continue without it */ ++ add_hardwired_spec( ++ "ld-linux-x86-64.so.2", "strlen", ++ (Addr)&VG_(amd64_linux_REDIR_FOR_strlen), ++ croakage ++ ); ++ } + # elif defined(VGP_ppc32_linux) + { + static const HChar croakage[] +--- valgrind/coregrind/m_trampoline.S.jj 2009-04-22 12:10:54.000000000 +0200 ++++ valgrind/coregrind/m_trampoline.S 2009-04-22 15:18:37.000000000 +0200 +@@ -174,7 +174,29 @@ VG_(amd64_linux_REDIR_FOR_vtime): + .LfnE3: + .size VG_(amd64_linux_REDIR_FOR_vtime), .-.LfnB3 + +-/* A CIE for the above two functions, followed by their FDEs */ ++/* There's no particular reason that this needs to be handwritten ++ assembly, but since that's what this file contains, here's a ++ simple strlen implementation (written in C and compiled by gcc.) ++*/ ++.global VG_(amd64_linux_REDIR_FOR_strlen) ++.type VG_(amd64_linux_REDIR_FOR_strlen), @function ++VG_(amd64_linux_REDIR_FOR_strlen): ++.LfnB4: ++ xorl %eax, %eax ++ cmpb $0, (%rdi) ++ movq %rdi, %rdx ++ je .L41 ++.L40: addq $1, %rdx ++ cmpb $0, (%rdx) ++ jne .L40 ++ movq %rdx, %rax ++ subq %rdi, %rax ++.L41: ret ++.LfnE4: ++.size VG_(amd64_linux_REDIR_FOR_strlen), .-VG_(amd64_linux_REDIR_FOR_strlen) ++ ++ ++/* A CIE for the above three functions, followed by their FDEs */ + .section .eh_frame,"a",@progbits + .Lframe1: + .long .LEcie1-.LScie1 +@@ -212,6 +234,15 @@ VG_(amd64_linux_REDIR_FOR_vtime): + .uleb128 0x0 + .align 8 + .LEfde3: ++.LSfde4: ++ .long .LEfde4-.LASfde4 ++.LASfde4: ++ .long .LASfde4-.Lframe1 ++ .long .LfnB4 ++ .long .LfnE4-.LfnB4 ++ .uleb128 0x0 ++ .align 8 ++.LEfde4: + .previous + + .global VG_(trampoline_stuff_end) diff --git a/dev-util/valgrind/valgrind-3.4.1-r1.ebuild b/dev-util/valgrind/valgrind-3.4.1-r1.ebuild new file mode 100644 index 000000000000..22ff84915236 --- /dev/null +++ b/dev-util/valgrind/valgrind-3.4.1-r1.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/valgrind-3.4.1-r1.ebuild,v 1.1 2009/07/26 12:05:52 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="mpi" + +DEPEND="mpi? ( virtual/mpi )" +RDEPEND="${DEPEND} + !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 + + # 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" + + # valgrind spits out many false positives on amd64 because of glibc-2.10's + # optimized strlen if there is no debug info for glibc (bug #274771). This + # patch adds a run-time error if debug info cannot be found. + epatch "${FILESDIR}/valgrind-3.4.1-x86_64-ldso-strlen.patch" + + # Fix up some suppressions that were not general enough for glibc versions + # with more than just a major and minor number. + epatch "${FILESDIR}/valgrind-3.4.1-glibc-2.10.1.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 + + if use amd64 || use ppc64; then + ! has_multilib_profile && myconf="${myconf} --enable-only64bit" + fi + + # Don't use mpicc unless the user asked for it (bug #258832) + if ! use mpi; then + myconf="${myconf} --without-mpicc" + fi + + econf ${myconf} || 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 || use amd64 ; then + ewarn "Valgrind will not work on ppc, ppc64 or amd64 if glibc does not have" + ewarn "debug symbols (see https://bugs.gentoo.org/show_bug.cgi?id=214065" + ewarn "and http://bugs.gentoo.org/show_bug.cgi?id=274771)." + ewarn "To fix this you can add splitdebug to FEATURES in make.conf and" + ewarn "remerge glibc." + fi +} |