1 |
commit: 77b702738d68c216fcefb6e2bf7226be23178153 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 20 22:56:34 2013 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 20 22:56:34 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=77b70273 |
7 |
|
8 |
dev-libs/elfutils: remove mtrace |
9 |
|
10 |
Package-Manager: portage-2.1.11.62 |
11 |
|
12 |
--- |
13 |
dev-libs/elfutils/elfutils-0.155.ebuild | 1 + |
14 |
.../files/elfutils-0.155-remove-mtrace.patch | 191 ++++++++++++++++++++ |
15 |
2 files changed, 192 insertions(+), 0 deletions(-) |
16 |
|
17 |
diff --git a/dev-libs/elfutils/elfutils-0.155.ebuild b/dev-libs/elfutils/elfutils-0.155.ebuild |
18 |
index 173a297..0e46d90 100644 |
19 |
--- a/dev-libs/elfutils/elfutils-0.155.ebuild |
20 |
+++ b/dev-libs/elfutils/elfutils-0.155.ebuild |
21 |
@@ -37,6 +37,7 @@ src_prepare() { |
22 |
epatch "${FILESDIR}"/${PN}-0.155-fallback-mempcpy.patch |
23 |
epatch "${FILESDIR}"/${PN}-0.155-fallback-assert.patch |
24 |
epatch "${FILESDIR}"/${PN}-0.155-link-argp-standalone.patch |
25 |
+ epatch "${FILESDIR}"/${PN}-0.155-remove-mtrace.patch |
26 |
eautoreconf |
27 |
|
28 |
sed -i -e 's:-Werror::g' $(find -name Makefile.in) || die |
29 |
|
30 |
diff --git a/dev-libs/elfutils/files/elfutils-0.155-remove-mtrace.patch b/dev-libs/elfutils/files/elfutils-0.155-remove-mtrace.patch |
31 |
new file mode 100644 |
32 |
index 0000000..3021180 |
33 |
--- /dev/null |
34 |
+++ b/dev-libs/elfutils/files/elfutils-0.155-remove-mtrace.patch |
35 |
@@ -0,0 +1,191 @@ |
36 |
+diff -Naur elfutils-0.155.orig/src/addr2line.c elfutils-0.155/src/addr2line.c |
37 |
+--- elfutils-0.155.orig/src/addr2line.c 2012-08-27 18:29:31.000000000 +0000 |
38 |
++++ elfutils-0.155/src/addr2line.c 2013-05-20 22:39:59.231647796 +0000 |
39 |
+@@ -30,7 +30,6 @@ |
40 |
+ #include <dwarf.h> |
41 |
+ #include <libintl.h> |
42 |
+ #include <locale.h> |
43 |
+-#include <mcheck.h> |
44 |
+ #include <stdbool.h> |
45 |
+ #include <stdio.h> |
46 |
+ #include <stdio_ext.h> |
47 |
+@@ -121,9 +120,6 @@ |
48 |
+ int remaining; |
49 |
+ int result = 0; |
50 |
+ |
51 |
+- /* Make memory leak detection possible. */ |
52 |
+- mtrace (); |
53 |
+- |
54 |
+ /* We use no threads here which can interfere with handling a stream. */ |
55 |
+ (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER); |
56 |
+ |
57 |
+diff -Naur elfutils-0.155.orig/src/ar.c elfutils-0.155/src/ar.c |
58 |
+--- elfutils-0.155.orig/src/ar.c 2012-08-27 18:27:31.000000000 +0000 |
59 |
++++ elfutils-0.155/src/ar.c 2013-05-20 22:40:10.431647717 +0000 |
60 |
+@@ -28,7 +28,6 @@ |
61 |
+ #include <libintl.h> |
62 |
+ #include <limits.h> |
63 |
+ #include <locale.h> |
64 |
+-#include <mcheck.h> |
65 |
+ #include <search.h> |
66 |
+ #include <stdbool.h> |
67 |
+ #include <stdlib.h> |
68 |
+@@ -141,9 +140,6 @@ |
69 |
+ int |
70 |
+ main (int argc, char *argv[]) |
71 |
+ { |
72 |
+- /* Make memory leak detection possible. */ |
73 |
+- mtrace (); |
74 |
+- |
75 |
+ /* We use no threads here which can interfere with handling a stream. */ |
76 |
+ (void) __fsetlocking (stdin, FSETLOCKING_BYCALLER); |
77 |
+ (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER); |
78 |
+diff -Naur elfutils-0.155.orig/src/ld.c elfutils-0.155/src/ld.c |
79 |
+--- elfutils-0.155.orig/src/ld.c 2012-08-27 18:27:31.000000000 +0000 |
80 |
++++ elfutils-0.155/src/ld.c 2013-05-20 22:41:25.431647187 +0000 |
81 |
+@@ -26,7 +26,6 @@ |
82 |
+ #include <libelf.h> |
83 |
+ #include <libintl.h> |
84 |
+ #include <locale.h> |
85 |
+-#include <mcheck.h> |
86 |
+ #include <stdio.h> |
87 |
+ #include <stdio_ext.h> |
88 |
+ #include <stdlib.h> |
89 |
+@@ -277,11 +276,6 @@ |
90 |
+ int remaining; |
91 |
+ int err; |
92 |
+ |
93 |
+-#ifndef NDEBUG |
94 |
+- /* Enable memory debugging. */ |
95 |
+- mtrace (); |
96 |
+-#endif |
97 |
+- |
98 |
+ /* Sanity check. We always want to use the LFS functionality. */ |
99 |
+ if (sizeof (off_t) != sizeof (off64_t)) |
100 |
+ abort (); |
101 |
+diff -Naur elfutils-0.155.orig/src/nm.c elfutils-0.155/src/nm.c |
102 |
+--- elfutils-0.155.orig/src/nm.c 2012-08-27 18:27:31.000000000 +0000 |
103 |
++++ elfutils-0.155/src/nm.c 2013-05-20 22:41:37.061647104 +0000 |
104 |
+@@ -33,7 +33,6 @@ |
105 |
+ #include <libdw.h> |
106 |
+ #include <libintl.h> |
107 |
+ #include <locale.h> |
108 |
+-#include <mcheck.h> |
109 |
+ #include <obstack.h> |
110 |
+ #include <search.h> |
111 |
+ #include <stdbool.h> |
112 |
+@@ -217,9 +216,6 @@ |
113 |
+ int remaining; |
114 |
+ int result = 0; |
115 |
+ |
116 |
+- /* Make memory leak detection possible. */ |
117 |
+- mtrace (); |
118 |
+- |
119 |
+ /* We use no threads here which can interfere with handling a stream. */ |
120 |
+ (void) __fsetlocking (stdin, FSETLOCKING_BYCALLER); |
121 |
+ (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER); |
122 |
+diff -Naur elfutils-0.155.orig/src/objdump.c elfutils-0.155/src/objdump.c |
123 |
+--- elfutils-0.155.orig/src/objdump.c 2012-08-27 18:27:31.000000000 +0000 |
124 |
++++ elfutils-0.155/src/objdump.c 2013-05-20 22:41:48.531647023 +0000 |
125 |
+@@ -26,7 +26,6 @@ |
126 |
+ #include <inttypes.h> |
127 |
+ #include <libintl.h> |
128 |
+ #include <locale.h> |
129 |
+-#include <mcheck.h> |
130 |
+ #include <stdbool.h> |
131 |
+ #include <stdio.h> |
132 |
+ #include <stdio_ext.h> |
133 |
+@@ -131,9 +130,6 @@ |
134 |
+ int |
135 |
+ main (int argc, char *argv[]) |
136 |
+ { |
137 |
+- /* Make memory leak detection possible. */ |
138 |
+- mtrace (); |
139 |
+- |
140 |
+ /* We use no threads here which can interfere with handling a stream. */ |
141 |
+ (void) __fsetlocking (stdin, FSETLOCKING_BYCALLER); |
142 |
+ (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER); |
143 |
+diff -Naur elfutils-0.155.orig/src/ranlib.c elfutils-0.155/src/ranlib.c |
144 |
+--- elfutils-0.155.orig/src/ranlib.c 2012-08-27 18:27:31.000000000 +0000 |
145 |
++++ elfutils-0.155/src/ranlib.c 2013-05-20 22:42:03.951646914 +0000 |
146 |
+@@ -29,7 +29,6 @@ |
147 |
+ #include <gelf.h> |
148 |
+ #include <libintl.h> |
149 |
+ #include <locale.h> |
150 |
+-#include <mcheck.h> |
151 |
+ #include <obstack.h> |
152 |
+ #include <stdlib.h> |
153 |
+ #include <stdio.h> |
154 |
+@@ -78,9 +77,6 @@ |
155 |
+ int |
156 |
+ main (int argc, char *argv[]) |
157 |
+ { |
158 |
+- /* Make memory leak detection possible. */ |
159 |
+- mtrace (); |
160 |
+- |
161 |
+ /* We use no threads here which can interfere with handling a stream. */ |
162 |
+ (void) __fsetlocking (stdin, FSETLOCKING_BYCALLER); |
163 |
+ (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER); |
164 |
+diff -Naur elfutils-0.155.orig/src/size.c elfutils-0.155/src/size.c |
165 |
+--- elfutils-0.155.orig/src/size.c 2012-08-27 18:27:31.000000000 +0000 |
166 |
++++ elfutils-0.155/src/size.c 2013-05-20 22:42:16.271646827 +0000 |
167 |
+@@ -28,7 +28,6 @@ |
168 |
+ #include <libelf.h> |
169 |
+ #include <libintl.h> |
170 |
+ #include <locale.h> |
171 |
+-#include <mcheck.h> |
172 |
+ #include <stdbool.h> |
173 |
+ #include <stdio.h> |
174 |
+ #include <stdio_ext.h> |
175 |
+@@ -160,9 +159,6 @@ |
176 |
+ int remaining; |
177 |
+ int result = 0; |
178 |
+ |
179 |
+- /* Make memory leak detection possible. */ |
180 |
+- mtrace (); |
181 |
+- |
182 |
+ /* We use no threads here which can interfere with handling a stream. */ |
183 |
+ __fsetlocking (stdin, FSETLOCKING_BYCALLER); |
184 |
+ __fsetlocking (stdout, FSETLOCKING_BYCALLER); |
185 |
+diff -Naur elfutils-0.155.orig/src/strip.c elfutils-0.155/src/strip.c |
186 |
+--- elfutils-0.155.orig/src/strip.c 2012-08-27 18:29:31.000000000 +0000 |
187 |
++++ elfutils-0.155/src/strip.c 2013-05-20 22:42:28.781646739 +0000 |
188 |
+@@ -30,7 +30,6 @@ |
189 |
+ #include <libelf.h> |
190 |
+ #include <libintl.h> |
191 |
+ #include <locale.h> |
192 |
+-#include <mcheck.h> |
193 |
+ #include <stdbool.h> |
194 |
+ #include <stdio.h> |
195 |
+ #include <stdio_ext.h> |
196 |
+@@ -155,9 +154,6 @@ |
197 |
+ int remaining; |
198 |
+ int result = 0; |
199 |
+ |
200 |
+- /* Make memory leak detection possible. */ |
201 |
+- mtrace (); |
202 |
+- |
203 |
+ /* We use no threads here which can interfere with handling a stream. */ |
204 |
+ __fsetlocking (stdin, FSETLOCKING_BYCALLER); |
205 |
+ __fsetlocking (stdout, FSETLOCKING_BYCALLER); |
206 |
+diff -Naur elfutils-0.155.orig/src/unstrip.c elfutils-0.155/src/unstrip.c |
207 |
+--- elfutils-0.155.orig/src/unstrip.c 2012-08-27 18:27:31.000000000 +0000 |
208 |
++++ elfutils-0.155/src/unstrip.c 2013-05-20 22:42:44.201646629 +0000 |
209 |
+@@ -36,7 +36,6 @@ |
210 |
+ #include <fnmatch.h> |
211 |
+ #include <libintl.h> |
212 |
+ #include <locale.h> |
213 |
+-#include <mcheck.h> |
214 |
+ #include <stdbool.h> |
215 |
+ #include <stdio.h> |
216 |
+ #include <stdio_ext.h> |
217 |
+@@ -2215,9 +2214,6 @@ |
218 |
+ int |
219 |
+ main (int argc, char **argv) |
220 |
+ { |
221 |
+- /* Make memory leak detection possible. */ |
222 |
+- mtrace (); |
223 |
+- |
224 |
+ /* We use no threads here which can interfere with handling a stream. */ |
225 |
+ __fsetlocking (stdin, FSETLOCKING_BYCALLER); |
226 |
+ __fsetlocking (stdout, FSETLOCKING_BYCALLER); |