Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/valgrind/, dev-util/valgrind/files/
Date: Sat, 26 Sep 2015 11:01:13
Message-Id: 1443265567.8f9cf7a11173a39580ba875fcfbbfd6d307a0579.blueness@gentoo
1 commit: 8f9cf7a11173a39580ba875fcfbbfd6d307a0579
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 26 11:05:44 2015 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 26 11:06:07 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f9cf7a1
7
8 dev-util/valgrind: version bump to 3.11.0
9
10 Package-Manager: portage-2.2.20.1
11
12 dev-util/valgrind/Manifest | 1 +
13 .../files/valgrind-3.11.0-non-exec-stack.patch | 154 +++++++++++++++++++++
14 dev-util/valgrind/valgrind-3.11.0.ebuild | 106 ++++++++++++++
15 3 files changed, 261 insertions(+)
16
17 diff --git a/dev-util/valgrind/Manifest b/dev-util/valgrind/Manifest
18 index 1073c90..418783d 100644
19 --- a/dev-util/valgrind/Manifest
20 +++ b/dev-util/valgrind/Manifest
21 @@ -1,4 +1,5 @@
22 DIST valgrind-3.10.1.tar.bz2 10967905 SHA256 fa253dc26ddb661b6269df58144eff607ea3f76a9bcfe574b0c7726e1dfcb997 SHA512 8f3d27637c13b06381b3dd44088244e0cf2f7008f40e46f34322f2a5bfa6373d29ce68ff49f19c48f1a5f139d8be5838b9606206e0ce2599c5f74c0db8ce2642 WHIRLPOOL 3d55f35b02195d9859d9192726ea708277f1d3339005d959baa224822c5b71f5347cdd28c7fd8153c10d1e3282855e853caf9c7192751bebdbbc3444c33d885a
23 +DIST valgrind-3.11.0.tar.bz2 11910809 SHA256 6c396271a8c1ddd5a6fb9abe714ea1e8a86fce85b30ab26b4266aeb4c2413b42 SHA512 a25f97fa80aef4ad1e86b303886cd7a97aac248820a4c24e3d3dc26567dd7d2d86db237866468fd43885a9fb8534cb0a8e301a3c752fffbc231a2842272999da WHIRLPOOL a881df25e64789954d9bcb44617fd92d832ae9953689c01f8f79d737379c523a6f3a8125283518a6f256770a5c4f204b7b859794cf714abb0a742a69b272ef0e
24 DIST valgrind-3.7.0.tar.bz2 6624216 SHA256 5d62c0330f1481fe2c593249192fa68ff454c19c34343978cc9ce91aa324cbf6 SHA512 0ccf6607fe6d26f0dc0f3d6e45f84645925d0a90ce4ecf6acfc6b4d374d3e909b2a628b03c0a964a45d2462cca6877f818a5f72b3e4a5bbf3a2d9b8a9a343d5f WHIRLPOOL 44bf8c423d6f3222f5e777333acc21e94dfa680509b2152289129961296d8afc090466b6407248b6e172b3c42da5448206f257bd63f8e44aba01007f92a6fde1
25 DIST valgrind-3.8.1.tar.bz2 7962963 SHA256 473be00576bed311a662b277a2bfbe97d9cca4058e68619a0e420c9fc19958db SHA512 ba31f5d43bd2d9533846bed6456a0eae40ac071ff8732201dd75c9e2cd7e9ce3224cb5928b9c8fc859a75ce6867a9b6a1fb2ba8ab62cd3944893d6d4156ab25c WHIRLPOOL 81e63bb649455ed29fcd60fc7f3cebde456a610118b9b24530d3b2e8aa4a7561369e992af86ffb158e1f7fc0db7b91738564402931a947a79bb789bd26a8e065
26 DIST valgrind-3.9.0.tar.bz2 10003156 SHA256 e6af71a06bc2534541b07743e1d58dc3caf744f38205ca3e5b5a0bdf372ed6f0 SHA512 4b748f9f9a647df50db75fb56f83ee2f25bad9f1f4e4f05c4ac1d1e919e6cd954975c1f325dbedb509c44be1a8516ac2a5f269090946a0d728166ab183016c7b WHIRLPOOL e73c4dcdff829a34889f5654c5ec314f32d2c33f9e64bde3f811359a252749a6c677db80bf2aa2647f935cd38a0ccc19c0358a7b13198032c5d636f97e9e71de
27
28 diff --git a/dev-util/valgrind/files/valgrind-3.11.0-non-exec-stack.patch b/dev-util/valgrind/files/valgrind-3.11.0-non-exec-stack.patch
29 new file mode 100644
30 index 0000000..b5c151a
31 --- /dev/null
32 +++ b/dev-util/valgrind/files/valgrind-3.11.0-non-exec-stack.patch
33 @@ -0,0 +1,154 @@
34 +diff -Naur valgrind-3.11.0.orig/coregrind/Makefile.am valgrind-3.11.0/coregrind/Makefile.am
35 +--- valgrind-3.11.0.orig/coregrind/Makefile.am 2015-09-08 09:23:26.000000000 -0400
36 ++++ valgrind-3.11.0/coregrind/Makefile.am 2015-09-26 06:52:04.226983707 -0400
37 +@@ -354,21 +354,6 @@
38 + m_demangle/demangle.c \
39 + m_demangle/dyn-string.c \
40 + m_demangle/safe-ctype.c \
41 +- m_dispatch/dispatch-x86-linux.S \
42 +- m_dispatch/dispatch-amd64-linux.S \
43 +- m_dispatch/dispatch-ppc32-linux.S \
44 +- m_dispatch/dispatch-ppc64be-linux.S \
45 +- m_dispatch/dispatch-ppc64le-linux.S \
46 +- m_dispatch/dispatch-arm-linux.S \
47 +- m_dispatch/dispatch-arm64-linux.S \
48 +- m_dispatch/dispatch-s390x-linux.S \
49 +- m_dispatch/dispatch-mips32-linux.S \
50 +- m_dispatch/dispatch-mips64-linux.S \
51 +- m_dispatch/dispatch-tilegx-linux.S \
52 +- m_dispatch/dispatch-x86-darwin.S \
53 +- m_dispatch/dispatch-amd64-darwin.S \
54 +- m_dispatch/dispatch-x86-solaris.S \
55 +- m_dispatch/dispatch-amd64-solaris.S \
56 + m_gdbserver/inferiors.c \
57 + m_gdbserver/m_gdbserver.c \
58 + m_gdbserver/regcache.c \
59 +@@ -394,8 +379,6 @@
60 + m_initimg/initimg-pathscan.c \
61 + m_mach/mach_basics.c \
62 + m_mach/mach_msg.c \
63 +- m_mach/mach_traps-x86-darwin.S \
64 +- m_mach/mach_traps-amd64-darwin.S \
65 + m_replacemalloc/replacemalloc_core.c \
66 + m_scheduler/sched-lock.c \
67 + m_scheduler/sched-lock-generic.c \
68 +@@ -415,21 +398,6 @@
69 + m_sigframe/sigframe-x86-darwin.c \
70 + m_sigframe/sigframe-amd64-darwin.c \
71 + m_sigframe/sigframe-solaris.c \
72 +- m_syswrap/syscall-x86-linux.S \
73 +- m_syswrap/syscall-amd64-linux.S \
74 +- m_syswrap/syscall-ppc32-linux.S \
75 +- m_syswrap/syscall-ppc64be-linux.S \
76 +- m_syswrap/syscall-ppc64le-linux.S \
77 +- m_syswrap/syscall-arm-linux.S \
78 +- m_syswrap/syscall-arm64-linux.S \
79 +- m_syswrap/syscall-s390x-linux.S \
80 +- m_syswrap/syscall-mips32-linux.S \
81 +- m_syswrap/syscall-mips64-linux.S \
82 +- m_syswrap/syscall-tilegx-linux.S \
83 +- m_syswrap/syscall-x86-darwin.S \
84 +- m_syswrap/syscall-amd64-darwin.S \
85 +- m_syswrap/syscall-x86-solaris.S \
86 +- m_syswrap/syscall-amd64-solaris.S \
87 + m_syswrap/syswrap-main.c \
88 + m_syswrap/syswrap-generic.c \
89 + m_syswrap/syswrap-linux.c \
90 +@@ -456,6 +424,29 @@
91 + m_ume/main.c \
92 + m_ume/script.c
93 +
94 ++COREGRIND_SOURCES_COMMON += \
95 ++ m_dispatch/dispatch-@VGCONF_ARCH_PRI@-@VGCONF_OS@.S \
96 ++ m_syswrap/syscall-@VGCONF_ARCH_PRI@-@VGCONF_OS@.S
97 ++
98 ++if VGCONF_HAVE_PLATFORM_SEC
99 ++COREGRIND_SOURCES_COMMON += \
100 ++ m_dispatch/dispatch-@VGCONF_ARCH_SEC@-@VGCONF_OS@.S \
101 ++ m_syswrap/syscall-@VGCONF_ARCH_SEC@-@VGCONF_OS@.S
102 ++endif
103 ++
104 ++if VGCONF_OS_IS_DARWIN
105 ++COREGRIND_SOURCES_COMMON += \
106 ++ m_dispatch/dispatch-@VGCONF_ARCH_PRI@-darwin.S \
107 ++ m_syswrap/syscall-@VGCONF_ARCH_PRI@-darwin.S \
108 ++ m_mach/mach_traps-@VGCONF_ARCH_PRI@-darwin.S
109 ++if VGCONF_HAVE_PLATFORM_SEC
110 ++COREGRIND_SOURCES_COMMON += \
111 ++ m_dispatch/dispatch-@VGCONF_ARCH_SEC@-darwin.S \
112 ++ m_syswrap/syscall-@VGCONF_ARCH_SEC@-darwin.S \
113 ++ m_mach/mach_traps-@VGCONF_ARCH_SEC@-darwin.S
114 ++endif
115 ++endif
116 ++
117 + libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
118 + $(COREGRIND_SOURCES_COMMON)
119 + nodist_libcoregrind_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \
120 +diff -Naur valgrind-3.11.0.orig/coregrind/m_dispatch/dispatch-amd64-linux.S valgrind-3.11.0/coregrind/m_dispatch/dispatch-amd64-linux.S
121 +--- valgrind-3.11.0.orig/coregrind/m_dispatch/dispatch-amd64-linux.S 2015-09-08 09:23:26.000000000 -0400
122 ++++ valgrind-3.11.0/coregrind/m_dispatch/dispatch-amd64-linux.S 2015-09-26 06:46:20.103000200 -0400
123 +@@ -249,11 +249,11 @@
124 +
125 + .size VG_(disp_run_translations), .-VG_(disp_run_translations)
126 +
127 ++#endif // defined(VGP_amd64_linux)
128 ++
129 + /* Let the linker know we don't need an executable stack */
130 + .section .note.GNU-stack,"",@progbits
131 +
132 +-#endif // defined(VGP_amd64_linux)
133 +-
134 + /*--------------------------------------------------------------------*/
135 + /*--- end ---*/
136 + /*--------------------------------------------------------------------*/
137 +diff -Naur valgrind-3.11.0.orig/coregrind/m_dispatch/dispatch-x86-linux.S valgrind-3.11.0/coregrind/m_dispatch/dispatch-x86-linux.S
138 +--- valgrind-3.11.0.orig/coregrind/m_dispatch/dispatch-x86-linux.S 2015-09-08 09:23:26.000000000 -0400
139 ++++ valgrind-3.11.0/coregrind/m_dispatch/dispatch-x86-linux.S 2015-09-26 06:46:20.103000200 -0400
140 +@@ -240,11 +240,11 @@
141 +
142 + .size VG_(disp_run_translations), .-VG_(disp_run_translations)
143 +
144 ++#endif // defined(VGP_x86_linux)
145 ++
146 + /* Let the linker know we don't need an executable stack */
147 + .section .note.GNU-stack,"",@progbits
148 +
149 +-#endif // defined(VGP_x86_linux)
150 +-
151 + /*--------------------------------------------------------------------*/
152 + /*--- end ---*/
153 + /*--------------------------------------------------------------------*/
154 +diff -Naur valgrind-3.11.0.orig/coregrind/m_syswrap/syscall-amd64-linux.S valgrind-3.11.0/coregrind/m_syswrap/syscall-amd64-linux.S
155 +--- valgrind-3.11.0.orig/coregrind/m_syswrap/syscall-amd64-linux.S 2015-09-08 09:23:26.000000000 -0400
156 ++++ valgrind-3.11.0/coregrind/m_syswrap/syscall-amd64-linux.S 2015-09-26 06:46:20.103000200 -0400
157 +@@ -244,11 +244,11 @@
158 + ML_(blksys_finished): .quad 5b
159 + .previous
160 +
161 ++#endif // defined(VGP_amd64_linux)
162 ++
163 + /* Let the linker know we don't need an executable stack */
164 + .section .note.GNU-stack,"",@progbits
165 +
166 +-#endif // defined(VGP_amd64_linux)
167 +-
168 + /*--------------------------------------------------------------------*/
169 + /*--- end ---*/
170 + /*--------------------------------------------------------------------*/
171 +diff -Naur valgrind-3.11.0.orig/coregrind/m_syswrap/syscall-x86-linux.S valgrind-3.11.0/coregrind/m_syswrap/syscall-x86-linux.S
172 +--- valgrind-3.11.0.orig/coregrind/m_syswrap/syscall-x86-linux.S 2015-09-08 09:23:26.000000000 -0400
173 ++++ valgrind-3.11.0/coregrind/m_syswrap/syscall-x86-linux.S 2015-09-26 06:46:20.103000200 -0400
174 +@@ -184,11 +184,11 @@
175 + ML_(blksys_finished): .long 5b
176 + .previous
177 +
178 ++#endif // defined(VGP_x86_linux)
179 ++
180 + /* Let the linker know we don't need an executable stack */
181 + .section .note.GNU-stack,"",@progbits
182 +
183 +-#endif // defined(VGP_x86_linux)
184 +-
185 + /*--------------------------------------------------------------------*/
186 + /*--- end ---*/
187 + /*--------------------------------------------------------------------*/
188
189 diff --git a/dev-util/valgrind/valgrind-3.11.0.ebuild b/dev-util/valgrind/valgrind-3.11.0.ebuild
190 new file mode 100644
191 index 0000000..8b2d9ca
192 --- /dev/null
193 +++ b/dev-util/valgrind/valgrind-3.11.0.ebuild
194 @@ -0,0 +1,106 @@
195 +# Copyright 1999-2015 Gentoo Foundation
196 +# Distributed under the terms of the GNU General Public License v2
197 +# $Id$
198 +
199 +EAPI="5"
200 +inherit autotools eutils flag-o-matic toolchain-funcs multilib pax-utils
201 +
202 +DESCRIPTION="An open-source memory debugger for GNU/Linux"
203 +HOMEPAGE="http://www.valgrind.org"
204 +SRC_URI="http://www.valgrind.org/downloads/${P}.tar.bz2"
205 +
206 +LICENSE="GPL-2"
207 +SLOT="0"
208 +KEYWORDS="-* ~amd64 ~arm ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x86-macos"
209 +IUSE="mpi"
210 +
211 +DEPEND="mpi? ( virtual/mpi )"
212 +RDEPEND="${DEPEND}"
213 +
214 +src_prepare() {
215 + # Correct hard coded doc location
216 + sed -i -e "s:doc/valgrind:doc/${PF}:" docs/Makefile.am || die
217 +
218 + # Don't force multiarch stuff on OSX, bug #306467
219 + sed -i -e 's:-arch \(i386\|x86_64\)::g' Makefile.all.am || die
220 +
221 + # Respect CFLAGS, LDFLAGS
222 + epatch "${FILESDIR}"/${PN}-3.7.0-respect-flags.patch
223 +
224 + # Changing Makefile.all.am to disable SSP
225 + epatch "${FILESDIR}"/${PN}-3.7.0-fno-stack-protector.patch
226 +
227 + # Yet more local labels, this time for ppc32 & ppc64
228 + epatch "${FILESDIR}"/${PN}-3.6.0-local-labels.patch
229 +
230 + # Don't build in empty assembly files for other platforms or we'll get a QA
231 + # warning about executable stacks.
232 + epatch "${FILESDIR}"/${PN}-3.11.0-non-exec-stack.patch
233 +
234 + # Allow users to test their own patches
235 + epatch_user
236 +
237 + # Regenerate autotools files
238 + eautoreconf
239 +}
240 +
241 +src_configure() {
242 + local myconf
243 +
244 + # Respect ar, bug #468114
245 + tc-export AR
246 +
247 + # -fomit-frame-pointer "Assembler messages: Error: junk `8' after expression"
248 + # while compiling insn_sse.c in none/tests/x86
249 + # -fpie valgrind seemingly hangs when built with pie on
250 + # amd64 (bug #102157)
251 + # -fstack-protector more undefined references to __guard and __stack_smash_handler
252 + # because valgrind doesn't link to glibc (bug #114347)
253 + # -m64 -mx32 for multilib-portage, bug #398825
254 + # -ggdb3 segmentation fault on startup
255 + filter-flags -fomit-frame-pointer
256 + filter-flags -fpie
257 + filter-flags -fstack-protector
258 + filter-flags -m64 -mx32
259 + replace-flags -ggdb3 -ggdb2
260 +
261 + if use amd64 || use ppc64; then
262 + ! has_multilib_profile && myconf="${myconf} --enable-only64bit"
263 + fi
264 +
265 + # Force bitness on darwin, bug #306467
266 + use x86-macos && myconf="${myconf} --enable-only32bit"
267 + use x64-macos && myconf="${myconf} --enable-only64bit"
268 +
269 + # Don't use mpicc unless the user asked for it (bug #258832)
270 + if ! use mpi; then
271 + myconf="${myconf} --without-mpicc"
272 + fi
273 +
274 + econf ${myconf}
275 +}
276 +
277 +src_install() {
278 + emake DESTDIR="${D}" install
279 + dodoc AUTHORS FAQ.txt NEWS README*
280 +
281 + pax-mark m "${ED}"/usr/$(get_libdir)/valgrind/*-*-linux
282 +
283 + if [[ ${CHOST} == *-darwin* ]] ; then
284 + # fix install_names on shared libraries, can't turn them into bundles,
285 + # as dyld won't load them any more then, bug #306467
286 + local l
287 + for l in "${ED}"/usr/lib/valgrind/*.so ; do
288 + install_name_tool -id "${EPREFIX}"/usr/lib/valgrind/${l##*/} "${l}"
289 + done
290 + fi
291 +}
292 +
293 +pkg_postinst() {
294 + elog "Valgrind will not work if glibc does not have debug symbols."
295 + elog "To fix this you can add splitdebug to FEATURES in make.conf"
296 + elog "and remerge glibc. See:"
297 + elog "https://bugs.gentoo.org/show_bug.cgi?id=214065"
298 + elog "https://bugs.gentoo.org/show_bug.cgi?id=274771"
299 + elog "https://bugs.gentoo.org/show_bug.cgi?id=388703"
300 +}