aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAric Belsito <lluixhi@gmail.com>2016-12-04 21:36:04 -0800
committerAric Belsito <lluixhi@gmail.com>2016-12-04 21:36:04 -0800
commite2ff1c62569ad1795cdbfac9856eaa11d8f8ad48 (patch)
treef3238061e232e743d40aeee9c029edbbf73564da /dev-util
parentx11-base/xorg-server-1.18.4: arm stable (diff)
downloadmusl-e2ff1c62569ad1795cdbfac9856eaa11d8f8ad48.tar.gz
musl-e2ff1c62569ad1795cdbfac9856eaa11d8f8ad48.tar.bz2
musl-e2ff1c62569ad1795cdbfac9856eaa11d8f8ad48.zip
dev-util/valgrind: add stable and unstable version
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/valgrind/Manifest15
-rw-r--r--dev-util/valgrind/files/valgrind-3.10.1-glibc-2.21.patch17
-rw-r--r--dev-util/valgrind/files/valgrind-3.10.1-glibc-2.22.patch17
-rw-r--r--dev-util/valgrind/files/valgrind-3.10.1-linux-4.patch29
-rw-r--r--dev-util/valgrind/files/valgrind-3.10.1-musl.patch44
-rw-r--r--dev-util/valgrind/files/valgrind-3.10.1-non-exec-stack.patch148
-rw-r--r--dev-util/valgrind/files/valgrind-3.11.0-musl.patch45
-rw-r--r--dev-util/valgrind/files/valgrind-3.6.0-local-labels.patch24
-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/files/valgrind-3.9.0-glibc-2.19.patch37
-rw-r--r--dev-util/valgrind/metadata.xml24
-rw-r--r--dev-util/valgrind/valgrind-3.10.1.ebuild121
-rw-r--r--dev-util/valgrind/valgrind-3.12.0.ebuild99
14 files changed, 645 insertions, 0 deletions
diff --git a/dev-util/valgrind/Manifest b/dev-util/valgrind/Manifest
new file mode 100644
index 00000000..c4f9e3c8
--- /dev/null
+++ b/dev-util/valgrind/Manifest
@@ -0,0 +1,15 @@
+AUX valgrind-3.10.1-glibc-2.21.patch 754 SHA256 a26812fc17bad388e3a30e74cec313ffc8c13bb61f8bb2667008af3d5e4d8984 SHA512 e5fa252633629d0688cbc97d60c91b51796c142c4336f0775266cedc14e53530397290dcdb4d6a4170b0579051fa8a33766d7c43980d6785e56880409ae39218 WHIRLPOOL e106fe74225329e05c89b5e69471c88fe65f7044e357c66509ff4731cf5f2f410e79fed0885af015e7c49d4b9b37e4e491fc870f900da18ef9cab146a37c9050
+AUX valgrind-3.10.1-glibc-2.22.patch 754 SHA256 c1fb0353065c03abc3867e0c0ffd030abbe9050bd6c0df1622633eac0156f5bc SHA512 c9d6511097b4270474011ee5dd7e87b20ca946c8fc227766db017948d0fcff7b5f8031ce2827b90917c2c9fb059fa65173cc2243c3d57b7e9edfcab740b7250e WHIRLPOOL 5a45da79add0334989ba85697a958416e762593e1b60d604002dea081191ad1aba45c4502191b212db64e208a7b2e7f8a80e5955157487782b31b09e9626e2e4
+AUX valgrind-3.10.1-linux-4.patch 972 SHA256 08956afc6390188a6c8bc0cebb81e806d4006e635076878e21043a57e5df4816 SHA512 22fda4cb41ee38e5b871217abf7c697ac6d1f088e9d6f5c035c6c54b0d008f2f23fe900fc036f0990fbad6284d357838e344ec43c156a5d8ec60d7b377abceaf WHIRLPOOL 99528549388b189328de8fe40715cdeac86f22726c62f9ae5aa677ac1a33aeb610230c421738342c4ed8b3b55e43372ecda943d5c2a4e74a26484ff1c1ef8c50
+AUX valgrind-3.10.1-musl.patch 1884 SHA256 9f94b5a8674f5f3c1dead32cff036ae5a513158e14c89cf230cd6f3d47e77feb SHA512 5a8ce93abd83a66983f0b47acce4e375dd6b8c57d6772d42f51aea0ec0f0c233cef88230d10e54c06446a84c772810d382fd1861019ad9b28578b0e0bd8ff57c WHIRLPOOL d62e7ddf61e9fd8a810c358051448cf742dd145738e7fbea8bf1f56ea8ceadf9683da6e6e596807dc810ba5e2c8688b45e1ccccc06451742c8598e712227d5a2
+AUX valgrind-3.10.1-non-exec-stack.patch 6019 SHA256 812560566e56c32db2ad3a97a2e52327d84648698987079ccf3843203c1e6ddc SHA512 015da8132bb72b81bd017b3e3faefb408a8f053676ff605bec411e40d9b7de21b197f660139df7e540756462406442325305d52ae0da04ac44ec66612fb1b0b3 WHIRLPOOL ddaf89092c4915662e6ba048668715f13e8634edc7cf490099870edda3b23799a76e3c677a430bf966295f84010829217aa0c0f887e48762969b805a365ef101
+AUX valgrind-3.11.0-musl.patch 2031 SHA256 c3c036b5976320f5c4f949a5c10c1b361b6328e5ca766658975305892c46efd0 SHA512 29bb3f4719b6ec6e921220135f6d11eb4fa130edf3c94b9b63ddd68fba1426aaa6b1bb7629b25c853a1b2a902f4fd0d8e74a3d641f395d43f0553209e6c5f5d5 WHIRLPOOL 8f06d02c36a52f753ad8103b13b11cc07dcaf531769ca99f142244d737d75d25cb5290eefebd0e7b9b18f40d5a855cee72cef89efae100961566df0b48e63977
+AUX valgrind-3.6.0-local-labels.patch 1388 SHA256 34ae13eda378677f1e662e0813f138de9b897d6592d20872c58ed8ac1bcf7def SHA512 079abe5bd99e2acf0e33a46db3772e264a2051d048c1cd34a4ee350395ea38b815f7909008ed1123324857ed25ab0159da4c5da37701570be012a0664481bbc6 WHIRLPOOL ba737636a547154947073478048f693bb28a9e353b8a1ac195d701bb8be69e182aa5d043b1c6085639c80752c68e5c8b26e3ec54bdcff7ac53ca71bc62768f58
+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
+AUX valgrind-3.9.0-glibc-2.19.patch 1530 SHA256 5cb0b62569d6acf3bc30e168570effecfcccd8cd6d9d9f1ee201c99d74a960f6 SHA512 8f059c9cf61cab427538164fd11bc14d3be17d5f93a77b8ca33426c0bf2fee3b2d0797cd246ec50266cc5f6ebb602d877ab7eded0618836752fd14408a2d5a63 WHIRLPOOL 8556c35adb05b20f466ec6acc1ce4b8a4940cf29b576dc72623278a5eb35f269aa84edb1202bcf059daee1e0c2ff9f7a0828b8f1a0e31b12f6d30d24bf07da37
+DIST valgrind-3.10.1.tar.bz2 10967905 SHA256 fa253dc26ddb661b6269df58144eff607ea3f76a9bcfe574b0c7726e1dfcb997 SHA512 8f3d27637c13b06381b3dd44088244e0cf2f7008f40e46f34322f2a5bfa6373d29ce68ff49f19c48f1a5f139d8be5838b9606206e0ce2599c5f74c0db8ce2642 WHIRLPOOL 3d55f35b02195d9859d9192726ea708277f1d3339005d959baa224822c5b71f5347cdd28c7fd8153c10d1e3282855e853caf9c7192751bebdbbc3444c33d885a
+DIST valgrind-3.12.0.tar.bz2 12788556 SHA256 67ca4395b2527247780f36148b084f5743a68ab0c850cb43e4a5b4b012cf76a1 SHA512 2c083f7c2e74dc58600397726d9d3af7a2cea40fe3d8733149886d1d77867e6c09996e5be1c58dd932f3662acf7363e04eeadbc0f9c8f0dac089e605024229be WHIRLPOOL 136dd4f358bd18165a5801083cc73fc269a84bf491880af9842e789feea62181e16ca4c099db06fb4ffacf0cb0189b1b29d64790cc4202442f6f6b71ce4c6eea
+EBUILD valgrind-3.10.1.ebuild 3688 SHA256 a7e217a8c1cc99aa31a40ed73b8d5d5a1da132675e08b4fb65181d6fec31d2d2 SHA512 8628ea17d0d642fbbc396150951ad3cf0ce1f7728ec3430f24670dc5c81605c5aba7464074f800223b3ebf75a00cea8d57672d5c000152ef243416e4c4db4029 WHIRLPOOL 77167b8cbf8c97b507e142fede1b75a342ae15f7307952ca874fb01a3f832b6a38aa38485d31493448f6ebfd30d847e620f4f7558698dbda7c7a3a046cd3669f
+EBUILD valgrind-3.12.0.ebuild 2930 SHA256 2f3d82b860dd6ae0935d52825f9570ea200081bfe46b1cc7168d3471b83aeedd SHA512 1f25175cb3239c65643dcd7f6aa2e5992e04f0f764a18c0a882e588e54b7b45661c3e5b85b2a330475f843fd23e58077690d096cbec451b51d521267c41ec0ab WHIRLPOOL c6da0ece5afa44ff92cb0fac0ec1f1266e504fa678e0470a502969c28e5a2c854d2f3e927b1355e6ae0104a25ad6d3d3fbe0a81c3ed15a5cd4ddb90f662bf17d
+MISC metadata.xml 1027 SHA256 24250bf95fab2ba7ee7d2806689796dffc8e7e8b85375c31fe6d329578e5fdb4 SHA512 da5bcaf596f2adaa552cc3b7296891b40be0bafec8a12695076ce8fbe660b8aabe70508eb02ab3fb66b0d9dd0c0c8615f430c1ee0ce3f3579732ea2406c8a778 WHIRLPOOL 9784694680f06fd891d27d35fcb942d7d3d0a2f15834855726e365982525fc70ccc69c61c82366091f07f275c46f59350ed1face4370d1e56b2584a4ee54a571
diff --git a/dev-util/valgrind/files/valgrind-3.10.1-glibc-2.21.patch b/dev-util/valgrind/files/valgrind-3.10.1-glibc-2.21.patch
new file mode 100644
index 00000000..286e431b
--- /dev/null
+++ b/dev-util/valgrind/files/valgrind-3.10.1-glibc-2.21.patch
@@ -0,0 +1,17 @@
+diff -Naur valgrind-3.10.1.orig/configure.ac valgrind-3.10.1/configure.ac
+--- valgrind-3.10.1.orig/configure.ac 2014-11-25 14:41:13.000000000 -0500
++++ valgrind-3.10.1/configure.ac 2015-07-28 22:35:22.315604804 -0400
+@@ -1018,6 +1018,13 @@
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
++ 2.21)
++ AC_MSG_RESULT(2.21 family)
++ AC_DEFINE([GLIBC_2_21], 1, [Define to 1 if you're using glibc 2.21.x])
++ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
++ ;;
+ darwin)
+ AC_MSG_RESULT(Darwin)
+ AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
diff --git a/dev-util/valgrind/files/valgrind-3.10.1-glibc-2.22.patch b/dev-util/valgrind/files/valgrind-3.10.1-glibc-2.22.patch
new file mode 100644
index 00000000..aa44aec4
--- /dev/null
+++ b/dev-util/valgrind/files/valgrind-3.10.1-glibc-2.22.patch
@@ -0,0 +1,17 @@
+diff -Naur valgrind-3.10.1.orig/configure.ac valgrind-3.10.1/configure.ac
+--- valgrind-3.10.1.orig/configure.ac 2016-04-16 04:24:22.285314910 -0400
++++ valgrind-3.10.1/configure.ac 2016-04-16 04:39:03.437329726 -0400
+@@ -1032,6 +1032,13 @@
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
++ 2.22)
++ AC_MSG_RESULT(2.22 family)
++ AC_DEFINE([GLIBC_2_22], 1, [Define to 1 if you're using glibc 2.22.x])
++ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
++ ;;
+ darwin)
+ AC_MSG_RESULT(Darwin)
+ AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
diff --git a/dev-util/valgrind/files/valgrind-3.10.1-linux-4.patch b/dev-util/valgrind/files/valgrind-3.10.1-linux-4.patch
new file mode 100644
index 00000000..63918c2c
--- /dev/null
+++ b/dev-util/valgrind/files/valgrind-3.10.1-linux-4.patch
@@ -0,0 +1,29 @@
+From ecb3746d69820905c076b89e1be7042f52ceaa5f Mon Sep 17 00:00:00 2001
+From: Janne Grunau <j@jannau.net>
+Date: Thu, 19 Mar 2015 22:44:51 +0100
+Subject: [PATCH 1/1] configure: support linux 4.*
+
+There is nothing special in linux 4.0. Handle it as another 3.* (or
+another 2.6.*) release. Compare changeset 14955 in valgrind's
+subversion repository. Valgrind trunk also drops support for linux 2.4
+but there is no need to do that for realeased software.
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0fd2a41..33c7954 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -303,7 +303,7 @@ case "${host_os}" in
+ kernel=`uname -r`
+
+ case "${kernel}" in
+- 2.6.*|3.*)
++ 2.6.*|3.*|4.*)
+ AC_MSG_RESULT([2.6.x/3.x family (${kernel})])
+ AC_DEFINE([KERNEL_2_6], 1, [Define to 1 if you're using Linux 2.6.x or Linux 3.x])
+ ;;
+--
+2.3.3
+
diff --git a/dev-util/valgrind/files/valgrind-3.10.1-musl.patch b/dev-util/valgrind/files/valgrind-3.10.1-musl.patch
new file mode 100644
index 00000000..573c75de
--- /dev/null
+++ b/dev-util/valgrind/files/valgrind-3.10.1-musl.patch
@@ -0,0 +1,44 @@
+diff -ru valgrind-3.10.0.orig/configure.ac valgrind-3.10.0/configure.ac
+--- valgrind-3.10.0.orig/configure.ac 2014-09-11 12:12:44.000000000 -0300
++++ valgrind-3.10.0/configure.ac 2014-09-19 13:11:10.338289149 -0300
+@@ -1031,8 +1031,6 @@
+
+ *)
+ AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
+- AC_MSG_ERROR([Valgrind requires glibc version 2.2 - 2.19])
+- AC_MSG_ERROR([or Darwin or Bionic libc])
+ ;;
+ esac
+
+diff -ru valgrind-3.10.0.orig/coregrind/vg_preloaded.c valgrind-3.10.0/coregrind/vg_preloaded.c
+--- valgrind-3.10.0.orig/coregrind/vg_preloaded.c 2014-09-19 13:08:26.000000000 -0300
++++ valgrind-3.10.0/coregrind/vg_preloaded.c 2014-09-19 13:12:31.301626639 -0300
+@@ -57,7 +57,7 @@
+ void VG_NOTIFY_ON_LOAD(freeres)( void );
+ void VG_NOTIFY_ON_LOAD(freeres)( void )
+ {
+-# if !defined(__UCLIBC__) \
++# if defined(__GLIBC__) \
+ && !defined(VGPV_arm_linux_android) && !defined(VGPV_x86_linux_android) \
+ && !defined(VGPV_mips32_linux_android)
+ extern void __libc_freeres(void);
+--- valgrind-3.10.0.orig/include/pub_tool_redir.h 2014-09-08 15:28:23.000000000 -0300
++++ valgrind-3.10.0/include/pub_tool_redir.h 2014-09-19 14:12:48.195145620 -0300
+@@ -241,7 +241,7 @@
+ /* --- Soname of the standard C library. --- */
+
+ #if defined(VGO_linux)
+-# define VG_Z_LIBC_SONAME libcZdsoZa // libc.so*
++# define VG_Z_LIBC_SONAME libcZdZa // libc.*
+
+ #elif defined(VGO_darwin) && (DARWIN_VERS <= DARWIN_10_6)
+ # define VG_Z_LIBC_SONAME libSystemZdZaZddylib // libSystem.*.dylib
+@@ -273,7 +273,7 @@
+ /* --- Soname of the pthreads library. --- */
+
+ #if defined(VGO_linux)
+-# define VG_Z_LIBPTHREAD_SONAME libpthreadZdsoZd0 // libpthread.so.0
++# define VG_Z_LIBPTHREAD_SONAME libcZdZa // libc.*
+ #elif defined(VGO_darwin)
+ # define VG_Z_LIBPTHREAD_SONAME libSystemZdZaZddylib // libSystem.*.dylib
+ #else
diff --git a/dev-util/valgrind/files/valgrind-3.10.1-non-exec-stack.patch b/dev-util/valgrind/files/valgrind-3.10.1-non-exec-stack.patch
new file mode 100644
index 00000000..e25de99e
--- /dev/null
+++ b/dev-util/valgrind/files/valgrind-3.10.1-non-exec-stack.patch
@@ -0,0 +1,148 @@
+diff -Naur valgrind-3.10.1.orig/coregrind/Makefile.am valgrind-3.10.1/coregrind/Makefile.am
+--- valgrind-3.10.1.orig/coregrind/Makefile.am 2014-11-25 14:41:19.000000000 -0500
++++ valgrind-3.10.1/coregrind/Makefile.am 2014-11-26 13:36:44.113678744 -0500
+@@ -333,18 +333,6 @@
+ m_demangle/demangle.c \
+ m_demangle/dyn-string.c \
+ m_demangle/safe-ctype.c \
+- m_dispatch/dispatch-x86-linux.S \
+- m_dispatch/dispatch-amd64-linux.S \
+- m_dispatch/dispatch-ppc32-linux.S \
+- m_dispatch/dispatch-ppc64be-linux.S \
+- m_dispatch/dispatch-ppc64le-linux.S \
+- m_dispatch/dispatch-arm-linux.S \
+- m_dispatch/dispatch-arm64-linux.S \
+- m_dispatch/dispatch-s390x-linux.S \
+- m_dispatch/dispatch-mips32-linux.S \
+- m_dispatch/dispatch-mips64-linux.S \
+- m_dispatch/dispatch-x86-darwin.S \
+- m_dispatch/dispatch-amd64-darwin.S \
+ m_gdbserver/inferiors.c \
+ m_gdbserver/m_gdbserver.c \
+ m_gdbserver/regcache.c \
+@@ -368,8 +356,6 @@
+ m_initimg/initimg-pathscan.c \
+ m_mach/mach_basics.c \
+ m_mach/mach_msg.c \
+- m_mach/mach_traps-x86-darwin.S \
+- m_mach/mach_traps-amd64-darwin.S \
+ m_replacemalloc/replacemalloc_core.c \
+ m_scheduler/scheduler.c \
+ m_scheduler/sema.c \
+@@ -386,18 +372,6 @@
+ m_sigframe/sigframe-mips64-linux.c \
+ m_sigframe/sigframe-x86-darwin.c \
+ m_sigframe/sigframe-amd64-darwin.c \
+- m_syswrap/syscall-x86-linux.S \
+- m_syswrap/syscall-amd64-linux.S \
+- m_syswrap/syscall-ppc32-linux.S \
+- m_syswrap/syscall-ppc64be-linux.S \
+- m_syswrap/syscall-ppc64le-linux.S \
+- m_syswrap/syscall-arm-linux.S \
+- m_syswrap/syscall-arm64-linux.S \
+- m_syswrap/syscall-s390x-linux.S \
+- m_syswrap/syscall-mips32-linux.S \
+- m_syswrap/syscall-mips64-linux.S \
+- m_syswrap/syscall-x86-darwin.S \
+- m_syswrap/syscall-amd64-darwin.S \
+ m_syswrap/syswrap-main.c \
+ m_syswrap/syswrap-generic.c \
+ m_syswrap/syswrap-linux.c \
+@@ -420,6 +394,29 @@
+ m_ume/main.c \
+ m_ume/script.c
+
++COREGRIND_SOURCES_COMMON += \
++ m_dispatch/dispatch-@VGCONF_ARCH_PRI@-@VGCONF_OS@.S \
++ m_syswrap/syscall-@VGCONF_ARCH_PRI@-@VGCONF_OS@.S
++
++if VGCONF_HAVE_PLATFORM_SEC
++COREGRIND_SOURCES_COMMON += \
++ m_dispatch/dispatch-@VGCONF_ARCH_SEC@-@VGCONF_OS@.S \
++ m_syswrap/syscall-@VGCONF_ARCH_SEC@-@VGCONF_OS@.S
++endif
++
++if VGCONF_OS_IS_DARWIN
++COREGRIND_SOURCES_COMMON += \
++ m_dispatch/dispatch-@VGCONF_ARCH_PRI@-darwin.S \
++ m_syswrap/syscall-@VGCONF_ARCH_PRI@-darwin.S \
++ m_mach/mach_traps-@VGCONF_ARCH_PRI@-darwin.S
++if VGCONF_HAVE_PLATFORM_SEC
++COREGRIND_SOURCES_COMMON += \
++ m_dispatch/dispatch-@VGCONF_ARCH_SEC@-darwin.S \
++ m_syswrap/syscall-@VGCONF_ARCH_SEC@-darwin.S \
++ m_mach/mach_traps-@VGCONF_ARCH_SEC@-darwin.S
++endif
++endif
++
+ libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
+ $(COREGRIND_SOURCES_COMMON)
+ nodist_libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
+diff -Naur valgrind-3.10.1.orig/coregrind/m_dispatch/dispatch-amd64-linux.S valgrind-3.10.1/coregrind/m_dispatch/dispatch-amd64-linux.S
+--- valgrind-3.10.1.orig/coregrind/m_dispatch/dispatch-amd64-linux.S 2014-11-25 14:41:20.000000000 -0500
++++ valgrind-3.10.1/coregrind/m_dispatch/dispatch-amd64-linux.S 2014-11-26 13:30:11.840660890 -0500
+@@ -249,11 +249,11 @@
+
+ .size VG_(disp_run_translations), .-VG_(disp_run_translations)
+
++#endif // defined(VGP_amd64_linux)
++
+ /* Let the linker know we don't need an executable stack */
+ .section .note.GNU-stack,"",@progbits
+
+-#endif // defined(VGP_amd64_linux)
+-
+ /*--------------------------------------------------------------------*/
+ /*--- end ---*/
+ /*--------------------------------------------------------------------*/
+diff -Naur valgrind-3.10.1.orig/coregrind/m_dispatch/dispatch-x86-linux.S valgrind-3.10.1/coregrind/m_dispatch/dispatch-x86-linux.S
+--- valgrind-3.10.1.orig/coregrind/m_dispatch/dispatch-x86-linux.S 2014-11-25 14:41:20.000000000 -0500
++++ valgrind-3.10.1/coregrind/m_dispatch/dispatch-x86-linux.S 2014-11-26 13:30:11.840660890 -0500
+@@ -240,11 +240,11 @@
+
+ .size VG_(disp_run_translations), .-VG_(disp_run_translations)
+
++#endif // defined(VGP_x86_linux)
++
+ /* Let the linker know we don't need an executable stack */
+ .section .note.GNU-stack,"",@progbits
+
+-#endif // defined(VGP_x86_linux)
+-
+ /*--------------------------------------------------------------------*/
+ /*--- end ---*/
+ /*--------------------------------------------------------------------*/
+diff -Naur valgrind-3.10.1.orig/coregrind/m_syswrap/syscall-amd64-linux.S valgrind-3.10.1/coregrind/m_syswrap/syscall-amd64-linux.S
+--- valgrind-3.10.1.orig/coregrind/m_syswrap/syscall-amd64-linux.S 2014-11-25 14:41:20.000000000 -0500
++++ valgrind-3.10.1/coregrind/m_syswrap/syscall-amd64-linux.S 2014-11-26 13:30:11.840660890 -0500
+@@ -205,11 +205,11 @@
+ ML_(blksys_finished): .quad 5b
+ .previous
+
++#endif // defined(VGP_amd64_linux)
++
+ /* Let the linker know we don't need an executable stack */
+ .section .note.GNU-stack,"",@progbits
+
+-#endif // defined(VGP_amd64_linux)
+-
+ /*--------------------------------------------------------------------*/
+ /*--- end ---*/
+ /*--------------------------------------------------------------------*/
+diff -Naur valgrind-3.10.1.orig/coregrind/m_syswrap/syscall-x86-linux.S valgrind-3.10.1/coregrind/m_syswrap/syscall-x86-linux.S
+--- valgrind-3.10.1.orig/coregrind/m_syswrap/syscall-x86-linux.S 2014-11-25 14:41:20.000000000 -0500
++++ valgrind-3.10.1/coregrind/m_syswrap/syscall-x86-linux.S 2014-11-26 13:30:11.840660890 -0500
+@@ -165,11 +165,11 @@
+ ML_(blksys_finished): .long 5b
+ .previous
+
++#endif // defined(VGP_x86_linux)
++
+ /* Let the linker know we don't need an executable stack */
+ .section .note.GNU-stack,"",@progbits
+
+-#endif // defined(VGP_x86_linux)
+-
+ /*--------------------------------------------------------------------*/
+ /*--- end ---*/
+ /*--------------------------------------------------------------------*/
diff --git a/dev-util/valgrind/files/valgrind-3.11.0-musl.patch b/dev-util/valgrind/files/valgrind-3.11.0-musl.patch
new file mode 100644
index 00000000..a76a741b
--- /dev/null
+++ b/dev-util/valgrind/files/valgrind-3.11.0-musl.patch
@@ -0,0 +1,45 @@
+diff -Naurw valgrind-3.11.0.orig/configure.ac valgrind-3.11.0/configure.ac
+--- valgrind-3.11.0.orig/configure.ac 2015-09-22 13:26:31.000000000 -0700
++++ valgrind-3.11.0/configure.ac 2015-09-26 11:54:13.570025359 -0700
+@@ -1066,8 +1066,6 @@
+ ;;
+ 2.0|2.1|*)
+ AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}])
+- AC_MSG_ERROR([Valgrind requires glibc version 2.2 or later,])
+- AC_MSG_ERROR([Darwin libc, Bionic libc or Solaris libc])
+ ;;
+ esac
+
+diff -Naurw valgrind-3.11.0.orig/coregrind/vg_preloaded.c valgrind-3.11.0/coregrind/vg_preloaded.c
+--- valgrind-3.11.0.orig/coregrind/vg_preloaded.c 2015-09-08 06:23:26.000000000 -0700
++++ valgrind-3.11.0/coregrind/vg_preloaded.c 2015-09-26 11:54:52.383359849 -0700
+@@ -56,7 +56,7 @@
+ void VG_NOTIFY_ON_LOAD(freeres)( void );
+ void VG_NOTIFY_ON_LOAD(freeres)( void )
+ {
+-# if !defined(__UCLIBC__) \
++# if defined(__GLIBC__) \
+ && !defined(VGPV_arm_linux_android) \
+ && !defined(VGPV_x86_linux_android) \
+ && !defined(VGPV_mips32_linux_android) \
+diff -Naurw valgrind-3.11.0.orig/include/pub_tool_redir.h valgrind-3.11.0/include/pub_tool_redir.h
+--- valgrind-3.11.0.orig/include/pub_tool_redir.h 2015-09-08 06:23:26.000000000 -0700
++++ valgrind-3.11.0/include/pub_tool_redir.h 2015-09-26 11:57:20.796697605 -0700
+@@ -242,7 +242,7 @@
+ /* --- Soname of the standard C library. --- */
+
+ #if defined(VGO_linux) || defined(VGO_solaris)
+-# define VG_Z_LIBC_SONAME libcZdsoZa // libc.so*
++# define VG_Z_LIBC_SONAME libcZdZa // libc.*
+
+ #elif defined(VGO_darwin) && (DARWIN_VERS <= DARWIN_10_6)
+ # define VG_Z_LIBC_SONAME libSystemZdZaZddylib // libSystem.*.dylib
+@@ -274,7 +274,7 @@
+ /* --- Soname of the pthreads library. --- */
+
+ #if defined(VGO_linux)
+-# define VG_Z_LIBPTHREAD_SONAME libpthreadZdsoZd0 // libpthread.so.0
++# define VG_Z_LIBPTHREAD_SONAME libcZdZa // libc.*
+ #elif defined(VGO_darwin)
+ # define VG_Z_LIBPTHREAD_SONAME libSystemZdZaZddylib // libSystem.*.dylib
+ #elif defined(VGO_solaris)
diff --git a/dev-util/valgrind/files/valgrind-3.6.0-local-labels.patch b/dev-util/valgrind/files/valgrind-3.6.0-local-labels.patch
new file mode 100644
index 00000000..68e68225
--- /dev/null
+++ b/dev-util/valgrind/files/valgrind-3.6.0-local-labels.patch
@@ -0,0 +1,24 @@
+--- coregrind/m_libcassert.c 2010-10-21 04:19:45.000000000 +0800
++++ coregrind/m_libcassert.c 2010-10-24 20:23:17.800001876 +0800
+@@ -81,8 +81,8 @@
+ { UInt cia, r1, lr; \
+ __asm__ __volatile__( \
+ "mflr 0;" /* r0 = lr */ \
+- "bl m_libcassert_get_ip;" /* lr = pc */ \
+- "m_libcassert_get_ip:\n" \
++ "bl 0f;" /* lr = pc */ \
++ "0:\n" \
+ "mflr %0;" /* %0 = pc */ \
+ "mtlr 0;" /* restore lr */ \
+ "mr %1,1;" /* %1 = r1 */ \
+@@ -100,8 +100,8 @@
+ { ULong cia, r1, lr; \
+ __asm__ __volatile__( \
+ "mflr 0;" /* r0 = lr */ \
+- "bl .m_libcassert_get_ip;" /* lr = pc */ \
+- ".m_libcassert_get_ip:\n" \
++ "bl 0f;" /* lr = pc */ \
++ "0:\n" \
+ "mflr %0;" /* %0 = pc */ \
+ "mtlr 0;" /* restore lr */ \
+ "mr %1,1;" /* %1 = r1 */ \
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 00000000..6af45531
--- /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 00000000..860e09c8
--- /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/files/valgrind-3.9.0-glibc-2.19.patch b/dev-util/valgrind/files/valgrind-3.9.0-glibc-2.19.patch
new file mode 100644
index 00000000..79a3283c
--- /dev/null
+++ b/dev-util/valgrind/files/valgrind-3.9.0-glibc-2.19.patch
@@ -0,0 +1,37 @@
+diff -Naur valgrind-3.9.0-orig/configure valgrind-3.9.0/configure
+--- valgrind-3.9.0-orig/configure 2013-11-01 09:33:32.000000000 +1000
++++ valgrind-3.9.0/configure 2014-02-08 09:28:06.063248544 +1000
+@@ -6689,6 +6689,16 @@
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
++ 2.19)
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: 2.19 family" >&5
++$as_echo "2.19 family" >&6; }
++
++$as_echo "#define GLIBC_2_19 1" >>confdefs.h
++
++ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
++ ;;
+ darwin)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5
+ $as_echo "Darwin" >&6; }
+diff -Naur valgrind-3.9.0-orig/configure.ac valgrind-3.9.0/configure.ac
+--- valgrind-3.9.0-orig/configure.ac 2013-11-01 09:28:16.000000000 +1000
++++ valgrind-3.9.0/configure.ac 2014-02-08 09:27:38.870385366 +1000
+@@ -918,6 +918,13 @@
+ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
+ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
+ ;;
++ 2.19)
++ AC_MSG_RESULT(2.19 family)
++ AC_DEFINE([GLIBC_2_19], 1, [Define to 1 if you're using glibc 2.19.x])
++ DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}"
++ DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}"
++ ;;
+ darwin)
+ AC_MSG_RESULT(Darwin)
+ AC_DEFINE([DARWIN_LIBC], 1, [Define to 1 if you're using Darwin])
diff --git a/dev-util/valgrind/metadata.xml b/dev-util/valgrind/metadata.xml
new file mode 100644
index 00000000..0bf3fac2
--- /dev/null
+++ b/dev-util/valgrind/metadata.xml
@@ -0,0 +1,24 @@
+<?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>
+ <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.10.1.ebuild b/dev-util/valgrind/valgrind-3.10.1.ebuild
new file mode 100644
index 00000000..4c1397a8
--- /dev/null
+++ b/dev-util/valgrind/valgrind-3.10.1.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+
+ # Yet more local labels, this time for ppc32 & ppc64
+ epatch "${FILESDIR}"/${PN}-3.6.0-local-labels.patch
+
+ # Don't build in empty assembly files for other platforms or we'll get a QA
+ # warning about executable stacks.
+ epatch "${FILESDIR}"/${PN}-3.10.1-non-exec-stack.patch
+
+ # glibc 2.19 fix
+ epatch "${FILESDIR}"/${PN}-3.9.0-glibc-2.19.patch
+
+ # valgrind works fine on linux-4, bug #543648
+ epatch "${FILESDIR}"/${PN}-3.10.1-linux-4.patch
+
+ # glibc 2.21 fix. Bug #554808.
+ epatch "${FILESDIR}"/${PN}-3.10.1-glibc-2.21.patch
+
+ # glibc 2.22 fix. Bug #580092
+ epatch "${FILESDIR}"/${PN}-3.10.1-glibc-2.22.patch
+
+ # Fix building with musl
+ epatch "${FILESDIR}"/${PN}-3.10.1-musl.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
+ # -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)
+ # -m64 -mx32 for multilib-portage, bug #398825
+ # -ggdb3 segmentation fault on startup
+ filter-flags -fomit-frame-pointer
+ filter-flags -fpie
+ 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.12.0.ebuild b/dev-util/valgrind/valgrind-3.12.0.ebuild
new file mode 100644
index 00000000..f26542b2
--- /dev/null
+++ b/dev-util/valgrind/valgrind-3.12.0.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+
+ # Fix for MUSL.
+ epatch "${FILESDIR}"/${PN}-3.11.0-musl.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"
+}