summaryrefslogtreecommitdiff
path: root/dev-util/valgrind
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/valgrind')
-rw-r--r--dev-util/valgrind/Manifest10
-rw-r--r--dev-util/valgrind/files/valgrind-3.7.0-fno-stack-protector.patch12
-rw-r--r--dev-util/valgrind/files/valgrind-3.7.0-respect-flags.patch13
-rw-r--r--dev-util/valgrind/metadata.xml28
-rw-r--r--dev-util/valgrind/valgrind-3.12.0.ebuild95
-rw-r--r--dev-util/valgrind/valgrind-3.13.0.ebuild95
-rw-r--r--dev-util/valgrind/valgrind-9999.ebuild107
7 files changed, 360 insertions, 0 deletions
diff --git a/dev-util/valgrind/Manifest b/dev-util/valgrind/Manifest
new file mode 100644
index 000000000000..9a12ad6642a8
--- /dev/null
+++ b/dev-util/valgrind/Manifest
@@ -0,0 +1,10 @@
+AUX valgrind-3.7.0-fno-stack-protector.patch 554 SHA256 83ed90a0e8a8b06dca8aad4e7f1a12e3c84621d502427c0913b72740b310f479 SHA512 4f9573fd68a0e1e209518fb4100c27b697ccd28e7a39abaa921f1949cd87ffb79a6784d2d1f6e006d68a08c7217cee77cba378c18aab48b87a3824eedb53ed5e WHIRLPOOL 097a9658c0b83cec2b49fc0011bc63512d1a1b2e12048203ac963ad1fd526f932d8fee4052e6b8daacec3fa0bc9a0ea25e69f88bbb5df588e9b668252c0dc517
+AUX valgrind-3.7.0-respect-flags.patch 360 SHA256 6b1e5938ecafc29428a698296423c71924848b1e746d6ee8a0f1dd91141f1019 SHA512 efdb017283b6a5829d1a5acc31b42ddd177a3ab468eb062b8c4fd90b2dbd06679e8d8bc2d6f813e3001efdda831d4410cc8da3a3e42ee2e49efea0423e4b3ca3 WHIRLPOOL 5bff165cf8f6042905a4d682b0114ee41301de173d43412b16208a08a351fe8ca74a527e4d09f9649dca28cbb61dd8ea2392e10e2b8d7b8ea0e51318915f9565
+DIST valgrind-3.12.0.tar.bz2 12788556 SHA256 67ca4395b2527247780f36148b084f5743a68ab0c850cb43e4a5b4b012cf76a1 SHA512 2c083f7c2e74dc58600397726d9d3af7a2cea40fe3d8733149886d1d77867e6c09996e5be1c58dd932f3662acf7363e04eeadbc0f9c8f0dac089e605024229be WHIRLPOOL 136dd4f358bd18165a5801083cc73fc269a84bf491880af9842e789feea62181e16ca4c099db06fb4ffacf0cb0189b1b29d64790cc4202442f6f6b71ce4c6eea
+DIST valgrind-3.13.0.tar.bz2 14723076 SHA256 d76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b SHA512 34e1013cd3815d30a459b86220e871bb0a6209cc9e87af968f347083693779f022e986f211bdf1a5184ad7370cde12ff2cfca8099967ff94732970bd04a97009 WHIRLPOOL 5ec5c371f8fb22813b895eaa3ee1dbb3c32bb998ad4b646d4b252a694d9b40a1543234cb7208445d8ca557e779ce30e9d0503a36bb9e4240a245c5d5d802c8a4
+EBUILD valgrind-3.12.0.ebuild 2854 SHA256 c17d95bcad897f39d8babda49f57d722b055e8c0e147599a36098294b82e51f5 SHA512 a65f3ccca3a33e2bbae7d2616b2fa13a6a3913e927f601f8ef52172981f72c03219ccad126a801719688cb6106dea18c56ac0e14de194e065bffa744151ab457 WHIRLPOOL f83bad7363f3d5aa898be4c67a061ac6ffd2fc339deb845f14d8fd1578449082dfe95c35eada5f1b9bfe6149ed0bc609948f23bc6a78a35d3176f3e3079264c5
+EBUILD valgrind-3.13.0.ebuild 2859 SHA256 61b972077fae385f286a62adbd71fd4edf6c9778549c64b64bdc407a802f534a SHA512 127cf5c6216e5de83041f80a141b33c963a11772f3965b23e2d7573c5d0d8f14474bbba59ac455cc265a36071ad74ea091f275b0901bcd08ff3d750bfd5c22b7 WHIRLPOOL 09bbaef4f4b087567d8611a520d3f187bbc0a0f02d0866f91c053f12a1c8e578d7781637b73f7b3ec51eeed4c61f56986f5ffc7bbab3e5db518c93973f0e9cc4
+EBUILD valgrind-9999.ebuild 3117 SHA256 1f5a7ed3874d2094f3c2547dc7791923b27b99f97cc6e22976a1c298b1e8add3 SHA512 8fcb9250a1a602463dfe112d0340bcc6a565beb33979172c2f2cbbdd499e744aa05b9a17c0164ea6f57e3720cc582b831a061e0a75984b0007b10f18dbdf873d WHIRLPOOL 03d5403ee5e23aceb342000fb7e48c5bb71c3d0614edc940f50a3731d3fc2b1872d1f5a9856a4c4212c705ffb9cd9ff8ff000b6b6d03ff57db5ba1fb41e8daaa
+MISC ChangeLog 4905 SHA256 6426fca52173c69a094830fafb3cc1ee4cf198d1cabebb50e02a42290d3dfab9 SHA512 4c6bdfadb501d88387fd4564f264cecb2ce6cc2cd61966e06e9d7f56d110639df6c4b5715cb3c2855351a6e522989b832dd9a28aa80f575e6da982fe434cbef8 WHIRLPOOL 338a907450140519669ff650ab9eea29b8e3bd94cc95515fddf68e981f4d507f6b056a30f587e7d672a81bf1b8f64a4c6d5f29387bfbcf4f0a30bb1701334aab
+MISC ChangeLog-2015 31180 SHA256 da9c64ccba59ab236081a2a3d00f790a3e29799219594aec17df572dd85c4277 SHA512 d9bd1206b5272037af312a6037771cdab9afb806836a669f2958f1924a9c844681e86925d28123f9174f02f2ac72b62b5c564108d6cc4c41f19c4277a7135bd3 WHIRLPOOL 2e2a8f121c363ca32dedcfb3a646494d3d9f974eaaaece550b01b50262981d9b1a8d09c69e2b02d3f7ee7a198079f42a65d3a47454903a59be951e7c85368522
+MISC metadata.xml 1139 SHA256 5d601e1ea0a4b8a1ba906b88621b2f814e26d24d21c994dee39cd47494402982 SHA512 f3ee37b8e5f408c01d5f6308644305fcb945df008e5f708dbde95f73a1e7988f53799e28bd72f75bd5e01765414a0e11b8045f671e723beb46d90a50f5dd1846 WHIRLPOOL fc7cf7dd758d8f9baf538fce53a95019225af8a6b0049662b174ef67d287a92396ddafdd37b33ec7f72b94a4f093bf4afac8b47f8d9f75529e15b3ece1957414
diff --git a/dev-util/valgrind/files/valgrind-3.7.0-fno-stack-protector.patch b/dev-util/valgrind/files/valgrind-3.7.0-fno-stack-protector.patch
new file mode 100644
index 000000000000..6af455319567
--- /dev/null
+++ b/dev-util/valgrind/files/valgrind-3.7.0-fno-stack-protector.patch
@@ -0,0 +1,12 @@
+diff -Naur valgrind-3.7.0.orig//Makefile.all.am valgrind-3.7.0/Makefile.all.am
+--- valgrind-3.7.0.orig//Makefile.all.am 2011-10-26 17:24:45.000000000 -0400
++++ valgrind-3.7.0/Makefile.all.am 2011-11-10 16:18:18.000000000 -0500
+@@ -82,7 +82,7 @@
+ # performance and get whatever useful warnings we can out of gcc.
+ # -fno-builtin is important for defeating LLVM's idiom recognition
+ # that somehow causes VG_(memset) to get into infinite recursion.
+-AM_CFLAGS_BASE = \
++AM_CFLAGS_BASE = -fno-stack-protector \
+ -O2 -g \
+ -Wall \
+ -Wmissing-prototypes \
diff --git a/dev-util/valgrind/files/valgrind-3.7.0-respect-flags.patch b/dev-util/valgrind/files/valgrind-3.7.0-respect-flags.patch
new file mode 100644
index 000000000000..860e09c86ed3
--- /dev/null
+++ b/dev-util/valgrind/files/valgrind-3.7.0-respect-flags.patch
@@ -0,0 +1,13 @@
+diff -Naur valgrind-3.7.0.orig//mpi/Makefile.am valgrind-3.7.0/mpi/Makefile.am
+--- valgrind-3.7.0.orig//mpi/Makefile.am 2011-10-26 17:24:23.000000000 -0400
++++ valgrind-3.7.0/mpi/Makefile.am 2011-11-10 16:03:14.000000000 -0500
+@@ -7,9 +7,6 @@
+ CC = $(MPI_CC)
+ DEFS =
+ DEFAULT_INCLUDES =
+-CPPFLAGS =
+-CFLAGS =
+-LDFLAGS =
+
+ EXTRA_DIST = \
+ mpiwrap_type_test.c
diff --git a/dev-util/valgrind/metadata.xml b/dev-util/valgrind/metadata.xml
new file mode 100644
index 000000000000..31d1b4f644dd
--- /dev/null
+++ b/dev-util/valgrind/metadata.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>wizardedit@gentoo.org</email>
+ <name>Austin English</name>
+ </maintainer>
+ <longdescription>
+ 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 abuses of the POSIX Pthreads API
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-util/valgrind/valgrind-3.12.0.ebuild b/dev-util/valgrind/valgrind-3.12.0.ebuild
new file mode 100644
index 000000000000..a759d9c53e77
--- /dev/null
+++ b/dev-util/valgrind/valgrind-3.12.0.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+inherit autotools eutils flag-o-matic toolchain-funcs multilib pax-utils
+
+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 arm ppc ppc64 x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
+IUSE="mpi"
+
+DEPEND="mpi? ( virtual/mpi )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Correct hard coded doc location
+ sed -i -e "s:doc/valgrind:doc/${PF}:" docs/Makefile.am || die
+
+ # Don't force multiarch stuff on OSX, bug #306467
+ sed -i -e 's:-arch \(i386\|x86_64\)::g' Makefile.all.am || die
+
+ # Respect CFLAGS, LDFLAGS
+ epatch "${FILESDIR}"/${PN}-3.7.0-respect-flags.patch
+
+ # Changing Makefile.all.am to disable SSP
+ epatch "${FILESDIR}"/${PN}-3.7.0-fno-stack-protector.patch
+
+ # Allow users to test their own patches
+ epatch_user
+
+ # Regenerate autotools files
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ # Respect ar, bug #468114
+ tc-export AR
+
+ # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
+ # while compiling insn_sse.c in none/tests/x86
+ # -fstack-protector more undefined references to __guard and __stack_smash_handler
+ # because valgrind doesn't link to glibc (bug #114347)
+ # -m64 -mx32 for multilib-portage, bug #398825
+ # -ggdb3 segmentation fault on startup
+ filter-flags -fomit-frame-pointer
+ filter-flags -fstack-protector
+ filter-flags -m64 -mx32
+ replace-flags -ggdb3 -ggdb2
+
+ if use amd64 || use ppc64; then
+ ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
+ fi
+
+ # Force bitness on darwin, bug #306467
+ use x86-macos && myconf="${myconf} --enable-only32bit"
+ use x64-macos && myconf="${myconf} --enable-only64bit"
+
+ # Don't use mpicc unless the user asked for it (bug #258832)
+ if ! use mpi; then
+ myconf="${myconf} --without-mpicc"
+ fi
+
+ econf ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS FAQ.txt NEWS README*
+
+ pax-mark m "${ED}"/usr/$(get_libdir)/valgrind/*-*-linux
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # fix install_names on shared libraries, can't turn them into bundles,
+ # as dyld won't load them any more then, bug #306467
+ local l
+ for l in "${ED}"/usr/lib/valgrind/*.so ; do
+ install_name_tool -id "${EPREFIX}"/usr/lib/valgrind/${l##*/} "${l}"
+ done
+ fi
+}
+
+pkg_postinst() {
+ elog "Valgrind will not work if glibc does not have debug symbols."
+ elog "To fix this you can add splitdebug to FEATURES in make.conf"
+ elog "and remerge glibc. See:"
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=214065"
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=274771"
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=388703"
+}
diff --git a/dev-util/valgrind/valgrind-3.13.0.ebuild b/dev-util/valgrind/valgrind-3.13.0.ebuild
new file mode 100644
index 000000000000..5f802dc656d8
--- /dev/null
+++ b/dev-util/valgrind/valgrind-3.13.0.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+inherit autotools flag-o-matic toolchain-funcs multilib pax-utils
+
+DESCRIPTION="An open-source memory debugger for GNU/Linux"
+HOMEPAGE="http://www.valgrind.org"
+SRC_URI="ftp://sourceware.org/pub/valgrind/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
+IUSE="mpi"
+
+DEPEND="mpi? ( virtual/mpi )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Correct hard coded doc location
+ sed -i -e "s:doc/valgrind:doc/${PF}:" docs/Makefile.am || die
+
+ # Don't force multiarch stuff on OSX, bug #306467
+ sed -i -e 's:-arch \(i386\|x86_64\)::g' Makefile.all.am || die
+
+ # Respect CFLAGS, LDFLAGS
+ eapply "${FILESDIR}"/${PN}-3.7.0-respect-flags.patch
+
+ # Changing Makefile.all.am to disable SSP
+ eapply "${FILESDIR}"/${PN}-3.7.0-fno-stack-protector.patch
+
+ # Allow users to test their own patches
+ eapply_user
+
+ # Regenerate autotools files
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ # Respect ar, bug #468114
+ tc-export AR
+
+ # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
+ # while compiling insn_sse.c in none/tests/x86
+ # -fstack-protector more undefined references to __guard and __stack_smash_handler
+ # because valgrind doesn't link to glibc (bug #114347)
+ # -m64 -mx32 for multilib-portage, bug #398825
+ # -ggdb3 segmentation fault on startup
+ filter-flags -fomit-frame-pointer
+ filter-flags -fstack-protector
+ filter-flags -m64 -mx32
+ replace-flags -ggdb3 -ggdb2
+
+ if use amd64 || use ppc64; then
+ ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
+ fi
+
+ # Force bitness on darwin, bug #306467
+ use x86-macos && myconf="${myconf} --enable-only32bit"
+ use x64-macos && myconf="${myconf} --enable-only64bit"
+
+ # Don't use mpicc unless the user asked for it (bug #258832)
+ if ! use mpi; then
+ myconf="${myconf} --without-mpicc"
+ fi
+
+ econf ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc AUTHORS FAQ.txt NEWS README*
+
+ pax-mark m "${ED}"/usr/$(get_libdir)/valgrind/*-*-linux
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # fix install_names on shared libraries, can't turn them into bundles,
+ # as dyld won't load them any more then, bug #306467
+ local l
+ for l in "${ED}"/usr/lib/valgrind/*.so ; do
+ install_name_tool -id "${EPREFIX}"/usr/lib/valgrind/${l##*/} "${l}"
+ done
+ fi
+}
+
+pkg_postinst() {
+ elog "Valgrind will not work if glibc does not have debug symbols."
+ elog "To fix this you can add splitdebug to FEATURES in make.conf"
+ elog "and remerge glibc. See:"
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=214065"
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=274771"
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=388703"
+}
diff --git a/dev-util/valgrind/valgrind-9999.ebuild b/dev-util/valgrind/valgrind-9999.ebuild
new file mode 100644
index 000000000000..6414792ca62c
--- /dev/null
+++ b/dev-util/valgrind/valgrind-9999.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+inherit autotools flag-o-matic toolchain-funcs multilib pax-utils
+
+DESCRIPTION="An open-source memory debugger for GNU/Linux"
+HOMEPAGE="http://www.valgrind.org"
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="mpi"
+
+if [[ ${PV} == "9999" ]]; then
+ EGIT_REPO_URI="git://sourceware.org/git/${PN}.git/"
+ inherit git-r3
+else
+ SRC_URI="ftp://sourceware.org/pub/valgrind/${P}.tar.bz2"
+ KEYWORDS="-* ~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
+fi
+
+DEPEND="mpi? ( virtual/mpi )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ # Correct hard coded doc location
+ sed -i -e "s:doc/valgrind:doc/${PF}:" docs/Makefile.am || die
+
+ # Don't force multiarch stuff on OSX, bug #306467
+ sed -i -e 's:-arch \(i386\|x86_64\)::g' Makefile.all.am || die
+
+ # Respect CFLAGS, LDFLAGS
+ eapply "${FILESDIR}"/${PN}-3.7.0-respect-flags.patch
+
+ # Changing Makefile.all.am to disable SSP
+ eapply "${FILESDIR}"/${PN}-3.7.0-fno-stack-protector.patch
+
+ # Allow users to test their own patches
+ eapply_user
+
+ # Regenerate autotools files
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ # Respect ar, bug #468114
+ tc-export AR
+
+ # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
+ # while compiling insn_sse.c in none/tests/x86
+ # -fstack-protector more undefined references to __guard and __stack_smash_handler
+ # because valgrind doesn't link to glibc (bug #114347)
+ # -m64 -mx32 for multilib-portage, bug #398825
+ # -ggdb3 segmentation fault on startup
+ filter-flags -fomit-frame-pointer
+ filter-flags -fstack-protector
+ filter-flags -m64 -mx32
+ replace-flags -ggdb3 -ggdb2
+
+ if use amd64 || use ppc64; then
+ ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
+ fi
+
+ # Force bitness on darwin, bug #306467
+ use x86-macos && myconf="${myconf} --enable-only32bit"
+ use x64-macos && myconf="${myconf} --enable-only64bit"
+
+ # Don't use mpicc unless the user asked for it (bug #258832)
+ if ! use mpi; then
+ myconf="${myconf} --without-mpicc"
+ fi
+
+ econf ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ if [[ ${PV} == "9999" ]]; then
+ # Otherwise FAQ.txt won't exist:
+ emake -C docs FAQ.txt
+ mv docs/FAQ.txt . || die "Couldn't move FAQ.txt"
+ fi
+
+ dodoc AUTHORS FAQ.txt NEWS README*
+
+ pax-mark m "${ED}"/usr/$(get_libdir)/valgrind/*-*-linux
+
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ # fix install_names on shared libraries, can't turn them into bundles,
+ # as dyld won't load them any more then, bug #306467
+ local l
+ for l in "${ED}"/usr/lib/valgrind/*.so ; do
+ install_name_tool -id "${EPREFIX}"/usr/lib/valgrind/${l##*/} "${l}"
+ done
+ fi
+}
+
+pkg_postinst() {
+ elog "Valgrind will not work if glibc does not have debug symbols."
+ elog "To fix this you can add splitdebug to FEATURES in make.conf"
+ elog "and remerge glibc. See:"
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=214065"
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=274771"
+ elog "https://bugs.gentoo.org/show_bug.cgi?id=388703"
+}