1 |
commit: 77466dc98168a7edba16360eee1e10bb1f8a1ccb |
2 |
Author: Aric Belsito <lluixhi <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Jun 11 17:15:55 2018 +0000 |
4 |
Commit: Aric Belsito <lluixhi <AT> gmail <DOT> com> |
5 |
CommitDate: Mon Jun 11 17:15:55 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=77466dc9 |
7 |
|
8 |
dev-libs/elfutils: version bump to 0.171 |
9 |
|
10 |
cleanup |
11 |
|
12 |
dev-libs/elfutils/Manifest | 5 +- |
13 |
dev-libs/elfutils/elfutils-0.166.ebuild | 82 -------- |
14 |
dev-libs/elfutils/elfutils-0.170-r1.ebuild | 4 +- |
15 |
...utils-0.169-r1.ebuild => elfutils-0.171.ebuild} | 14 +- |
16 |
.../elfutils/files/elfutils-0.166-musl-libs.patch | 218 --------------------- |
17 |
.../files/elfutils-0.166-musl-obstack-fts.patch | 124 ------------ |
18 |
.../elfutils/files/elfutils-0.166-musl-utils.patch | 183 ----------------- |
19 |
.../files/elfutils-0.168-musl-obstack-fts.patch | 102 ---------- |
20 |
.../elfutils/files/elfutils-0.168-musl-utils.patch | 122 ------------ |
21 |
.../elfutils/files/elfutils-0.171-musl-libs.patch | 86 ++++++++ |
22 |
10 files changed, 97 insertions(+), 843 deletions(-) |
23 |
|
24 |
diff --git a/dev-libs/elfutils/Manifest b/dev-libs/elfutils/Manifest |
25 |
index d672ecd..625bc52 100644 |
26 |
--- a/dev-libs/elfutils/Manifest |
27 |
+++ b/dev-libs/elfutils/Manifest |
28 |
@@ -1,3 +1,2 @@ |
29 |
-DIST elfutils-0.166.tar.bz2 6496225 SHA256 3c056914c8a438b210be0d790463b960fc79d234c3f05ce707cbff80e94cba30 SHA512 543e8f9fbebbef86c40b1d6dc93da04a8431071aad636b70e7a1b9536450990b237d100d354c29fd0c3605074b7a0621f5bdaab4c2664be42b2912ad283bc614 WHIRLPOOL 4de083bbb397235dd46c2ba6e0cbb615825c13d7e8413015d5ff08d72deae1d9a508c0f6e5f90e27cc709870064bc53a51b2a681f2a9b80e1f658bb7dc475f8d |
30 |
-DIST elfutils-0.169.tar.bz2 8067758 SHA256 9412fac7b30872b738bc1ed1ebcaed54493c26ef9a67887913498c17b10f3bc2 SHA512 0a81a20bb2aff533d035d6b76f1403437b2e11bce390db57e34b8c26e4b9b3150346d83dddcbfbbdc58063f046ca3223508dba35c6ce88e375d201e7a777a8b9 WHIRLPOOL dc4f689b403160272dccb1e306ee3584f6d06156d3318d745bba46f9b4a31a477795223233ffb420b096b1c196aba09492e4ab5803f6150326b48e1045f92e06 |
31 |
-DIST elfutils-0.170.tar.bz2 8358001 SHA256 1f844775576b79bdc9f9c717a50058d08620323c1e935458223a12f249c9e066 SHA512 aca0b5e271138eaf86e36505ffb101181207b151e833e6cd7c18986ac50678542a5ecd2250f8dd6923ca497142f197c8b08fd225e4130b16b6203c24013d6d28 WHIRLPOOL ebb3069aa52e49b7e137c722ac490b12393e0c54656d6d7476193eaa4253b48209e62e4babd4819a52cf5a9f3a1a6f56945eb776f014df9cbd841aa392e94823 |
32 |
+DIST elfutils-0.170.tar.bz2 8358001 BLAKE2B 03ea3ba7d3feaac43065312c475f4a3cd9083a6c56c9982fa00c0ed02b28440f6a37bbeca4be18db13749647ea1c8a6f00dae7efcb1c70235110e60ad7d56d06 SHA512 aca0b5e271138eaf86e36505ffb101181207b151e833e6cd7c18986ac50678542a5ecd2250f8dd6923ca497142f197c8b08fd225e4130b16b6203c24013d6d28 |
33 |
+DIST elfutils-0.171.tar.bz2 8654558 BLAKE2B 709b5a4090867ec536563ed31178f7fb820f6b0ca8fb7c379b9081fa0d0027c8c2904cf17e9ee36245dd1fea8d2853ee3e7af457167e007fb7b08eec2e921a30 SHA512 777be2d63ca9b11440bf358a33428d9ca974e2612a880934156c9f7194af596ed627c1ed2d48dbd47a3761c94913b8f39565f9dcb6b62c92bf229f04c96d5ee3 |
34 |
|
35 |
diff --git a/dev-libs/elfutils/elfutils-0.166.ebuild b/dev-libs/elfutils/elfutils-0.166.ebuild |
36 |
deleted file mode 100644 |
37 |
index 38a5cc5..0000000 |
38 |
--- a/dev-libs/elfutils/elfutils-0.166.ebuild |
39 |
+++ /dev/null |
40 |
@@ -1,82 +0,0 @@ |
41 |
-# Copyright 1999-2016 Gentoo Foundation |
42 |
-# Distributed under the terms of the GNU General Public License v2 |
43 |
- |
44 |
-EAPI="5" |
45 |
- |
46 |
-inherit autotools eutils flag-o-matic multilib-minimal |
47 |
- |
48 |
-DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)" |
49 |
-HOMEPAGE="https://fedorahosted.org/elfutils/" |
50 |
-SRC_URI="https://fedorahosted.org/releases/e/l/${PN}/${PV}/${P}.tar.bz2" |
51 |
- |
52 |
-LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )" |
53 |
-SLOT="0" |
54 |
-KEYWORDS="amd64 arm ia64 ~mips ppc sh sparc x86" |
55 |
-IUSE="bzip2 lzma nls static-libs test +threads +utils" |
56 |
- |
57 |
-# This pkg does not actually seem to compile currently in a uClibc |
58 |
-# environment (xrealloc errs), but we need to ensure that glibc never |
59 |
-# gets pulled in as a dep since this package does not respect virtual/libc |
60 |
-RDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] |
61 |
- bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] ) |
62 |
- lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] ) |
63 |
- !dev-libs/libelf |
64 |
- abi_x86_32? ( |
65 |
- !<=app-emulation/emul-linux-x86-baselibs-20130224-r11 |
66 |
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
67 |
- )" |
68 |
-DEPEND="${RDEPEND} |
69 |
- nls? ( sys-devel/gettext ) |
70 |
- >=sys-devel/flex-2.5.4a |
71 |
- sys-devel/m4 |
72 |
- elibc_musl? ( |
73 |
- sys-libs/argp-standalone |
74 |
- sys-libs/fts-standalone |
75 |
- sys-libs/obstack-standalone |
76 |
- )" |
77 |
- |
78 |
-src_prepare() { |
79 |
- epatch "${FILESDIR}"/${PN}-0.118-PaX-support.patch |
80 |
- |
81 |
- # Add MUSL patches |
82 |
- epatch "${FILESDIR}"/${P}-musl-obstack-fts.patch |
83 |
- epatch "${FILESDIR}"/${P}-musl-libs.patch |
84 |
- epatch "${FILESDIR}"/${P}-musl-utils.patch |
85 |
- |
86 |
- eautoreconf |
87 |
- |
88 |
- use static-libs || sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in |
89 |
- sed -i 's:-Werror::' */Makefile.in |
90 |
- # some patches touch both configure and configure.ac |
91 |
- find -type f -exec touch -r configure {} + |
92 |
-} |
93 |
- |
94 |
-src_configure() { |
95 |
- use test && append-flags -g #407135 |
96 |
- multilib-minimal_src_configure |
97 |
-} |
98 |
- |
99 |
-multilib_src_configure() { |
100 |
- ECONF_SOURCE="${S}" econf \ |
101 |
- $(use_enable nls) \ |
102 |
- $(use_enable threads thread-safety) \ |
103 |
- --program-prefix="eu-" \ |
104 |
- --with-zlib \ |
105 |
- --disable-symbol-versioning \ |
106 |
- $(use_with bzip2 bzlib) \ |
107 |
- $(use_with lzma) |
108 |
-} |
109 |
- |
110 |
-multilib_src_test() { |
111 |
- env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \ |
112 |
- LC_ALL="C" \ |
113 |
- emake check || die |
114 |
-} |
115 |
- |
116 |
-multilib_src_install_all() { |
117 |
- einstalldocs |
118 |
- dodoc NOTES |
119 |
- # These build quick, and are needed for most tests, so don't |
120 |
- # disable their building when the USE flag is disabled. |
121 |
- use utils || rm -rf "${ED}"/usr/bin |
122 |
-} |
123 |
|
124 |
diff --git a/dev-libs/elfutils/elfutils-0.170-r1.ebuild b/dev-libs/elfutils/elfutils-0.170-r1.ebuild |
125 |
index fabb12e..dc4dc87 100644 |
126 |
--- a/dev-libs/elfutils/elfutils-0.170-r1.ebuild |
127 |
+++ b/dev-libs/elfutils/elfutils-0.170-r1.ebuild |
128 |
@@ -1,4 +1,4 @@ |
129 |
-# Copyright 1999-2017 Gentoo Foundation |
130 |
+# Copyright 1999-2018 Gentoo Foundation |
131 |
# Distributed under the terms of the GNU General Public License v2 |
132 |
|
133 |
EAPI=6 |
134 |
@@ -11,7 +11,7 @@ SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2" |
135 |
|
136 |
LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )" |
137 |
SLOT="0" |
138 |
-KEYWORDS="~amd64 ~arm ~ia64 ~mips ~ppc ~sh ~sparc ~x86" |
139 |
+KEYWORDS="amd64 arm ia64 ~mips ppc sh sparc x86" |
140 |
IUSE="bzip2 lzma nls static-libs test +threads +utils" |
141 |
|
142 |
RDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] |
143 |
|
144 |
diff --git a/dev-libs/elfutils/elfutils-0.169-r1.ebuild b/dev-libs/elfutils/elfutils-0.171.ebuild |
145 |
similarity index 86% |
146 |
rename from dev-libs/elfutils/elfutils-0.169-r1.ebuild |
147 |
rename to dev-libs/elfutils/elfutils-0.171.ebuild |
148 |
index 359a04e..874fd07 100644 |
149 |
--- a/dev-libs/elfutils/elfutils-0.169-r1.ebuild |
150 |
+++ b/dev-libs/elfutils/elfutils-0.171.ebuild |
151 |
@@ -1,4 +1,4 @@ |
152 |
-# Copyright 1999-2017 Gentoo Foundation |
153 |
+# Copyright 1999-2018 Gentoo Foundation |
154 |
# Distributed under the terms of the GNU General Public License v2 |
155 |
|
156 |
EAPI=6 |
157 |
@@ -11,7 +11,7 @@ SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2" |
158 |
|
159 |
LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )" |
160 |
SLOT="0" |
161 |
-KEYWORDS="amd64 arm ia64 ~mips ~ppc ~sh ~sparc ~x86" |
162 |
+KEYWORDS="~amd64 ~arm ~ia64 ~mips ~ppc ~sh ~sparc ~x86" |
163 |
IUSE="bzip2 lzma nls static-libs test +threads +utils" |
164 |
|
165 |
RDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] |
166 |
@@ -28,18 +28,18 @@ DEPEND="${RDEPEND} |
167 |
sys-libs/obstack-standalone |
168 |
)" |
169 |
|
170 |
+PATCHES=("${FILESDIR}"/${PN}-0.118-PaX-support.patch) |
171 |
+ |
172 |
src_prepare() { |
173 |
default |
174 |
- epatch "${FILESDIR}"/${PN}-0.118-PaX-support.patch |
175 |
- |
176 |
# Add MUSL patches |
177 |
- epatch "${FILESDIR}"/${PN}-0.168-musl-obstack-fts.patch |
178 |
+ epatch "${FILESDIR}"/${PN}-0.170-musl-obstack-fts.patch |
179 |
epatch "${FILESDIR}"/${P}-musl-libs.patch |
180 |
- epatch "${FILESDIR}"/${PN}-0.168-musl-utils.patch |
181 |
+ epatch "${FILESDIR}"/${PN}-0.170-musl-utils.patch |
182 |
|
183 |
eautoreconf |
184 |
|
185 |
- if use static-libs; then |
186 |
+ if ! use static-libs; then |
187 |
sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in || die |
188 |
fi |
189 |
sed -i 's:-Werror::' */Makefile.in || die |
190 |
|
191 |
diff --git a/dev-libs/elfutils/files/elfutils-0.166-musl-libs.patch b/dev-libs/elfutils/files/elfutils-0.166-musl-libs.patch |
192 |
deleted file mode 100644 |
193 |
index 645ebdd..0000000 |
194 |
--- a/dev-libs/elfutils/files/elfutils-0.166-musl-libs.patch |
195 |
+++ /dev/null |
196 |
@@ -1,218 +0,0 @@ |
197 |
-diff -Naur elfutils-0.166.orig/lib/error.h elfutils-0.166/lib/error.h |
198 |
---- elfutils-0.166.orig/lib/error.h 1969-12-31 16:00:00.000000000 -0800 |
199 |
-+++ elfutils-0.166/lib/error.h 2016-11-15 12:26:59.352320431 -0800 |
200 |
-@@ -0,0 +1,27 @@ |
201 |
-+#ifndef _ERROR_H_ |
202 |
-+#define _ERROR_H_ |
203 |
-+ |
204 |
-+#include <stdarg.h> |
205 |
-+#include <stdio.h> |
206 |
-+#include <stdlib.h> |
207 |
-+#include <string.h> |
208 |
-+#include <errno.h> |
209 |
-+ |
210 |
-+static unsigned int error_message_count = 0; |
211 |
-+ |
212 |
-+static inline void error(int status, int errnum, const char* format, ...) |
213 |
-+{ |
214 |
-+ va_list ap; |
215 |
-+ fprintf(stderr, "%s: ", program_invocation_name); |
216 |
-+ va_start(ap, format); |
217 |
-+ vfprintf(stderr, format, ap); |
218 |
-+ va_end(ap); |
219 |
-+ if (errnum) |
220 |
-+ fprintf(stderr, ": %s", strerror(errnum)); |
221 |
-+ fprintf(stderr, "\n"); |
222 |
-+ error_message_count++; |
223 |
-+ if (status) |
224 |
-+ exit(status); |
225 |
-+} |
226 |
-+ |
227 |
-+#endif /* _ERROR_H_ */ |
228 |
-diff -Naur elfutils-0.166.orig/lib/fixedsizehash.h elfutils-0.166/lib/fixedsizehash.h |
229 |
---- elfutils-0.166.orig/lib/fixedsizehash.h 2016-11-15 12:19:07.101952241 -0800 |
230 |
-+++ elfutils-0.166/lib/fixedsizehash.h 2016-11-15 12:26:59.355320459 -0800 |
231 |
-@@ -30,12 +30,12 @@ |
232 |
- #include <errno.h> |
233 |
- #include <stdlib.h> |
234 |
- #include <string.h> |
235 |
--#include <sys/cdefs.h> |
236 |
- #include <sys/param.h> |
237 |
- |
238 |
- #include <system.h> |
239 |
- |
240 |
--#define CONCAT(t1,t2) __CONCAT (t1,t2) |
241 |
-+#define CONCAT1(x,y) x##y |
242 |
-+#define CONCAT(x,y) CONCAT1(x,y) |
243 |
- |
244 |
- /* Before including this file the following macros must be defined: |
245 |
- |
246 |
-diff -Naur elfutils-0.166.orig/lib/system.h elfutils-0.166/lib/system.h |
247 |
---- elfutils-0.166.orig/lib/system.h 2016-11-15 12:19:07.100952231 -0800 |
248 |
-+++ elfutils-0.166/lib/system.h 2016-11-15 12:26:59.356320468 -0800 |
249 |
-@@ -35,6 +35,7 @@ |
250 |
- #include <endian.h> |
251 |
- #include <byteswap.h> |
252 |
- #include <unistd.h> |
253 |
-+#include <fcntl.h> |
254 |
- |
255 |
- #if __BYTE_ORDER == __LITTLE_ENDIAN |
256 |
- # define LE32(n) (n) |
257 |
-@@ -50,6 +51,20 @@ |
258 |
- # error "Unknown byte order" |
259 |
- #endif |
260 |
- |
261 |
-+#if !defined(__GLIBC__) |
262 |
-+ |
263 |
-+/* Evaluate EXPRESSION, and repeat as long as it returns -1 with `errno' |
264 |
-+ set to EINTR. */ |
265 |
-+ |
266 |
-+# define TEMP_FAILURE_RETRY(expression) \ |
267 |
-+ (__extension__ \ |
268 |
-+ ({ long int __result; \ |
269 |
-+ do __result = (long int) (expression); \ |
270 |
-+ while (__result == -1L && errno == EINTR); \ |
271 |
-+ __result; })) |
272 |
-+ |
273 |
-+#endif |
274 |
-+ |
275 |
- extern void *xmalloc (size_t) __attribute__ ((__malloc__)); |
276 |
- extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__)); |
277 |
- extern void *xrealloc (void *, size_t) __attribute__ ((__malloc__)); |
278 |
-diff -Naur elfutils-0.166.orig/libcpu/i386_disasm.c elfutils-0.166/libcpu/i386_disasm.c |
279 |
---- elfutils-0.166.orig/libcpu/i386_disasm.c 2016-11-15 12:19:07.098952213 -0800 |
280 |
-+++ elfutils-0.166/libcpu/i386_disasm.c 2016-11-15 12:26:59.357320477 -0800 |
281 |
-@@ -1,4 +1,4 @@ |
282 |
--/* Disassembler for x86. |
283 |
-+/* Disassembler for x86. |
284 |
- Copyright (C) 2007, 2008, 2009, 2011 Red Hat, Inc. |
285 |
- This file is part of elfutils. |
286 |
- Written by Ulrich Drepper <drepper@××××××.com>, 2007. |
287 |
-@@ -710,6 +710,7 @@ |
288 |
- |
289 |
- case 'm': |
290 |
- /* Mnemonic. */ |
291 |
-+ str = mnebuf; |
292 |
- |
293 |
- if (unlikely (instrtab[cnt].mnemonic == MNE_INVALID)) |
294 |
- { |
295 |
-diff -Naur elfutils-0.166.orig/libdw/libdw.h elfutils-0.166/libdw/libdw.h |
296 |
---- elfutils-0.166.orig/libdw/libdw.h 2016-11-15 12:19:07.142952620 -0800 |
297 |
-+++ elfutils-0.166/libdw/libdw.h 2016-11-15 12:26:59.357320477 -0800 |
298 |
-@@ -33,7 +33,27 @@ |
299 |
- #include <stdbool.h> |
300 |
- #include <stddef.h> |
301 |
- #include <stdint.h> |
302 |
-+#include <unistd.h> |
303 |
-+#include <alloca.h> |
304 |
-+#include <string.h> |
305 |
- |
306 |
-+#ifndef TEMP_FAILURE_RETRY |
307 |
-+#define TEMP_FAILURE_RETRY(expression) \ |
308 |
-+ (__extension__ \ |
309 |
-+ ({ long int __result; \ |
310 |
-+ do __result = (long int) (expression); \ |
311 |
-+ while (__result == -1L && errno == EINTR); \ |
312 |
-+ __result; })) |
313 |
-+#endif |
314 |
-+ |
315 |
-+#ifndef strndupa |
316 |
-+#define strndupa(s, n) \ |
317 |
-+ (__extension__ ({const char *__in = (s); \ |
318 |
-+ size_t __len = strnlen (__in, (n)) + 1; \ |
319 |
-+ char *__out = (char *) alloca (__len); \ |
320 |
-+ __out[__len-1] = '\0'; \ |
321 |
-+ (char *) memcpy (__out, __in, __len-1);})) |
322 |
-+#endif |
323 |
- |
324 |
- #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) |
325 |
- # define __nonnull_attribute__(...) __attribute__ ((__nonnull__ (__VA_ARGS__))) |
326 |
-diff -Naur elfutils-0.166.orig/libdwfl/dwfl_build_id_find_elf.c elfutils-0.166/libdwfl/dwfl_build_id_find_elf.c |
327 |
---- elfutils-0.166.orig/libdwfl/dwfl_build_id_find_elf.c 2016-11-15 12:19:07.125952463 -0800 |
328 |
-+++ elfutils-0.166/libdwfl/dwfl_build_id_find_elf.c 2016-11-15 12:26:59.358320487 -0800 |
329 |
-@@ -94,7 +94,7 @@ |
330 |
- { |
331 |
- if (*file_name != NULL) |
332 |
- free (*file_name); |
333 |
-- *file_name = canonicalize_file_name (name); |
334 |
-+ *file_name = realpath (name, NULL); |
335 |
- if (*file_name == NULL) |
336 |
- { |
337 |
- *file_name = name; |
338 |
-diff -Naur elfutils-0.166.orig/libdwfl/dwfl_error.c elfutils-0.166/libdwfl/dwfl_error.c |
339 |
---- elfutils-0.166.orig/libdwfl/dwfl_error.c 2016-11-15 12:19:07.119952407 -0800 |
340 |
-+++ elfutils-0.166/libdwfl/dwfl_error.c 2016-11-15 12:26:59.358320487 -0800 |
341 |
-@@ -154,7 +154,16 @@ |
342 |
- switch (error &~ 0xffff) |
343 |
- { |
344 |
- case OTHER_ERROR (ERRNO): |
345 |
-+#if defined(__GLIBC__) |
346 |
- return strerror_r (error & 0xffff, "bad", 0); |
347 |
-+#else |
348 |
-+ { |
349 |
-+ static __thread char buf[128] = ""; |
350 |
-+ if (0 == strerror_r(error & 0xffff, buf, sizeof(buf))) |
351 |
-+ return buf; |
352 |
-+ } |
353 |
-+ return "strerror_r() failed"; |
354 |
-+#endif |
355 |
- case OTHER_ERROR (LIBELF): |
356 |
- return elf_errmsg (error & 0xffff); |
357 |
- case OTHER_ERROR (LIBDW): |
358 |
-diff -Naur elfutils-0.166.orig/libdwfl/find-debuginfo.c elfutils-0.166/libdwfl/find-debuginfo.c |
359 |
---- elfutils-0.166.orig/libdwfl/find-debuginfo.c 2016-11-15 12:19:07.122952435 -0800 |
360 |
-+++ elfutils-0.166/libdwfl/find-debuginfo.c 2016-11-15 12:26:59.358320487 -0800 |
361 |
-@@ -385,7 +385,7 @@ |
362 |
- /* If FILE_NAME is a symlink, the debug file might be associated |
363 |
- with the symlink target name instead. */ |
364 |
- |
365 |
-- char *canon = canonicalize_file_name (file_name); |
366 |
-+ char *canon = realpath (file_name, NULL); |
367 |
- if (canon != NULL && strcmp (file_name, canon)) |
368 |
- fd = find_debuginfo_in_path (mod, canon, |
369 |
- debuglink_file, debuglink_crc, |
370 |
-diff -Naur elfutils-0.166.orig/libebl/eblwstrtab.c elfutils-0.166/libebl/eblwstrtab.c |
371 |
---- elfutils-0.166.orig/libebl/eblwstrtab.c 2016-11-15 12:19:07.227953406 -0800 |
372 |
-+++ elfutils-0.166/libebl/eblwstrtab.c 2016-11-15 12:26:59.359320496 -0800 |
373 |
-@@ -305,7 +305,7 @@ |
374 |
- |
375 |
- /* Process the current node. */ |
376 |
- nodep->offset = *offsetp; |
377 |
-- *freep = wmempcpy (*freep, nodep->string, nodep->len); |
378 |
-+ *freep = wmemcpy (*freep, nodep->string, nodep->len) + nodep->len; |
379 |
- *offsetp += nodep->len * sizeof (wchar_t); |
380 |
- |
381 |
- for (subs = nodep->next; subs != NULL; subs = subs->next) |
382 |
-diff -Naur elfutils-0.166.orig/libelf/elf.h elfutils-0.166/libelf/elf.h |
383 |
---- elfutils-0.166.orig/libelf/elf.h 2016-11-15 12:19:07.094952176 -0800 |
384 |
-+++ elfutils-0.166/libelf/elf.h 2016-11-15 12:26:59.361320514 -0800 |
385 |
-@@ -21,6 +21,17 @@ |
386 |
- |
387 |
- #include <features.h> |
388 |
- |
389 |
-+#if !defined(__GLIBC__) |
390 |
-+/* C++ needs to know that types and declarations are C, not C++. */ |
391 |
-+#ifdef __cplusplus |
392 |
-+# define __BEGIN_DECLS extern "C" { |
393 |
-+# define __END_DECLS } |
394 |
-+#else |
395 |
-+# define __BEGIN_DECLS |
396 |
-+# define __END_DECLS |
397 |
-+#endif |
398 |
-+#endif |
399 |
-+ |
400 |
- __BEGIN_DECLS |
401 |
- |
402 |
- /* Standard ELF types. */ |
403 |
-diff -Naur elfutils-0.166.orig/libelf/elf_getarsym.c elfutils-0.166/libelf/elf_getarsym.c |
404 |
---- elfutils-0.166.orig/libelf/elf_getarsym.c 2016-11-15 12:19:07.089952130 -0800 |
405 |
-+++ elfutils-0.166/libelf/elf_getarsym.c 2016-11-15 12:26:59.361320514 -0800 |
406 |
-@@ -297,7 +297,7 @@ |
407 |
- arsym[cnt].as_off = (*u32)[cnt]; |
408 |
- |
409 |
- arsym[cnt].as_hash = _dl_elf_hash (str_data); |
410 |
-- str_data = rawmemchr (str_data, '\0') + 1; |
411 |
-+ str_data = memchr (str_data, '\0', SIZE_MAX) + 1; |
412 |
- } |
413 |
- |
414 |
- /* At the end a special entry. */ |
415 |
|
416 |
diff --git a/dev-libs/elfutils/files/elfutils-0.166-musl-obstack-fts.patch b/dev-libs/elfutils/files/elfutils-0.166-musl-obstack-fts.patch |
417 |
deleted file mode 100644 |
418 |
index 0d0a468..0000000 |
419 |
--- a/dev-libs/elfutils/files/elfutils-0.166-musl-obstack-fts.patch |
420 |
+++ /dev/null |
421 |
@@ -1,124 +0,0 @@ |
422 |
-diff -Naur elfutils-0.166.orig/configure.ac elfutils-0.166/configure.ac |
423 |
---- elfutils-0.166.orig/configure.ac 2016-11-15 12:19:07.231953443 -0800 |
424 |
-+++ elfutils-0.166/configure.ac 2016-11-15 12:20:59.299990043 -0800 |
425 |
-@@ -361,6 +361,60 @@ |
426 |
- fi |
427 |
- AC_SUBST([argp_LDADD]) |
428 |
- |
429 |
-+dnl Check if we have fts available from our libc |
430 |
-+AC_LINK_IFELSE( |
431 |
-+ [AC_LANG_PROGRAM( |
432 |
-+ [#if !defined(__x86_64__) |
433 |
-+ #undef _FILE_OFFSET_BITS |
434 |
-+ #define _FILE_OFFSET_BITS 32 |
435 |
-+ #endif |
436 |
-+ #include <fts.h>], |
437 |
-+ [FTS* fts = 0; return fts_close(fts); return 0;] |
438 |
-+ )], |
439 |
-+ [libc_has_fts="true"], |
440 |
-+ [libc_has_fts="false"] |
441 |
-+) |
442 |
-+ |
443 |
-+dnl If our libc doesn't provide fts, then test for libfts |
444 |
-+if test "$libc_has_fts" = "false" ; then |
445 |
-+ AC_MSG_WARN("libc does not have fts") |
446 |
-+ AC_CHECK_LIB([fts], [fts_close], [have_fts="true"], [have_fts="false"]) |
447 |
-+ |
448 |
-+ if test "$have_fts" = "false"; then |
449 |
-+ AC_MSG_ERROR("no libfts found") |
450 |
-+ else |
451 |
-+ fts_LDADD="-lfts" |
452 |
-+ fi |
453 |
-+else |
454 |
-+ fts_LDADD="" |
455 |
-+fi |
456 |
-+AC_SUBST([fts_LDADD]) |
457 |
-+ |
458 |
-+dnl Check if we have obstack available from our libc |
459 |
-+AC_LINK_IFELSE( |
460 |
-+ [AC_LANG_PROGRAM( |
461 |
-+ [#include <obstack.h>], |
462 |
-+ [_obstack_begin(0, 0, 0, NULL, NULL); return 0;] |
463 |
-+ )], |
464 |
-+ [libc_has_obstack="true"], |
465 |
-+ [libc_has_obstack="false"] |
466 |
-+) |
467 |
-+ |
468 |
-+dnl If our libc doesn't provide obstack, then test for libobstack |
469 |
-+if test "$libc_has_obstack" = "false" ; then |
470 |
-+ AC_MSG_WARN("libc does not have obstack") |
471 |
-+ AC_CHECK_LIB([obstack], [_obstack_begin], [have_obstack="true"], [have_obstack="false"]) |
472 |
-+ |
473 |
-+ if test "$have_obstack" = "false"; then |
474 |
-+ AC_MSG_ERROR("no libobstack found") |
475 |
-+ else |
476 |
-+ obstack_LDADD="-lobstack" |
477 |
-+ fi |
478 |
-+else |
479 |
-+ obstack_LDADD="" |
480 |
-+fi |
481 |
-+AC_SUBST([obstack_LDADD]) |
482 |
-+ |
483 |
- dnl The directories with content. |
484 |
- |
485 |
- dnl Documentation. |
486 |
-diff -Naur elfutils-0.166.orig/libdw/Makefile.am elfutils-0.166/libdw/Makefile.am |
487 |
---- elfutils-0.166.orig/libdw/Makefile.am 2016-11-15 12:19:07.142952620 -0800 |
488 |
-+++ elfutils-0.166/libdw/Makefile.am 2016-11-15 12:20:59.299990043 -0800 |
489 |
-@@ -112,7 +112,7 @@ |
490 |
- -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \ |
491 |
- -Wl,--version-script,$<,--no-undefined \ |
492 |
- -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ |
493 |
-- -ldl -lz $(argp_LDADD) $(zip_LIBS) |
494 |
-+ -ldl -lz $(argp_LDADD) $(fts_LDADD) $(obstack_LDADD) $(zip_LIBS) |
495 |
- @$(textrel_check) |
496 |
- $(AM_V_at)ln -fs $@ $@.$(VERSION) |
497 |
- |
498 |
-diff -Naur elfutils-0.166.orig/src/Makefile.am elfutils-0.166/src/Makefile.am |
499 |
---- elfutils-0.166.orig/src/Makefile.am 2016-11-15 12:19:07.072951972 -0800 |
500 |
-+++ elfutils-0.166/src/Makefile.am 2016-11-15 12:20:59.299990043 -0800 |
501 |
-@@ -104,28 +104,28 @@ |
502 |
- ar_no_Wstack_usage = yes |
503 |
- unstrip_no_Wstack_usage = yes |
504 |
- |
505 |
--readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl |
506 |
--nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl \ |
507 |
-+readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) $(fts_LDADD) $(obstack_LDADD) -ldl |
508 |
-+nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) $(fts_LDADD) $(obstack_LDADD) -ldl \ |
509 |
- $(demanglelib) |
510 |
--size_LDADD = $(libelf) $(libeu) $(argp_LDADD) |
511 |
--strip_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl |
512 |
--ld_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl |
513 |
-+size_LDADD = $(libelf) $(libeu) $(argp_LDADD) $(fts_LDADD) $(obstack_LDADD) |
514 |
-+strip_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) $(fts_LDADD) $(obstack_LDADD) -ldl |
515 |
-+ld_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) $(fts_LDADD) $(obstack_LDADD) -ldl |
516 |
- if NATIVE_LD |
517 |
- # -ldl is always needed for libebl. |
518 |
- ld_LDADD += libld_elf.a |
519 |
- endif |
520 |
- ld_LDFLAGS = -rdynamic |
521 |
--elflint_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl |
522 |
--findtextrel_LDADD = $(libdw) $(libelf) $(argp_LDADD) |
523 |
--addr2line_LDADD = $(libdw) $(libelf) $(argp_LDADD) $(demanglelib) |
524 |
--elfcmp_LDADD = $(libebl) $(libelf) $(argp_LDADD) -ldl |
525 |
--objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl |
526 |
--ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) |
527 |
--strings_LDADD = $(libelf) $(libeu) $(argp_LDADD) |
528 |
--ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) |
529 |
--unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl |
530 |
--stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl $(demanglelib) |
531 |
--elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) |
532 |
-+elflint_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) $(fts_LDADD) $(obstack_LDADD) -ldl |
533 |
-+findtextrel_LDADD = $(libdw) $(libelf) $(argp_LDADD) $(fts_LDADD) $(obstack_LDADD) |
534 |
-+addr2line_LDADD = $(libdw) $(libelf) $(argp_LDADD) $(fts_LDADD) $(obstack_LDADD) $(demanglelib) |
535 |
-+elfcmp_LDADD = $(libebl) $(libelf) $(argp_LDADD) $(fts_LDADD) $(obstack_LDADD) -ldl |
536 |
-+objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(argp_LDADD) $(fts_LDADD) $(obstack_LDADD) -ldl |
537 |
-+ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(fts_LDADD) $(obstack_LDADD) |
538 |
-+strings_LDADD = $(libelf) $(libeu) $(argp_LDADD) $(fts_LDADD) $(obstack_LDADD) |
539 |
-+ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(fts_LDADD) $(obstack_LDADD) |
540 |
-+unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) $(fts_LDADD) $(obstack_LDADD) -ldl |
541 |
-+stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) $(fts_LDADD) $(obstack_LDADD) -ldl $(demanglelib) |
542 |
-+elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) $(fts_LDADD) $(obstack_LDADD) |
543 |
- |
544 |
- ldlex.o: ldscript.c |
545 |
- ldlex_no_Werror = yes |
546 |
|
547 |
diff --git a/dev-libs/elfutils/files/elfutils-0.166-musl-utils.patch b/dev-libs/elfutils/files/elfutils-0.166-musl-utils.patch |
548 |
deleted file mode 100644 |
549 |
index c65ee7b..0000000 |
550 |
--- a/dev-libs/elfutils/files/elfutils-0.166-musl-utils.patch |
551 |
+++ /dev/null |
552 |
@@ -1,183 +0,0 @@ |
553 |
-diff -Naur elfutils-0.166.orig/src/arlib.h elfutils-0.166/src/arlib.h |
554 |
---- elfutils-0.166.orig/src/arlib.h 2016-11-15 12:44:09.296103178 -0800 |
555 |
-+++ elfutils-0.166/src/arlib.h 2016-11-15 12:44:34.238342067 -0800 |
556 |
-@@ -29,6 +29,12 @@ |
557 |
- #include <stdint.h> |
558 |
- #include <sys/types.h> |
559 |
- |
560 |
-+#if !defined(ALLPERMS) |
561 |
-+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */ |
562 |
-+#endif |
563 |
-+#if !defined(DEFFILEMODE) |
564 |
-+# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/ |
565 |
-+#endif |
566 |
- |
567 |
- /* State of -D/-U flags. */ |
568 |
- extern bool arlib_deterministic_output; |
569 |
-diff -Naur elfutils-0.166.orig/src/elfcompress.c elfutils-0.166/src/elfcompress.c |
570 |
---- elfutils-0.166.orig/src/elfcompress.c 2016-11-15 12:44:09.297103187 -0800 |
571 |
-+++ elfutils-0.166/src/elfcompress.c 2016-11-15 12:44:34.243342115 -0800 |
572 |
-@@ -35,6 +35,13 @@ |
573 |
- #include <gelf.h> |
574 |
- #include "system.h" |
575 |
- |
576 |
-+#if !defined(ALLPERMS) |
577 |
-+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */ |
578 |
-+#endif |
579 |
-+#if !defined(FNM_EXTMATCH) |
580 |
-+# define FNM_EXTMATCH ( 1 << 5) |
581 |
-+#endif |
582 |
-+ |
583 |
- /* Name and version of program. */ |
584 |
- static void print_version (FILE *stream, struct argp_state *state); |
585 |
- ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; |
586 |
-diff -Naur elfutils-0.166.orig/src/error.h elfutils-0.166/src/error.h |
587 |
---- elfutils-0.166.orig/src/error.h 1969-12-31 16:00:00.000000000 -0800 |
588 |
-+++ elfutils-0.166/src/error.h 2016-11-15 12:44:34.243342115 -0800 |
589 |
-@@ -0,0 +1,27 @@ |
590 |
-+#ifndef _ERROR_H_ |
591 |
-+#define _ERROR_H_ |
592 |
-+ |
593 |
-+#include <stdarg.h> |
594 |
-+#include <stdio.h> |
595 |
-+#include <stdlib.h> |
596 |
-+#include <string.h> |
597 |
-+#include <errno.h> |
598 |
-+ |
599 |
-+static unsigned int error_message_count = 0; |
600 |
-+ |
601 |
-+static inline void error(int status, int errnum, const char* format, ...) |
602 |
-+{ |
603 |
-+ va_list ap; |
604 |
-+ fprintf(stderr, "%s: ", program_invocation_name); |
605 |
-+ va_start(ap, format); |
606 |
-+ vfprintf(stderr, format, ap); |
607 |
-+ va_end(ap); |
608 |
-+ if (errnum) |
609 |
-+ fprintf(stderr, ": %s", strerror(errnum)); |
610 |
-+ fprintf(stderr, "\n"); |
611 |
-+ error_message_count++; |
612 |
-+ if (status) |
613 |
-+ exit(status); |
614 |
-+} |
615 |
-+ |
616 |
-+#endif /* _ERROR_H_ */ |
617 |
-diff -Naur elfutils-0.166.orig/src/ld.h elfutils-0.166/src/ld.h |
618 |
---- elfutils-0.166.orig/src/ld.h 2016-11-15 12:44:09.298103197 -0800 |
619 |
-+++ elfutils-0.166/src/ld.h 2016-11-15 12:44:34.244342124 -0800 |
620 |
-@@ -24,6 +24,16 @@ |
621 |
- #include <stdio.h> |
622 |
- #include "xelf.h" |
623 |
- |
624 |
-+#if !defined(DL_CALL_FCT) |
625 |
-+# define DL_CALL_FCT(fctp, args) (*fctp) args |
626 |
-+#endif /* !defined(DL_CALL_FCT) */ |
627 |
-+ |
628 |
-+#if !defined(ACCESSPERMS) |
629 |
-+# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */ |
630 |
-+#endif |
631 |
-+#if !defined(DEFFILEMODE) |
632 |
-+# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/ |
633 |
-+#endif |
634 |
- |
635 |
- /* Recommended size of the buffer passed to ld_strerror. */ |
636 |
- #define ERRBUFSIZE (512) |
637 |
-diff -Naur elfutils-0.166.orig/src/ldgeneric.c elfutils-0.166/src/ldgeneric.c |
638 |
---- elfutils-0.166.orig/src/ldgeneric.c 2016-11-15 12:44:09.296103178 -0800 |
639 |
-+++ elfutils-0.166/src/ldgeneric.c 2016-11-15 12:44:34.246342143 -0800 |
640 |
-@@ -2628,12 +2628,12 @@ |
641 |
- } |
642 |
- |
643 |
- |
644 |
--/* Callback function registered with on_exit to make sure the temporary |
645 |
-+/* Callback function registered with atexit to make sure the temporary |
646 |
- files gets removed if something goes wrong. */ |
647 |
- static void |
648 |
--remove_tempfile (int status, void *arg) |
649 |
-+remove_tempfile (void) |
650 |
- { |
651 |
-- if (status != 0 && ld_state.tempfname != NULL) |
652 |
-+ if (error_message_count != 0 && ld_state.tempfname != NULL) |
653 |
- unlink (ld_state.tempfname); |
654 |
- } |
655 |
- |
656 |
-@@ -2680,7 +2680,7 @@ |
657 |
- |
658 |
- /* Make sure we remove the temporary file in case something goes |
659 |
- wrong. */ |
660 |
-- on_exit (remove_tempfile, NULL); |
661 |
-+ atexit (remove_tempfile); |
662 |
- |
663 |
- /* Create the ELF file data for the output file. */ |
664 |
- Elf *elf = ld_state.outelf = elf_begin (fd, |
665 |
-diff -Naur elfutils-0.166.orig/src/readelf.c elfutils-0.166/src/readelf.c |
666 |
---- elfutils-0.166.orig/src/readelf.c 2016-11-15 12:44:09.301103225 -0800 |
667 |
-+++ elfutils-0.166/src/readelf.c 2016-11-15 12:44:49.816491269 -0800 |
668 |
-@@ -4487,10 +4487,11 @@ |
669 |
- return base; |
670 |
- } |
671 |
- |
672 |
-+static const char *listptr_name; |
673 |
-+ |
674 |
- static int |
675 |
--compare_listptr (const void *a, const void *b, void *arg) |
676 |
-+compare_listptr (const void *a, const void *b) |
677 |
- { |
678 |
-- const char *name = arg; |
679 |
- struct listptr *p1 = (void *) a; |
680 |
- struct listptr *p2 = (void *) b; |
681 |
- |
682 |
-@@ -4506,21 +4507,21 @@ |
683 |
- p1->warned = p2->warned = true; |
684 |
- error (0, 0, |
685 |
- gettext ("%s %#" PRIx64 " used with different address sizes"), |
686 |
-- name, (uint64_t) p1->offset); |
687 |
-+ listptr_name, (uint64_t) p1->offset); |
688 |
- } |
689 |
- if (p1->dwarf64 != p2->dwarf64) |
690 |
- { |
691 |
- p1->warned = p2->warned = true; |
692 |
- error (0, 0, |
693 |
- gettext ("%s %#" PRIx64 " used with different offset sizes"), |
694 |
-- name, (uint64_t) p1->offset); |
695 |
-+ listptr_name, (uint64_t) p1->offset); |
696 |
- } |
697 |
- if (listptr_base (p1) != listptr_base (p2)) |
698 |
- { |
699 |
- p1->warned = p2->warned = true; |
700 |
- error (0, 0, |
701 |
- gettext ("%s %#" PRIx64 " used with different base addresses"), |
702 |
-- name, (uint64_t) p1->offset); |
703 |
-+ listptr_name, (uint64_t) p1->offset); |
704 |
- } |
705 |
- } |
706 |
- |
707 |
-@@ -4585,9 +4586,11 @@ |
708 |
- static void |
709 |
- sort_listptr (struct listptr_table *table, const char *name) |
710 |
- { |
711 |
-- if (table->n > 0) |
712 |
-- qsort_r (table->table, table->n, sizeof table->table[0], |
713 |
-- &compare_listptr, (void *) name); |
714 |
-+ if (table->n > 0) { |
715 |
-+ listptr_name = name; |
716 |
-+ qsort (table->table, table->n, sizeof table->table[0], |
717 |
-+ &compare_listptr); |
718 |
-+ } |
719 |
- } |
720 |
- |
721 |
- static bool |
722 |
-diff -Naur elfutils-0.166.orig/src/strip.c elfutils-0.166/src/strip.c |
723 |
---- elfutils-0.166.orig/src/strip.c 2016-11-15 12:44:09.295103168 -0800 |
724 |
-+++ elfutils-0.166/src/strip.c 2016-11-15 12:44:34.250342182 -0800 |
725 |
-@@ -44,6 +44,10 @@ |
726 |
- #include <libebl.h> |
727 |
- #include <system.h> |
728 |
- |
729 |
-+#if !defined(ACCESSPERMS) |
730 |
-+#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) |
731 |
-+#endif |
732 |
-+ |
733 |
- typedef uint8_t GElf_Byte; |
734 |
- |
735 |
- /* Name and version of program. */ |
736 |
|
737 |
diff --git a/dev-libs/elfutils/files/elfutils-0.168-musl-obstack-fts.patch b/dev-libs/elfutils/files/elfutils-0.168-musl-obstack-fts.patch |
738 |
deleted file mode 100644 |
739 |
index 22c668e..0000000 |
740 |
--- a/dev-libs/elfutils/files/elfutils-0.168-musl-obstack-fts.patch |
741 |
+++ /dev/null |
742 |
@@ -1,102 +0,0 @@ |
743 |
-diff -Naur elfutils-0.168.orig/configure.ac elfutils-0.168/configure.ac |
744 |
---- elfutils-0.168.orig/configure.ac 2016-12-28 10:56:21.720729030 -0800 |
745 |
-+++ elfutils-0.168/configure.ac 2016-12-28 11:58:40.493268053 -0800 |
746 |
-@@ -355,6 +355,60 @@ |
747 |
- fi |
748 |
- AC_SUBST([argp_LDADD]) |
749 |
- |
750 |
-+dnl Check if we have fts available from our libc |
751 |
-+AC_LINK_IFELSE( |
752 |
-+ [AC_LANG_PROGRAM( |
753 |
-+ [#if !defined(__x86_64__) |
754 |
-+ #undef _FILE_OFFSET_BITS |
755 |
-+ #define _FILE_OFFSET_BITS 32 |
756 |
-+ #endif |
757 |
-+ #include <fts.h>], |
758 |
-+ [FTS* fts = 0; return fts_close(fts); return 0;] |
759 |
-+ )], |
760 |
-+ [libc_has_fts="true"], |
761 |
-+ [libc_has_fts="false"] |
762 |
-+) |
763 |
-+ |
764 |
-+dnl If our libc doesn't provide fts, then test for libfts |
765 |
-+if test "$libc_has_fts" = "false" ; then |
766 |
-+ AC_MSG_WARN("libc does not have fts") |
767 |
-+ AC_CHECK_LIB([fts], [fts_close], [have_fts="true"], [have_fts="false"]) |
768 |
-+ |
769 |
-+ if test "$have_fts" = "false"; then |
770 |
-+ AC_MSG_ERROR("no libfts found") |
771 |
-+ else |
772 |
-+ fts_LDADD="-lfts" |
773 |
-+ fi |
774 |
-+else |
775 |
-+ fts_LDADD="" |
776 |
-+fi |
777 |
-+AC_SUBST([fts_LDADD]) |
778 |
-+ |
779 |
-+dnl Check if we have obstack available from our libc |
780 |
-+AC_LINK_IFELSE( |
781 |
-+ [AC_LANG_PROGRAM( |
782 |
-+ [#include <obstack.h>], |
783 |
-+ [_obstack_begin(0, 0, 0, NULL, NULL); return 0;] |
784 |
-+ )], |
785 |
-+ [libc_has_obstack="true"], |
786 |
-+ [libc_has_obstack="false"] |
787 |
-+) |
788 |
-+ |
789 |
-+dnl If our libc doesn't provide obstack, then test for libobstack |
790 |
-+if test "$libc_has_obstack" = "false" ; then |
791 |
-+ AC_MSG_WARN("libc does not have obstack") |
792 |
-+ AC_CHECK_LIB([obstack], [_obstack_begin], [have_obstack="true"], [have_obstack="false"]) |
793 |
-+ |
794 |
-+ if test "$have_obstack" = "false"; then |
795 |
-+ AC_MSG_ERROR("no libobstack found") |
796 |
-+ else |
797 |
-+ obstack_LDADD="-lobstack" |
798 |
-+ fi |
799 |
-+else |
800 |
-+ obstack_LDADD="" |
801 |
-+fi |
802 |
-+AC_SUBST([obstack_LDADD]) |
803 |
-+ |
804 |
- dnl Check if we have <linux/bpf.h> for EM_BPF disassembly. |
805 |
- AC_CHECK_HEADERS(linux/bpf.h) |
806 |
- AM_CONDITIONAL(HAVE_LINUX_BPF_H, [test "x$ac_cv_header_linux_bpf_h" = "xyes"]) |
807 |
-diff -Naur elfutils-0.168.orig/libdw/Makefile.am elfutils-0.168/libdw/Makefile.am |
808 |
---- elfutils-0.168.orig/libdw/Makefile.am 2016-12-28 10:56:21.700728842 -0800 |
809 |
-+++ elfutils-0.168/libdw/Makefile.am 2016-12-28 11:58:40.494268063 -0800 |
810 |
-@@ -112,7 +112,7 @@ |
811 |
- -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \ |
812 |
- -Wl,--version-script,$<,--no-undefined \ |
813 |
- -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ |
814 |
-- -ldl -lz $(argp_LDADD) $(zip_LIBS) |
815 |
-+ -ldl -lz $(argp_LDADD) $(fts_LDADD) $(zip_LIBS) |
816 |
- @$(textrel_check) |
817 |
- $(AM_V_at)ln -fs $@ $@.$(VERSION) |
818 |
- |
819 |
-diff -Naur elfutils-0.168.orig/src/Makefile.am elfutils-0.168/src/Makefile.am |
820 |
---- elfutils-0.168.orig/src/Makefile.am 2016-12-28 10:56:21.570727621 -0800 |
821 |
-+++ elfutils-0.168/src/Makefile.am 2016-12-28 12:02:08.066297072 -0800 |
822 |
-@@ -68,8 +68,8 @@ |
823 |
- unstrip_no_Wstack_usage = yes |
824 |
- |
825 |
- readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl |
826 |
--nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl \ |
827 |
-- $(demanglelib) |
828 |
-+nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) \ |
829 |
-+ $(obstack_LDADD) -ldl $(demanglelib) |
830 |
- size_LDADD = $(libelf) $(libeu) $(argp_LDADD) |
831 |
- strip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl |
832 |
- elflint_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl |
833 |
-@@ -77,9 +77,9 @@ |
834 |
- addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib) |
835 |
- elfcmp_LDADD = $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl |
836 |
- objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) $(argp_LDADD) -ldl |
837 |
--ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) |
838 |
-+ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LDADD) |
839 |
- strings_LDADD = $(libelf) $(libeu) $(argp_LDADD) |
840 |
--ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) |
841 |
-+ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LDADD) |
842 |
- unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl |
843 |
- stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) -ldl $(demanglelib) |
844 |
- elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) |
845 |
|
846 |
diff --git a/dev-libs/elfutils/files/elfutils-0.168-musl-utils.patch b/dev-libs/elfutils/files/elfutils-0.168-musl-utils.patch |
847 |
deleted file mode 100644 |
848 |
index 486f6e3..0000000 |
849 |
--- a/dev-libs/elfutils/files/elfutils-0.168-musl-utils.patch |
850 |
+++ /dev/null |
851 |
@@ -1,122 +0,0 @@ |
852 |
-diff -Naur elfutils-0.168.orig/src/arlib.h elfutils-0.168/src/arlib.h |
853 |
---- elfutils-0.168.orig/src/arlib.h 2016-12-28 10:56:21.570727621 -0800 |
854 |
-+++ elfutils-0.168/src/arlib.h 2016-12-28 11:51:27.643036959 -0800 |
855 |
-@@ -29,6 +29,12 @@ |
856 |
- #include <stdint.h> |
857 |
- #include <sys/types.h> |
858 |
- |
859 |
-+#if !defined(ALLPERMS) |
860 |
-+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */ |
861 |
-+#endif |
862 |
-+#if !defined(DEFFILEMODE) |
863 |
-+# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/ |
864 |
-+#endif |
865 |
- |
866 |
- /* State of -D/-U flags. */ |
867 |
- extern bool arlib_deterministic_output; |
868 |
-diff -Naur elfutils-0.168.orig/src/elfcompress.c elfutils-0.168/src/elfcompress.c |
869 |
---- elfutils-0.168.orig/src/elfcompress.c 2016-12-28 10:56:21.569727612 -0800 |
870 |
-+++ elfutils-0.168/src/elfcompress.c 2016-12-28 11:53:53.587463560 -0800 |
871 |
-@@ -37,6 +37,13 @@ |
872 |
- #include "libeu.h" |
873 |
- #include "system.h" |
874 |
- |
875 |
-+#if !defined(ALLPERMS) |
876 |
-+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */ |
877 |
-+#endif |
878 |
-+#if !defined(FNM_EXTMATCH) |
879 |
-+# define FNM_EXTMATCH ( 1 << 5) |
880 |
-+#endif |
881 |
-+ |
882 |
- /* Name and version of program. */ |
883 |
- ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; |
884 |
- |
885 |
-diff -Naur elfutils-0.168.orig/src/readelf.c elfutils-0.168/src/readelf.c |
886 |
---- elfutils-0.168.orig/src/readelf.c 2016-12-28 10:56:21.572727640 -0800 |
887 |
-+++ elfutils-0.168/src/readelf.c 2016-12-28 11:45:38.460680025 -0800 |
888 |
-@@ -4490,10 +4490,11 @@ |
889 |
- return base; |
890 |
- } |
891 |
- |
892 |
-+static const char *listptr_name; |
893 |
-+ |
894 |
- static int |
895 |
--compare_listptr (const void *a, const void *b, void *arg) |
896 |
-+compare_listptr (const void *a, const void *b) |
897 |
- { |
898 |
-- const char *name = arg; |
899 |
- struct listptr *p1 = (void *) a; |
900 |
- struct listptr *p2 = (void *) b; |
901 |
- |
902 |
-@@ -4509,21 +4510,21 @@ |
903 |
- p1->warned = p2->warned = true; |
904 |
- error (0, 0, |
905 |
- gettext ("%s %#" PRIx64 " used with different address sizes"), |
906 |
-- name, (uint64_t) p1->offset); |
907 |
-+ listptr_name, (uint64_t) p1->offset); |
908 |
- } |
909 |
- if (p1->dwarf64 != p2->dwarf64) |
910 |
- { |
911 |
- p1->warned = p2->warned = true; |
912 |
- error (0, 0, |
913 |
- gettext ("%s %#" PRIx64 " used with different offset sizes"), |
914 |
-- name, (uint64_t) p1->offset); |
915 |
-+ listptr_name, (uint64_t) p1->offset); |
916 |
- } |
917 |
- if (listptr_base (p1) != listptr_base (p2)) |
918 |
- { |
919 |
- p1->warned = p2->warned = true; |
920 |
- error (0, 0, |
921 |
- gettext ("%s %#" PRIx64 " used with different base addresses"), |
922 |
-- name, (uint64_t) p1->offset); |
923 |
-+ listptr_name, (uint64_t) p1->offset); |
924 |
- } |
925 |
- } |
926 |
- |
927 |
-@@ -4589,8 +4590,11 @@ |
928 |
- sort_listptr (struct listptr_table *table, const char *name) |
929 |
- { |
930 |
- if (table->n > 0) |
931 |
-- qsort_r (table->table, table->n, sizeof table->table[0], |
932 |
-- &compare_listptr, (void *) name); |
933 |
-+ { |
934 |
-+ listptr_name = name; |
935 |
-+ qsort (table->table, table->n, sizeof table->table[0], |
936 |
-+ &compare_listptr); |
937 |
-+ } |
938 |
- } |
939 |
- |
940 |
- static bool |
941 |
-diff -Naur elfutils-0.168.orig/src/strip.c elfutils-0.168/src/strip.c |
942 |
---- elfutils-0.168.orig/src/strip.c 2016-12-28 10:56:21.571727631 -0800 |
943 |
-+++ elfutils-0.168/src/strip.c 2016-12-28 11:46:09.680979303 -0800 |
944 |
-@@ -45,6 +45,10 @@ |
945 |
- #include <libeu.h> |
946 |
- #include <system.h> |
947 |
- |
948 |
-+#if !defined(ACCESSPERMS) |
949 |
-+# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */ |
950 |
-+#endif |
951 |
-+ |
952 |
- typedef uint8_t GElf_Byte; |
953 |
- |
954 |
- /* Name and version of program. */ |
955 |
-diff -Naur elfutils-0.168.orig/src/unstrip.c elfutils-0.168/src/unstrip.c |
956 |
---- elfutils-0.168.orig/src/unstrip.c 2016-12-28 10:56:21.571727631 -0800 |
957 |
-+++ elfutils-0.168/src/unstrip.c 2016-12-28 11:57:40.821684766 -0800 |
958 |
-@@ -56,6 +56,15 @@ |
959 |
- # define _(str) gettext (str) |
960 |
- #endif |
961 |
- |
962 |
-+#ifndef strndupa |
963 |
-+#define strndupa(s, n) \ |
964 |
-+ ({const char *__in = (s); \ |
965 |
-+ size_t __len = strnlen (__in, (n)) + 1; \ |
966 |
-+ char *__out = (char *) alloca (__len); \ |
967 |
-+ __out[__len-1] = '\0'; \ |
968 |
-+ (char *) memcpy (__out, __in, __len-1);}) |
969 |
-+#endif |
970 |
-+ |
971 |
- /* Name and version of program. */ |
972 |
- ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; |
973 |
- |
974 |
|
975 |
diff --git a/dev-libs/elfutils/files/elfutils-0.171-musl-libs.patch b/dev-libs/elfutils/files/elfutils-0.171-musl-libs.patch |
976 |
new file mode 100644 |
977 |
index 0000000..80a5adb |
978 |
--- /dev/null |
979 |
+++ b/dev-libs/elfutils/files/elfutils-0.171-musl-libs.patch |
980 |
@@ -0,0 +1,86 @@ |
981 |
+diff -Naur elfutils-0.171.orig/lib/error.h elfutils-0.171/lib/error.h |
982 |
+--- elfutils-0.171.orig/lib/error.h 1969-12-31 16:00:00.000000000 -0800 |
983 |
++++ elfutils-0.171/lib/error.h 2018-06-11 10:11:15.910181114 -0700 |
984 |
+@@ -0,0 +1,27 @@ |
985 |
++#ifndef _ERROR_H_ |
986 |
++#define _ERROR_H_ |
987 |
++ |
988 |
++#include <stdarg.h> |
989 |
++#include <stdio.h> |
990 |
++#include <stdlib.h> |
991 |
++#include <string.h> |
992 |
++#include <errno.h> |
993 |
++ |
994 |
++static unsigned int error_message_count = 0; |
995 |
++ |
996 |
++static inline void error(int status, int errnum, const char* format, ...) |
997 |
++{ |
998 |
++ va_list ap; |
999 |
++ fprintf(stderr, "%s: ", program_invocation_name); |
1000 |
++ va_start(ap, format); |
1001 |
++ vfprintf(stderr, format, ap); |
1002 |
++ va_end(ap); |
1003 |
++ if (errnum) |
1004 |
++ fprintf(stderr, ": %s", strerror(errnum)); |
1005 |
++ fprintf(stderr, "\n"); |
1006 |
++ error_message_count++; |
1007 |
++ if (status) |
1008 |
++ exit(status); |
1009 |
++} |
1010 |
++ |
1011 |
++#endif /* _ERROR_H_ */ |
1012 |
+diff -Naur elfutils-0.171.orig/lib/fixedsizehash.h elfutils-0.171/lib/fixedsizehash.h |
1013 |
+--- elfutils-0.171.orig/lib/fixedsizehash.h 2018-06-11 10:11:02.222181359 -0700 |
1014 |
++++ elfutils-0.171/lib/fixedsizehash.h 2018-06-11 10:11:15.913181114 -0700 |
1015 |
+@@ -30,7 +30,6 @@ |
1016 |
+ #include <errno.h> |
1017 |
+ #include <stdlib.h> |
1018 |
+ #include <string.h> |
1019 |
+-#include <sys/cdefs.h> |
1020 |
+ |
1021 |
+ #include <system.h> |
1022 |
+ |
1023 |
+diff -Naur elfutils-0.171.orig/libdwfl/dwfl_error.c elfutils-0.171/libdwfl/dwfl_error.c |
1024 |
+--- elfutils-0.171.orig/libdwfl/dwfl_error.c 2018-06-11 10:11:02.245181359 -0700 |
1025 |
++++ elfutils-0.171/libdwfl/dwfl_error.c 2018-06-11 10:11:18.020181076 -0700 |
1026 |
+@@ -154,7 +154,16 @@ |
1027 |
+ switch (error &~ 0xffff) |
1028 |
+ { |
1029 |
+ case OTHER_ERROR (ERRNO): |
1030 |
++#if defined(__GLIBC__) |
1031 |
+ return strerror_r (error & 0xffff, "bad", 0); |
1032 |
++#else |
1033 |
++ { |
1034 |
++ static __thread char buf[128] = ""; |
1035 |
++ if (strerror_r (error & 0xffff, buf, sizeof(buf)) == 0) |
1036 |
++ return buf; |
1037 |
++ } |
1038 |
++ return "strerror_r() failed"; |
1039 |
++#endif |
1040 |
+ case OTHER_ERROR (LIBELF): |
1041 |
+ return elf_errmsg (error & 0xffff); |
1042 |
+ case OTHER_ERROR (LIBDW): |
1043 |
+diff -Naur elfutils-0.171.orig/libelf/elf.h elfutils-0.171/libelf/elf.h |
1044 |
+--- elfutils-0.171.orig/libelf/elf.h 2018-06-11 10:11:02.225181359 -0700 |
1045 |
++++ elfutils-0.171/libelf/elf.h 2018-06-11 10:11:19.036181058 -0700 |
1046 |
+@@ -21,7 +21,9 @@ |
1047 |
+ |
1048 |
+ #include <features.h> |
1049 |
+ |
1050 |
+-__BEGIN_DECLS |
1051 |
++#ifdef __cplusplus |
1052 |
++extern "C" { |
1053 |
++#endif |
1054 |
+ |
1055 |
+ /* Standard ELF types. */ |
1056 |
+ |
1057 |
+@@ -3912,6 +3914,8 @@ |
1058 |
+ #define R_METAG_TLS_LE_HI16 60 |
1059 |
+ #define R_METAG_TLS_LE_LO16 61 |
1060 |
+ |
1061 |
+-__END_DECLS |
1062 |
++#ifdef __cplusplus |
1063 |
++} |
1064 |
++#endif |
1065 |
+ |
1066 |
+ #endif /* elf.h */ |