1 |
commit: 48d9937f30007dfef0ed8b82b6b3c941ed2b8bd5 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 5 04:07:07 2012 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 5 04:07:07 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/blueness.git;a=commit;h=48d9937f |
7 |
|
8 |
dev-util/valgrind: address bug #397429 |
9 |
|
10 |
(Portage version: 2.1.10.41/git/Linux x86_64, signed Manifest commit with key 0xD0455535) |
11 |
|
12 |
--- |
13 |
dev-util/valgrind/Manifest | 19 +++ |
14 |
.../files/valgrind-3.6.0-local-labels.patch | 24 ++++ |
15 |
.../files/valgrind-3.7.0-automake-1.11.2.patch | 24 ++++ |
16 |
.../files/valgrind-3.7.0-fix-gcc-regex.patch | 35 +++++ |
17 |
.../files/valgrind-3.7.0-fno-stack-protector.patch | 12 ++ |
18 |
.../files/valgrind-3.7.0-non-exec-stack.patch | 138 ++++++++++++++++++++ |
19 |
.../files/valgrind-3.7.0-respect-flags.patch | 13 ++ |
20 |
dev-util/valgrind/metadata.xml | 23 ++++ |
21 |
dev-util/valgrind/valgrind-3.7.0-r2.ebuild | 88 +++++++++++++ |
22 |
9 files changed, 376 insertions(+), 0 deletions(-) |
23 |
|
24 |
diff --git a/dev-util/valgrind/Manifest b/dev-util/valgrind/Manifest |
25 |
new file mode 100644 |
26 |
index 0000000..ed658ba |
27 |
--- /dev/null |
28 |
+++ b/dev-util/valgrind/Manifest |
29 |
@@ -0,0 +1,19 @@ |
30 |
+-----BEGIN PGP SIGNED MESSAGE----- |
31 |
+Hash: SHA256 |
32 |
+ |
33 |
+AUX valgrind-3.6.0-local-labels.patch 1388 RMD160 e9c0064d1e857f1e616c5d9ca7a03e78eae3d5ab SHA1 173820d5671f56c864850c2d8df9d6d301dfda38 SHA256 34ae13eda378677f1e662e0813f138de9b897d6592d20872c58ed8ac1bcf7def |
34 |
+AUX valgrind-3.7.0-automake-1.11.2.patch 1012 RMD160 7a0bbe583423d3fb313040ceb7f9a2baa928b221 SHA1 cd9c95a3701ea9eb2e2caa3439b8c2e2ba3cdc9f SHA256 416939b3f6722992f3023a5f8e4df8713a8aaa2b184b14a57a094d4627040599 |
35 |
+AUX valgrind-3.7.0-fix-gcc-regex.patch 1723 RMD160 f4fdc113f58d7151315f6a65a262471d4f8a75db SHA1 7ed537bcc935a40001a3d11fbff353e9cee342d5 SHA256 3a587d7dcc1ed447cc006cfef0cfb3597f17c96ac8adc7adbdc14d313a1d6852 |
36 |
+AUX valgrind-3.7.0-fno-stack-protector.patch 554 RMD160 df9a699ff35cf867e17b04a200c5e68015955167 SHA1 ed6368061d47448a597f6a2a9635f66e244b5a13 SHA256 83ed90a0e8a8b06dca8aad4e7f1a12e3c84621d502427c0913b72740b310f479 |
37 |
+AUX valgrind-3.7.0-non-exec-stack.patch 5644 RMD160 86178ee97653b2b4074e98e2342c5104583fa759 SHA1 8074a41b2e8915fa3a63ce827a14088949057bed SHA256 4de10480b6e27379083203df3cfedccdace68d0aad611440478ca2f1b2f89751 |
38 |
+AUX valgrind-3.7.0-respect-flags.patch 360 RMD160 b3ca9a393a68d312fa12cd272720e67c8661cfc4 SHA1 2ca0d9474bd4a81d45981bc8433359832d1ce8b9 SHA256 6b1e5938ecafc29428a698296423c71924848b1e746d6ee8a0f1dd91141f1019 |
39 |
+DIST valgrind-3.7.0.tar.bz2 6624216 RMD160 6ffbf04a8ff4eb2555d1a6bd87c0656828830761 SHA1 b412f49895bb8a78fc314047119760b5d36e5b5e SHA256 5d62c0330f1481fe2c593249192fa68ff454c19c34343978cc9ce91aa324cbf6 |
40 |
+EBUILD valgrind-3.7.0-r2.ebuild 2827 RMD160 2bd96b971686e20678b49de02f9a705db9c7ca2f SHA1 c24fc712b76261be8161a3939f9ae443b983ef45 SHA256 abae11fa86b3c4d8f445d7337e1078b563952b7b09bf70c216c260065bbe850e |
41 |
+MISC metadata.xml 980 RMD160 7441340fd2659400fb15d857446dac8f7b3f1176 SHA1 07af40cb309fcd80ca639dea5110b1109ce72427 SHA256 513a0d653dfae858a7f426745bd0abe5dcbc8748d468310fdce156e0e21e2cd0 |
42 |
+-----BEGIN PGP SIGNATURE----- |
43 |
+Version: GnuPG v2.0.17 (GNU/Linux) |
44 |
+ |
45 |
+iEUEAREIAAYFAk8FIesACgkQl5yvQNBFVTU9ggCgjvm5PuJOPgcRlLwgdrs+feMH |
46 |
+XvoAljiKcTzl/8Hi2MxIp/AsXO7aKCY= |
47 |
+=3Zpf |
48 |
+-----END PGP SIGNATURE----- |
49 |
|
50 |
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 |
51 |
new file mode 100644 |
52 |
index 0000000..68e6822 |
53 |
--- /dev/null |
54 |
+++ b/dev-util/valgrind/files/valgrind-3.6.0-local-labels.patch |
55 |
@@ -0,0 +1,24 @@ |
56 |
+--- coregrind/m_libcassert.c 2010-10-21 04:19:45.000000000 +0800 |
57 |
++++ coregrind/m_libcassert.c 2010-10-24 20:23:17.800001876 +0800 |
58 |
+@@ -81,8 +81,8 @@ |
59 |
+ { UInt cia, r1, lr; \ |
60 |
+ __asm__ __volatile__( \ |
61 |
+ "mflr 0;" /* r0 = lr */ \ |
62 |
+- "bl m_libcassert_get_ip;" /* lr = pc */ \ |
63 |
+- "m_libcassert_get_ip:\n" \ |
64 |
++ "bl 0f;" /* lr = pc */ \ |
65 |
++ "0:\n" \ |
66 |
+ "mflr %0;" /* %0 = pc */ \ |
67 |
+ "mtlr 0;" /* restore lr */ \ |
68 |
+ "mr %1,1;" /* %1 = r1 */ \ |
69 |
+@@ -100,8 +100,8 @@ |
70 |
+ { ULong cia, r1, lr; \ |
71 |
+ __asm__ __volatile__( \ |
72 |
+ "mflr 0;" /* r0 = lr */ \ |
73 |
+- "bl .m_libcassert_get_ip;" /* lr = pc */ \ |
74 |
+- ".m_libcassert_get_ip:\n" \ |
75 |
++ "bl 0f;" /* lr = pc */ \ |
76 |
++ "0:\n" \ |
77 |
+ "mflr %0;" /* %0 = pc */ \ |
78 |
+ "mtlr 0;" /* restore lr */ \ |
79 |
+ "mr %1,1;" /* %1 = r1 */ \ |
80 |
|
81 |
diff --git a/dev-util/valgrind/files/valgrind-3.7.0-automake-1.11.2.patch b/dev-util/valgrind/files/valgrind-3.7.0-automake-1.11.2.patch |
82 |
new file mode 100644 |
83 |
index 0000000..2c286f9 |
84 |
--- /dev/null |
85 |
+++ b/dev-util/valgrind/files/valgrind-3.7.0-automake-1.11.2.patch |
86 |
@@ -0,0 +1,24 @@ |
87 |
+diff -Naur valgrind-3.7.0.orig//coregrind/Makefile.am valgrind-3.7.0/coregrind/Makefile.am |
88 |
+--- valgrind-3.7.0.orig//coregrind/Makefile.am 2012-01-04 22:46:34.000000000 -0500 |
89 |
++++ valgrind-3.7.0/coregrind/Makefile.am 2012-01-04 22:48:51.000000000 -0500 |
90 |
+@@ -495,7 +495,7 @@ |
91 |
+ m_gdbserver/powerpc-altivec64l.xml |
92 |
+ |
93 |
+ # so as to make sure these get copied into the install tree |
94 |
+-pkglib_DATA = $(GDBSERVER_XML_FILES) |
95 |
++pkgdata_DATA = $(GDBSERVER_XML_FILES) |
96 |
+ |
97 |
+ # so as to make sure these get copied into the tarball |
98 |
+ EXTRA_DIST += $(GDBSERVER_XML_FILES) |
99 |
+diff -Naur valgrind-3.7.0.orig//Makefile.am valgrind-3.7.0/Makefile.am |
100 |
+--- valgrind-3.7.0.orig//Makefile.am 2011-10-26 17:24:45.000000000 -0400 |
101 |
++++ valgrind-3.7.0/Makefile.am 2012-01-04 22:48:58.000000000 -0500 |
102 |
+@@ -61,7 +61,7 @@ |
103 |
+ # default.supp, as it is built from the base .supp files at compile-time. |
104 |
+ dist_noinst_DATA = $(SUPP_FILES) |
105 |
+ |
106 |
+-pkglib_DATA = default.supp |
107 |
++pkgdata_DATA = default.supp |
108 |
+ |
109 |
+ pkgconfigdir = $(libdir)/pkgconfig |
110 |
+ pkgconfig_DATA = valgrind.pc |
111 |
|
112 |
diff --git a/dev-util/valgrind/files/valgrind-3.7.0-fix-gcc-regex.patch b/dev-util/valgrind/files/valgrind-3.7.0-fix-gcc-regex.patch |
113 |
new file mode 100644 |
114 |
index 0000000..feabf06 |
115 |
--- /dev/null |
116 |
+++ b/dev-util/valgrind/files/valgrind-3.7.0-fix-gcc-regex.patch |
117 |
@@ -0,0 +1,35 @@ |
118 |
+Index: configure.in |
119 |
+=================================================================== |
120 |
+--- configure.in (revision 12273) |
121 |
++++ configure.in (revision 12274) |
122 |
+@@ -98,18 +98,21 @@ |
123 |
+ # We don't want gcc < 3.0 |
124 |
+ AC_MSG_CHECKING([for a supported version of gcc]) |
125 |
+ |
126 |
+-# Try to get the gcc version, sed-ing out some unexpected stuff |
127 |
+-# that appears with the default gcc on OSX 10.6 and 10.7 respectively. |
128 |
+-# Without this, the version number comes out as 686, 10 or 11 :-( |
129 |
++# Obtain the compiler version. |
130 |
+ # |
131 |
+-# i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) |
132 |
+-# i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00) |
133 |
++# A few examples of how the ${CC} --version output looks like: |
134 |
+ # |
135 |
++# Arch Linux: i686-pc-linux-gnu-gcc (GCC) 4.6.2 |
136 |
++# Debian Linux: gcc (Debian 4.3.2-1.1) 4.3.2 |
137 |
++# openSUSE: gcc (SUSE Linux) 4.5.1 20101208 [gcc-4_5-branch revision 167585] |
138 |
++# Exherbo Linux: x86_64-pc-linux-gnu-gcc (Exherbo gcc-4.6.2) 4.6.2 |
139 |
++# OS/X 10.6: i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) |
140 |
++# OS/X 10.7: i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00) |
141 |
++# Clang: clang version 2.9 (tags/RELEASE_29/final) |
142 |
++# |
143 |
+ [gcc_version=`${CC} --version \ |
144 |
+- | head -n 1 \ |
145 |
+- | $SED 's/i686-apple-darwin10//' \ |
146 |
+- | $SED 's/i686-apple-darwin11//' \ |
147 |
+- | $SED 's/^[^0-9]*\([0-9.]*\).*$/\1/'`] |
148 |
++ | $SED -n -e 's/[^ ]*gcc[^ ]* ([^)]*) \([0-9.]*\).*$/\1/p' \ |
149 |
++ -e 's/[^ ]*clang version \([0-9.]*\).*$/\1/p'`] |
150 |
+ |
151 |
+ is_clang="notclang" |
152 |
+ if test "x`${CC} --version | head -n 1 | $SED 's/\(clang\) version.*/\1/'`" = "xclang" ; then |
153 |
|
154 |
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 |
155 |
new file mode 100644 |
156 |
index 0000000..6af4553 |
157 |
--- /dev/null |
158 |
+++ b/dev-util/valgrind/files/valgrind-3.7.0-fno-stack-protector.patch |
159 |
@@ -0,0 +1,12 @@ |
160 |
+diff -Naur valgrind-3.7.0.orig//Makefile.all.am valgrind-3.7.0/Makefile.all.am |
161 |
+--- valgrind-3.7.0.orig//Makefile.all.am 2011-10-26 17:24:45.000000000 -0400 |
162 |
++++ valgrind-3.7.0/Makefile.all.am 2011-11-10 16:18:18.000000000 -0500 |
163 |
+@@ -82,7 +82,7 @@ |
164 |
+ # performance and get whatever useful warnings we can out of gcc. |
165 |
+ # -fno-builtin is important for defeating LLVM's idiom recognition |
166 |
+ # that somehow causes VG_(memset) to get into infinite recursion. |
167 |
+-AM_CFLAGS_BASE = \ |
168 |
++AM_CFLAGS_BASE = -fno-stack-protector \ |
169 |
+ -O2 -g \ |
170 |
+ -Wall \ |
171 |
+ -Wmissing-prototypes \ |
172 |
|
173 |
diff --git a/dev-util/valgrind/files/valgrind-3.7.0-non-exec-stack.patch b/dev-util/valgrind/files/valgrind-3.7.0-non-exec-stack.patch |
174 |
new file mode 100644 |
175 |
index 0000000..d6cc26d |
176 |
--- /dev/null |
177 |
+++ b/dev-util/valgrind/files/valgrind-3.7.0-non-exec-stack.patch |
178 |
@@ -0,0 +1,138 @@ |
179 |
+diff -Naur valgrind-3.7.0.orig//coregrind/Makefile.am valgrind-3.7.0/coregrind/Makefile.am |
180 |
+--- valgrind-3.7.0.orig//coregrind/Makefile.am 2011-11-10 20:02:47.000000000 -0500 |
181 |
++++ valgrind-3.7.0/coregrind/Makefile.am 2011-11-10 20:03:00.000000000 -0500 |
182 |
+@@ -292,14 +292,6 @@ |
183 |
+ m_demangle/demangle.c \ |
184 |
+ m_demangle/dyn-string.c \ |
185 |
+ m_demangle/safe-ctype.c \ |
186 |
+- m_dispatch/dispatch-x86-linux.S \ |
187 |
+- m_dispatch/dispatch-amd64-linux.S \ |
188 |
+- m_dispatch/dispatch-ppc32-linux.S \ |
189 |
+- m_dispatch/dispatch-ppc64-linux.S \ |
190 |
+- m_dispatch/dispatch-arm-linux.S \ |
191 |
+- m_dispatch/dispatch-s390x-linux.S \ |
192 |
+- m_dispatch/dispatch-x86-darwin.S \ |
193 |
+- m_dispatch/dispatch-amd64-darwin.S \ |
194 |
+ m_gdbserver/m_gdbserver.c \ |
195 |
+ m_gdbserver/inferiors.c \ |
196 |
+ m_gdbserver/m_gdbserver.c \ |
197 |
+@@ -322,8 +314,6 @@ |
198 |
+ m_initimg/initimg-pathscan.c \ |
199 |
+ m_mach/mach_basics.c \ |
200 |
+ m_mach/mach_msg.c \ |
201 |
+- m_mach/mach_traps-x86-darwin.S \ |
202 |
+- m_mach/mach_traps-amd64-darwin.S \ |
203 |
+ m_replacemalloc/replacemalloc_core.c \ |
204 |
+ m_scheduler/scheduler.c \ |
205 |
+ m_scheduler/sema.c \ |
206 |
+@@ -335,14 +325,6 @@ |
207 |
+ m_sigframe/sigframe-s390x-linux.c \ |
208 |
+ m_sigframe/sigframe-x86-darwin.c \ |
209 |
+ m_sigframe/sigframe-amd64-darwin.c \ |
210 |
+- m_syswrap/syscall-x86-linux.S \ |
211 |
+- m_syswrap/syscall-amd64-linux.S \ |
212 |
+- m_syswrap/syscall-ppc32-linux.S \ |
213 |
+- m_syswrap/syscall-ppc64-linux.S \ |
214 |
+- m_syswrap/syscall-arm-linux.S \ |
215 |
+- m_syswrap/syscall-s390x-linux.S \ |
216 |
+- m_syswrap/syscall-x86-darwin.S \ |
217 |
+- m_syswrap/syscall-amd64-darwin.S \ |
218 |
+ m_syswrap/syswrap-main.c \ |
219 |
+ m_syswrap/syswrap-generic.c \ |
220 |
+ m_syswrap/syswrap-linux.c \ |
221 |
+@@ -361,6 +343,24 @@ |
222 |
+ m_ume/main.c \ |
223 |
+ m_ume/script.c |
224 |
+ |
225 |
++COREGRIND_SOURCES_COMMON += \ |
226 |
++ m_dispatch/dispatch-@VGCONF_ARCH_PRI@-@VGCONF_OS@.S \ |
227 |
++ m_syswrap/syscall-@VGCONF_ARCH_PRI@-@VGCONF_OS@.S |
228 |
++ |
229 |
++if VGCONF_HAVE_PLATFORM_SEC |
230 |
++COREGRIND_SOURCES_COMMON += \ |
231 |
++ m_dispatch/dispatch-@VGCONF_ARCH_SEC@-@VGCONF_OS@.S \ |
232 |
++ m_syswrap/syscall-@VGCONF_ARCH_SEC@-@VGCONF_OS@.S |
233 |
++endif |
234 |
++ |
235 |
++if VGCONF_OS_IS_DARWIN |
236 |
++COREGRIND_SOURCES_COMMON += \ |
237 |
++ m_start-@VGCONF_ARCH_PRI@-darwin.S \ |
238 |
++ m_start-@VGCONF_ARCH_SEC@-darwin.S \ |
239 |
++ m_mach/mach_traps-@VGCONF_ARCH_PRI@-darwin.S \ |
240 |
++ m_mach/mach_traps-@VGCONF_ARCH_SEC@-darwin.S |
241 |
++endif |
242 |
++ |
243 |
+ libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \ |
244 |
+ $(COREGRIND_SOURCES_COMMON) |
245 |
+ nodist_libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \ |
246 |
+diff -Naur valgrind-3.7.0.orig//coregrind/m_dispatch/dispatch-amd64-linux.S valgrind-3.7.0/coregrind/m_dispatch/dispatch-amd64-linux.S |
247 |
+--- valgrind-3.7.0.orig//coregrind/m_dispatch/dispatch-amd64-linux.S 2011-10-26 17:24:42.000000000 -0400 |
248 |
++++ valgrind-3.7.0/coregrind/m_dispatch/dispatch-amd64-linux.S 2011-11-10 20:07:40.000000000 -0500 |
249 |
+@@ -349,11 +349,11 @@ |
250 |
+ ret |
251 |
+ .size VG_(run_a_noredir_translation), .-VG_(run_a_noredir_translation) |
252 |
+ |
253 |
++#endif // defined(VGP_amd64_linux) |
254 |
++ |
255 |
+ /* Let the linker know we don't need an executable stack */ |
256 |
+ .section .note.GNU-stack,"",@progbits |
257 |
+ |
258 |
+-#endif // defined(VGP_amd64_linux) |
259 |
+- |
260 |
+ /*--------------------------------------------------------------------*/ |
261 |
+ /*--- end ---*/ |
262 |
+ /*--------------------------------------------------------------------*/ |
263 |
+diff -Naur valgrind-3.7.0.orig//coregrind/m_dispatch/dispatch-x86-linux.S valgrind-3.7.0/coregrind/m_dispatch/dispatch-x86-linux.S |
264 |
+--- valgrind-3.7.0.orig//coregrind/m_dispatch/dispatch-x86-linux.S 2011-10-26 17:24:42.000000000 -0400 |
265 |
++++ valgrind-3.7.0/coregrind/m_dispatch/dispatch-x86-linux.S 2011-11-10 20:04:07.000000000 -0500 |
266 |
+@@ -320,12 +320,11 @@ |
267 |
+ ret |
268 |
+ .size VG_(run_a_noredir_translation), .-VG_(run_a_noredir_translation) |
269 |
+ |
270 |
+- |
271 |
++#endif // defined(VGP_x86_linux) |
272 |
++ |
273 |
+ /* Let the linker know we don't need an executable stack */ |
274 |
+ .section .note.GNU-stack,"",@progbits |
275 |
+ |
276 |
+-#endif // defined(VGP_x86_linux) |
277 |
+- |
278 |
+ /*--------------------------------------------------------------------*/ |
279 |
+ /*--- end ---*/ |
280 |
+ /*--------------------------------------------------------------------*/ |
281 |
+diff -Naur valgrind-3.7.0.orig//coregrind/m_syswrap/syscall-amd64-linux.S valgrind-3.7.0/coregrind/m_syswrap/syscall-amd64-linux.S |
282 |
+--- valgrind-3.7.0.orig//coregrind/m_syswrap/syscall-amd64-linux.S 2011-11-10 20:02:47.000000000 -0500 |
283 |
++++ valgrind-3.7.0/coregrind/m_syswrap/syscall-amd64-linux.S 2011-11-10 20:03:00.000000000 -0500 |
284 |
+@@ -205,11 +205,11 @@ |
285 |
+ ML_(blksys_finished): .quad 5b |
286 |
+ .previous |
287 |
+ |
288 |
++#endif // defined(VGP_amd64_linux) |
289 |
++ |
290 |
+ /* Let the linker know we don't need an executable stack */ |
291 |
+ .section .note.GNU-stack,"",@progbits |
292 |
+ |
293 |
+-#endif // defined(VGP_amd64_linux) |
294 |
+- |
295 |
+ /*--------------------------------------------------------------------*/ |
296 |
+ /*--- end ---*/ |
297 |
+ /*--------------------------------------------------------------------*/ |
298 |
+diff -Naur valgrind-3.7.0.orig//coregrind/m_syswrap/syscall-x86-linux.S valgrind-3.7.0/coregrind/m_syswrap/syscall-x86-linux.S |
299 |
+--- valgrind-3.7.0.orig//coregrind/m_syswrap/syscall-x86-linux.S 2011-11-10 20:02:47.000000000 -0500 |
300 |
++++ valgrind-3.7.0/coregrind/m_syswrap/syscall-x86-linux.S 2011-11-10 20:03:00.000000000 -0500 |
301 |
+@@ -164,12 +164,12 @@ |
302 |
+ ML_(blksys_committed): .long 4b |
303 |
+ ML_(blksys_finished): .long 5b |
304 |
+ .previous |
305 |
+- |
306 |
+-/* Let the linker know we don't need an executable stack */ |
307 |
+-.section .note.GNU-stack,"",@progbits |
308 |
+ |
309 |
+ #endif // defined(VGP_x86_linux) |
310 |
+ |
311 |
++/* Let the linker know we don't need an executable stack */ |
312 |
++.section .note.GNU-stack,"",@progbits |
313 |
++ |
314 |
+ /*--------------------------------------------------------------------*/ |
315 |
+ /*--- end ---*/ |
316 |
+ /*--------------------------------------------------------------------*/ |
317 |
|
318 |
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 |
319 |
new file mode 100644 |
320 |
index 0000000..860e09c |
321 |
--- /dev/null |
322 |
+++ b/dev-util/valgrind/files/valgrind-3.7.0-respect-flags.patch |
323 |
@@ -0,0 +1,13 @@ |
324 |
+diff -Naur valgrind-3.7.0.orig//mpi/Makefile.am valgrind-3.7.0/mpi/Makefile.am |
325 |
+--- valgrind-3.7.0.orig//mpi/Makefile.am 2011-10-26 17:24:23.000000000 -0400 |
326 |
++++ valgrind-3.7.0/mpi/Makefile.am 2011-11-10 16:03:14.000000000 -0500 |
327 |
+@@ -7,9 +7,6 @@ |
328 |
+ CC = $(MPI_CC) |
329 |
+ DEFS = |
330 |
+ DEFAULT_INCLUDES = |
331 |
+-CPPFLAGS = |
332 |
+-CFLAGS = |
333 |
+-LDFLAGS = |
334 |
+ |
335 |
+ EXTRA_DIST = \ |
336 |
+ mpiwrap_type_test.c |
337 |
|
338 |
diff --git a/dev-util/valgrind/metadata.xml b/dev-util/valgrind/metadata.xml |
339 |
new file mode 100644 |
340 |
index 0000000..92870ed |
341 |
--- /dev/null |
342 |
+++ b/dev-util/valgrind/metadata.xml |
343 |
@@ -0,0 +1,23 @@ |
344 |
+<?xml version="1.0" encoding="UTF-8"?> |
345 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
346 |
+<pkgmetadata> |
347 |
+ <maintainer> |
348 |
+ <email>blueness@g.o</email> |
349 |
+ </maintainer> |
350 |
+ <longdescription> |
351 |
+ Valgrind is a GPL'd tool to help you find memory-management problems |
352 |
+ in your programs. When a program is run under Valgrind's supervision, |
353 |
+ all reads and writes of memory are checked, and calls to |
354 |
+ malloc/new/free/delete are intercepted. As a result, Valgrind can |
355 |
+ detect problems such as |
356 |
+ |
357 |
+ - Use of uninitialised memory |
358 |
+ - Reading/writing memory after it has been free'd |
359 |
+ - Reading/writing off the end of malloc'd blocks |
360 |
+ - Reading/writing inappropriate areas on the stack |
361 |
+ - Memory leaks -- where pointers to malloc'd blocks are lost forever |
362 |
+ - Passing of uninitialised and/or unaddressible memory to system calls |
363 |
+ - Mismatched use of malloc/new/new [] vs free/delete/delete [] |
364 |
+ - Some abuses of the POSIX Pthreads API |
365 |
+ </longdescription> |
366 |
+</pkgmetadata> |
367 |
|
368 |
diff --git a/dev-util/valgrind/valgrind-3.7.0-r2.ebuild b/dev-util/valgrind/valgrind-3.7.0-r2.ebuild |
369 |
new file mode 100644 |
370 |
index 0000000..729a48a |
371 |
--- /dev/null |
372 |
+++ b/dev-util/valgrind/valgrind-3.7.0-r2.ebuild |
373 |
@@ -0,0 +1,88 @@ |
374 |
+# Copyright 1999-2011 Gentoo Foundation |
375 |
+# Distributed under the terms of the GNU General Public License v2 |
376 |
+# $Header: /var/cvsroot/gentoo-x86/dev-util/valgrind/valgrind-3.7.0-r1.ebuild,v 1.1 2011/11/23 19:19:48 blueness Exp $ |
377 |
+ |
378 |
+EAPI=4 |
379 |
+inherit autotools eutils flag-o-matic toolchain-funcs multilib pax-utils |
380 |
+ |
381 |
+DESCRIPTION="An open-source memory debugger for GNU/Linux" |
382 |
+HOMEPAGE="http://www.valgrind.org" |
383 |
+SRC_URI="http://www.valgrind.org/downloads/${P}.tar.bz2" |
384 |
+ |
385 |
+LICENSE="GPL-2" |
386 |
+SLOT="0" |
387 |
+KEYWORDS="-* ~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" |
388 |
+IUSE="mpi" |
389 |
+ |
390 |
+DEPEND="mpi? ( virtual/mpi )" |
391 |
+RDEPEND="${DEPEND}" |
392 |
+ |
393 |
+src_prepare() { |
394 |
+ # Correct hard coded doc location |
395 |
+ sed -i -e "s:doc/valgrind:doc/${PF}:" docs/Makefile.am || die |
396 |
+ |
397 |
+ # Respect CFLAGS, LDFLAGS |
398 |
+ epatch "${FILESDIR}"/${PN}-3.7.0-respect-flags.patch |
399 |
+ |
400 |
+ # Changing Makefile.all.am to disable SSP |
401 |
+ epatch "${FILESDIR}"/${PN}-3.7.0-fno-stack-protector.patch |
402 |
+ |
403 |
+ # Yet more local labels, this time for ppc32 & ppc64 |
404 |
+ epatch "${FILESDIR}"/${PN}-3.6.0-local-labels.patch |
405 |
+ |
406 |
+ # Don't build in empty assembly files for other platforms or we'll get a QA |
407 |
+ # warning about executable stacks. |
408 |
+ epatch "${FILESDIR}"/${PN}-3.7.0-non-exec-stack.patch |
409 |
+ |
410 |
+ # Fix the regex to get gcc's version |
411 |
+ epatch "${FILESDIR}"/${PN}-3.7.0-fix-gcc-regex.patch |
412 |
+ |
413 |
+ # Fix stricter use of dir variables, bug #397429 |
414 |
+ epatch "${FILESDIR}"/${PN}-3.7.0-automake-1.11.2.patch |
415 |
+ |
416 |
+ # Regenerate autotools files |
417 |
+ eautoreconf |
418 |
+} |
419 |
+ |
420 |
+src_configure() { |
421 |
+ local myconf |
422 |
+ |
423 |
+ # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression" |
424 |
+ # while compiling insn_sse.c in none/tests/x86 |
425 |
+ # -fpie valgrind seemingly hangs when built with pie on |
426 |
+ # amd64 (bug #102157) |
427 |
+ # -fstack-protector more undefined references to __guard and __stack_smash_handler |
428 |
+ # because valgrind doesn't link to glibc (bug #114347) |
429 |
+ # -ggdb3 segmentation fault on startup |
430 |
+ filter-flags -fomit-frame-pointer |
431 |
+ filter-flags -fpie |
432 |
+ filter-flags -fstack-protector |
433 |
+ replace-flags -ggdb3 -ggdb2 |
434 |
+ |
435 |
+ if use amd64 || use ppc64; then |
436 |
+ ! has_multilib_profile && myconf="${myconf} --enable-only64bit" |
437 |
+ fi |
438 |
+ |
439 |
+ # Don't use mpicc unless the user asked for it (bug #258832) |
440 |
+ if ! use mpi; then |
441 |
+ myconf="${myconf} --without-mpicc" |
442 |
+ fi |
443 |
+ |
444 |
+ econf ${myconf} |
445 |
+} |
446 |
+ |
447 |
+src_install() { |
448 |
+ emake DESTDIR="${D}" install |
449 |
+ dodoc AUTHORS FAQ.txt NEWS README* |
450 |
+ |
451 |
+ pax-mark m "${D}"/usr/$(get_libdir)/valgrind/*-*-linux |
452 |
+} |
453 |
+ |
454 |
+pkg_postinst() { |
455 |
+ ewarn "Valgrind will not work if glibc does not have debug symbols." |
456 |
+ ewarn "To fix this you can add splitdebug to FEATURES in make.conf" |
457 |
+ ewarn "and remerge glibc. See:" |
458 |
+ ewarn "https://bugs.gentoo.org/show_bug.cgi?id=214065" |
459 |
+ ewarn "https://bugs.gentoo.org/show_bug.cgi?id=274771" |
460 |
+ ewarn "https://bugs.gentoo.org/show_bug.cgi?id=388703" |
461 |
+} |