1 |
commit: 343b7744b26424b631a72b2c80e9f2a55e5d0d03 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 30 00:56:25 2013 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 30 00:56:25 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=343b7744 |
7 |
|
8 |
dev-libs/elfutils: replace obstack_printf with asprintf/obstack_grow |
9 |
|
10 |
Package-Manager: portage-2.1.11.62 |
11 |
Manifest-Sign-Key: 0xF52D4BBA |
12 |
|
13 |
--- |
14 |
dev-libs/elfutils/elfutils-0.155.ebuild | 1 + |
15 |
.../elfutils-0.155-replace-obstack_printf.patch | 38 ++++++++++++++++++++++ |
16 |
2 files changed, 39 insertions(+) |
17 |
|
18 |
diff --git a/dev-libs/elfutils/elfutils-0.155.ebuild b/dev-libs/elfutils/elfutils-0.155.ebuild |
19 |
index 6e79b0b..d8454ad 100644 |
20 |
--- a/dev-libs/elfutils/elfutils-0.155.ebuild |
21 |
+++ b/dev-libs/elfutils/elfutils-0.155.ebuild |
22 |
@@ -40,6 +40,7 @@ src_prepare() { |
23 |
epatch "${FILESDIR}"/${PN}-0.155-remove-mtrace.patch |
24 |
epatch "${FILESDIR}"/${PN}-0.155-remove-profiling-support.patch |
25 |
epatch "${FILESDIR}"/${PN}-0.155-replace-futimes.patch |
26 |
+ epatch "${FILESDIR}"/${PN}-0.155-replace-obstack_printf.patch |
27 |
eautoreconf |
28 |
|
29 |
sed -i -e 's:-Werror::g' $(find -name Makefile.in) || die |
30 |
|
31 |
diff --git a/dev-libs/elfutils/files/elfutils-0.155-replace-obstack_printf.patch b/dev-libs/elfutils/files/elfutils-0.155-replace-obstack_printf.patch |
32 |
new file mode 100644 |
33 |
index 0000000..0b6c226 |
34 |
--- /dev/null |
35 |
+++ b/dev-libs/elfutils/files/elfutils-0.155-replace-obstack_printf.patch |
36 |
@@ -0,0 +1,38 @@ |
37 |
+diff -Naur elfutils-0.155.orig/src/nm.c elfutils-0.155/src/nm.c |
38 |
+--- elfutils-0.155.orig/src/nm.c 2013-05-30 00:32:10.259792903 +0000 |
39 |
++++ elfutils-0.155/src/nm.c 2013-05-30 00:32:42.069792699 +0000 |
40 |
+@@ -1286,12 +1286,11 @@ |
41 |
+ /* We found the line. */ |
42 |
+ int lineno; |
43 |
+ (void) dwarf_lineno (line, &lineno); |
44 |
+- int n; |
45 |
+- n = obstack_printf (&whereob, "%s:%d%c", |
46 |
+- basename (dwarf_linesrc (line, |
47 |
+- NULL, |
48 |
+- NULL)), |
49 |
+- lineno, '\0'); |
50 |
++ char *s; |
51 |
++ int n = asprintf (&s, "%s:%d%c", |
52 |
++ basename (dwarf_linesrc (line, NULL, NULL)), |
53 |
++ lineno, '\0'); |
54 |
++ obstack_grow (&whereob, s, strlen(s)); |
55 |
+ sym_mem[nentries_used].where |
56 |
+ = obstack_finish (&whereob); |
57 |
+ |
58 |
+@@ -1318,10 +1317,12 @@ |
59 |
+ if (found != NULL) |
60 |
+ { |
61 |
+ /* We found the line. */ |
62 |
+- int n = obstack_printf (&whereob, "%s:%" PRIu64 "%c", |
63 |
+- basename ((*found)->file), |
64 |
+- (*found)->lineno, |
65 |
+- '\0'); |
66 |
++ char *s; |
67 |
++ int n = asprintf (&s, "%s:%" PRIu64 "%c", |
68 |
++ basename ((*found)->file), |
69 |
++ (*found)->lineno, |
70 |
++ '\0'); |
71 |
++ obstack_grow (&whereob, s, strlen(s)); |
72 |
+ sym_mem[nentries_used].where = obstack_finish (&whereob); |
73 |
+ |
74 |
+ /* The return value of obstack_print included the |