1 |
commit: 6996199dda78dc093e6ff2aeb0f80f5f3c23bdfd |
2 |
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Jun 11 17:24:00 2018 +0000 |
4 |
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com> |
5 |
CommitDate: Mon Jun 11 17:24:00 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=6996199d |
7 |
|
8 |
dev-libs/elfutils: bump patch |
9 |
|
10 |
dev-libs/elfutils/elfutils-0.171.ebuild | 2 +- |
11 |
.../elfutils/files/elfutils-0.171-musl-utils.patch | 134 +++++++++++++++++++++ |
12 |
2 files changed, 135 insertions(+), 1 deletion(-) |
13 |
|
14 |
diff --git a/dev-libs/elfutils/elfutils-0.171.ebuild b/dev-libs/elfutils/elfutils-0.171.ebuild |
15 |
index 874fd07..b42dcab 100644 |
16 |
--- a/dev-libs/elfutils/elfutils-0.171.ebuild |
17 |
+++ b/dev-libs/elfutils/elfutils-0.171.ebuild |
18 |
@@ -35,7 +35,7 @@ src_prepare() { |
19 |
# Add MUSL patches |
20 |
epatch "${FILESDIR}"/${PN}-0.170-musl-obstack-fts.patch |
21 |
epatch "${FILESDIR}"/${P}-musl-libs.patch |
22 |
- epatch "${FILESDIR}"/${PN}-0.170-musl-utils.patch |
23 |
+ epatch "${FILESDIR}"/${P}-musl-utils.patch |
24 |
|
25 |
eautoreconf |
26 |
|
27 |
|
28 |
diff --git a/dev-libs/elfutils/files/elfutils-0.171-musl-utils.patch b/dev-libs/elfutils/files/elfutils-0.171-musl-utils.patch |
29 |
new file mode 100644 |
30 |
index 0000000..a6b9684 |
31 |
--- /dev/null |
32 |
+++ b/dev-libs/elfutils/files/elfutils-0.171-musl-utils.patch |
33 |
@@ -0,0 +1,134 @@ |
34 |
+diff -Naur elfutils-0.171.orig/src/arlib.h elfutils-0.171/src/arlib.h |
35 |
+--- elfutils-0.171.orig/src/arlib.h 2018-06-11 10:11:02.221181359 -0700 |
36 |
++++ elfutils-0.171/src/arlib.h 2018-06-11 10:21:30.810170102 -0700 |
37 |
+@@ -29,6 +29,12 @@ |
38 |
+ #include <stdint.h> |
39 |
+ #include <sys/types.h> |
40 |
+ |
41 |
++#if !defined(ALLPERMS) |
42 |
++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */ |
43 |
++#endif |
44 |
++#if !defined(DEFFILEMODE) |
45 |
++# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/ |
46 |
++#endif |
47 |
+ |
48 |
+ /* State of -D/-U flags. */ |
49 |
+ extern bool arlib_deterministic_output; |
50 |
+diff -Naur elfutils-0.171.orig/src/elfcompress.c elfutils-0.171/src/elfcompress.c |
51 |
+--- elfutils-0.171.orig/src/elfcompress.c 2018-06-11 10:11:02.221181359 -0700 |
52 |
++++ elfutils-0.171/src/elfcompress.c 2018-06-11 10:21:30.813170102 -0700 |
53 |
+@@ -37,6 +37,13 @@ |
54 |
+ #include "libeu.h" |
55 |
+ #include "printversion.h" |
56 |
+ |
57 |
++#if !defined(ALLPERMS) |
58 |
++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */ |
59 |
++#endif |
60 |
++#if !defined(FNM_EXTMATCH) |
61 |
++# define FNM_EXTMATCH ( 1 << 5) |
62 |
++#endif |
63 |
++ |
64 |
+ /* Name and version of program. */ |
65 |
+ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; |
66 |
+ |
67 |
+diff -Naur elfutils-0.171.orig/src/readelf.c elfutils-0.171/src/readelf.c |
68 |
+--- elfutils-0.171.orig/src/readelf.c 2018-06-11 10:11:02.221181359 -0700 |
69 |
++++ elfutils-0.171/src/readelf.c 2018-06-11 10:21:43.630169873 -0700 |
70 |
+@@ -4771,10 +4771,11 @@ |
71 |
+ return cudie_base (&cu); |
72 |
+ } |
73 |
+ |
74 |
++static const char *listptr_name; |
75 |
++ |
76 |
+ static int |
77 |
+-compare_listptr (const void *a, const void *b, void *arg) |
78 |
++compare_listptr (const void *a, const void *b) |
79 |
+ { |
80 |
+- const char *name = arg; |
81 |
+ struct listptr *p1 = (void *) a; |
82 |
+ struct listptr *p2 = (void *) b; |
83 |
+ |
84 |
+@@ -4790,21 +4791,21 @@ |
85 |
+ p1->warned = p2->warned = true; |
86 |
+ error (0, 0, |
87 |
+ gettext ("%s %#" PRIx64 " used with different address sizes"), |
88 |
+- name, (uint64_t) p1->offset); |
89 |
++ listptr_name, (uint64_t) p1->offset); |
90 |
+ } |
91 |
+ if (p1->dwarf64 != p2->dwarf64) |
92 |
+ { |
93 |
+ p1->warned = p2->warned = true; |
94 |
+ error (0, 0, |
95 |
+ gettext ("%s %#" PRIx64 " used with different offset sizes"), |
96 |
+- name, (uint64_t) p1->offset); |
97 |
++ listptr_name, (uint64_t) p1->offset); |
98 |
+ } |
99 |
+ if (listptr_base (p1) != listptr_base (p2)) |
100 |
+ { |
101 |
+ p1->warned = p2->warned = true; |
102 |
+ error (0, 0, |
103 |
+ gettext ("%s %#" PRIx64 " used with different base addresses"), |
104 |
+- name, (uint64_t) p1->offset); |
105 |
++ listptr_name, (uint64_t) p1->offset); |
106 |
+ } |
107 |
+ if (p1->attr != p2 ->attr) |
108 |
+ { |
109 |
+@@ -4812,7 +4813,7 @@ |
110 |
+ error (0, 0, |
111 |
+ gettext ("%s %#" PRIx64 |
112 |
+ " used with different attribute %s and %s"), |
113 |
+- name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr), |
114 |
++ listptr_name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr), |
115 |
+ dwarf_attr_name (p2->attr)); |
116 |
+ } |
117 |
+ } |
118 |
+@@ -4884,8 +4885,11 @@ |
119 |
+ sort_listptr (struct listptr_table *table, const char *name) |
120 |
+ { |
121 |
+ if (table->n > 0) |
122 |
+- qsort_r (table->table, table->n, sizeof table->table[0], |
123 |
+- &compare_listptr, (void *) name); |
124 |
++ { |
125 |
++ listptr_name = name; |
126 |
++ qsort (table->table, table->n, sizeof table->table[0], |
127 |
++ &compare_listptr); |
128 |
++ } |
129 |
+ } |
130 |
+ |
131 |
+ static bool |
132 |
+diff -Naur elfutils-0.171.orig/src/strip.c elfutils-0.171/src/strip.c |
133 |
+--- elfutils-0.171.orig/src/strip.c 2018-06-11 10:11:02.221181359 -0700 |
134 |
++++ elfutils-0.171/src/strip.c 2018-06-11 10:21:30.818170102 -0700 |
135 |
+@@ -47,6 +47,13 @@ |
136 |
+ #include <system.h> |
137 |
+ #include <printversion.h> |
138 |
+ |
139 |
++#if !defined(ACCESSPERMS) |
140 |
++# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */ |
141 |
++#endif |
142 |
++#if !defined(FNM_EXTMATCH) |
143 |
++# define FNM_EXTMATCH ( 1 << 5) |
144 |
++#endif |
145 |
++ |
146 |
+ typedef uint8_t GElf_Byte; |
147 |
+ |
148 |
+ /* Name and version of program. */ |
149 |
+diff -Naur elfutils-0.171.orig/src/unstrip.c elfutils-0.171/src/unstrip.c |
150 |
+--- elfutils-0.171.orig/src/unstrip.c 2018-06-11 10:11:02.221181359 -0700 |
151 |
++++ elfutils-0.171/src/unstrip.c 2018-06-11 10:21:30.819170102 -0700 |
152 |
+@@ -56,6 +56,15 @@ |
153 |
+ # define _(str) gettext (str) |
154 |
+ #endif |
155 |
+ |
156 |
++#ifndef strndupa |
157 |
++#define strndupa(s, n) \ |
158 |
++ ({const char *__in = (s); \ |
159 |
++ size_t __len = strnlen (__in, (n)) + 1; \ |
160 |
++ char *__out = (char *) alloca (__len); \ |
161 |
++ __out[__len-1] = '\0'; \ |
162 |
++ (char *) memcpy (__out, __in, __len-1);}) |
163 |
++#endif |
164 |
++ |
165 |
+ /* Name and version of program. */ |
166 |
+ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; |
167 |
+ |