aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAric Belsito <lluixhi@gmail.com>2017-05-22 12:00:38 -0700
committerAric Belsito <lluixhi@gmail.com>2017-05-22 12:00:38 -0700
commit00161b844975dea40348e50d265f6aad6c32e687 (patch)
tree4e6851bcb9af9ef8fe330dd93c4aa9a9cd5c6579 /dev-libs/elfutils
parentsys-fs/xfsprogs: version bump to 4.11.0 (diff)
downloadmusl-00161b844975dea40348e50d265f6aad6c32e687.tar.gz
musl-00161b844975dea40348e50d265f6aad6c32e687.tar.bz2
musl-00161b844975dea40348e50d265f6aad6c32e687.zip
dev-libs/elfutils: version bump to 0.169
Diffstat (limited to 'dev-libs/elfutils')
-rw-r--r--dev-libs/elfutils/Manifest8
-rw-r--r--dev-libs/elfutils/elfutils-0.166.ebuild1
-rw-r--r--dev-libs/elfutils/elfutils-0.169.ebuild (renamed from dev-libs/elfutils/elfutils-0.168.ebuild)19
-rw-r--r--dev-libs/elfutils/files/elfutils-0.168-musl-libs.patch173
-rw-r--r--dev-libs/elfutils/files/elfutils-0.169-musl-libs.patch110
5 files changed, 126 insertions, 185 deletions
diff --git a/dev-libs/elfutils/Manifest b/dev-libs/elfutils/Manifest
index 1a5b6bb..2ed0111 100644
--- a/dev-libs/elfutils/Manifest
+++ b/dev-libs/elfutils/Manifest
@@ -2,11 +2,11 @@ AUX elfutils-0.118-PaX-support.patch 954 SHA256 e769e1168dc645ce99655f984f5c19a5
AUX elfutils-0.166-musl-libs.patch 7954 SHA256 733db8f0d362910fa83fb32df6ee0ca6f460c4050c2d53a197c31d468bb71531 SHA512 e3ea9335fbc42e849aec80b4249effe9303066a7d569c999adb03436ec2b78c5a4fff61abba422da7f4c73967956c403d16c359f7ca9da6df64c3bce6eeff2ac WHIRLPOOL 0fb81171ae6102b85ba7bea3c876e0bcc09cc9f2a4ee3ee7ccfa7c35d0745b89cf423730da59d1eef45c885fa44626dfd68faadb12156b41d9902104c0dfd61f
AUX elfutils-0.166-musl-obstack-fts.patch 5276 SHA256 e6cd808c69c26907d13ad3e53f67a47f0a4e6a73a419421f021334338d64f5fc SHA512 7715375677001efc89c18cd11804fa21423331c831a10d24ebf1d591e9c66de56d965b244ea9fbc45cd7bf5236bd59bfcd8e684683871235153f1f2ef11e4d3d WHIRLPOOL d1d8aeb391d9eb7a5c967274606fe85d59fbeb5af9c5de7504bf901972634e5835d5056115c8eb6e59b6971b0db9f5d9456b26f13512a3783a869cf459c59406
AUX elfutils-0.166-musl-utils.patch 5703 SHA256 a8d7e456abe29e5ade35832d872eb56eaf29de0571ab0c38bc4cc7d5212b47ce SHA512 df0bafd47c46e2da7cd60e2063823a531c5ec5507207ca14d02f3f7cd1ee2bb21a77daf01b6f63decc9b55db25424375b05d04495a347c6c17f6ec32d8d62824 WHIRLPOOL d2a7809ef296ab9b83a4bf45aefb2ae8f916eab6c5276aef8bbe5f99af59c2f1cea847713d22be2f2c674f0e53fa36564a705121c512a51cc6cca2ac31933391
-AUX elfutils-0.168-musl-libs.patch 5959 SHA256 b61b43897db3f1a76d1f2721c13a888dbeafcbc6ed4f469ffb520d2ac38a0ef0 SHA512 bdaeb3962cfec49d33078bc9f02e0cf48c7459e4c4bd3efa5a899a2a4e40cbc4cbc530b53738a97a633c4852edd5377d95ae80619fa2642f182ba6b7f696fce9 WHIRLPOOL c4677fde127b01c4e6aee7124fdf984fa5b181e9ab6e9f8ee71668c03a62eb16904847ef015ed963feffee21db70be51632343e4eb3a5397d76cdd09907fe499
AUX elfutils-0.168-musl-obstack-fts.patch 3866 SHA256 f3f0993948744f4d18f2618b221edfb1bdb5e44afb25d84fb8017115acd7970d SHA512 a93faea92bcdc9bff7fffabc35626213b8efa7003b893753480250fab7295aabd415fbf947f09ebd9e0ab8037582e4fe5a689e2910845223b2f00eabb2f529c1 WHIRLPOOL ee8745e65281f9cd2aae1bfee9d6e9f9e20677ac4f013f79436f8749f43ed897a98744d78e090de6561737b2af26063743e93d8b7686fef02cc5792fdc3754bd
AUX elfutils-0.168-musl-utils.patch 3833 SHA256 5f939b8e9c19ed84239ca30715c5117e42a8a0b46e854311440dcad5508bfb46 SHA512 b3ab2c6f8e04507580feedddaf7c0a260c70d96550d7befb4e060f1b7619c69ceddff43dae407fd677be939c48556bfd253d5bedd619e85fd8418a6fdcab0b01 WHIRLPOOL 22751e586c78479bc087a16668fcd4f0bb37c019795fbfd4eb52fb7cc5784259868252a48b70429339a659e97815050717ed34cf7dee61661b0cb26925efdd4b
+AUX elfutils-0.169-musl-libs.patch 3579 SHA256 05de076b4bbf8b0db103b943841825868e25b28fdd057d1d534d50180ec22bdd SHA512 401df45eea61a9acea175676d184983758915ab68dc37d72332c73b9ae2fab69094bb24bd9db9d79ad4f7b60f67cbac518f79cbb33cad9a6d55289728116bad3 WHIRLPOOL 71ae07ea3e4206881e16e0da51a82285ea51efecafa6897df175b0a8aa777e7479d1a2c0b130d0a1f3c95c8f5aec34e6a046f0a85c94b21cd2296c4a89763025
DIST elfutils-0.166.tar.bz2 6496225 SHA256 3c056914c8a438b210be0d790463b960fc79d234c3f05ce707cbff80e94cba30 SHA512 543e8f9fbebbef86c40b1d6dc93da04a8431071aad636b70e7a1b9536450990b237d100d354c29fd0c3605074b7a0621f5bdaab4c2664be42b2912ad283bc614 WHIRLPOOL 4de083bbb397235dd46c2ba6e0cbb615825c13d7e8413015d5ff08d72deae1d9a508c0f6e5f90e27cc709870064bc53a51b2a681f2a9b80e1f658bb7dc475f8d
-DIST elfutils-0.168.tar.bz2 6840399 SHA256 b88d07893ba1373c7dd69a7855974706d05377766568a7d9002706d5de72c276 SHA512 c8f2077ffe6877ad9e9d2f553bf0576361799c601d246f53e1d99a6f7046794c5916e1087b97ad1d1e5f59f9debc20384f864d507ef6c4c75a8e767d15d6eb91 WHIRLPOOL 281e6917ad243c4f28dad48801d43c29b503da0198f1cd882b6e378b9016e0843088185a39909db75295484f28b963b711f68b80dc6cc810b3027a2ea5cce556
-EBUILD elfutils-0.166.ebuild 2541 SHA256 67c6a8b7aa2de1a7a03f6171e5608bcca22dfd9aff155dfc14a1797a6fbb5d0e SHA512 9cdf98e10533991996301355b4a9a03bb09b1afd0be5a0454a3a3ae09d559adb38d780db0d9ed8f29a8eab3dba01e5ba432a626084be0f30931fa9130cfbd8f1 WHIRLPOOL a4e427fb15611427e6b431f52d1f6324db97cd890553d87ac8a93c75c2740bc79db60860315ba0f6c25f7119f649dd452aca00c61cb585e75d3501a8f74a6528
-EBUILD elfutils-0.168.ebuild 2077 SHA256 c9cfc5b872bc5bfde37f0149d5129515eb9171925e08107218dfef4fd86e2f87 SHA512 baf7deed876788a7d21d126b1058c605612437b7114d517e39053e9c4ca1f3600fb41a73f991099b0d0b957213b81a84fc27471efdace9abd3e3a2ce6fde24f5 WHIRLPOOL 3754e1aa43f02c5e90b798c9ac97868c47c8b9e68e9e7133a49a24abf9f3279e29dac3c479deca76e10b029a4bc7b495c67dd8d111699ae0c630f0b5c286776b
+DIST elfutils-0.169.tar.bz2 8067758 SHA256 9412fac7b30872b738bc1ed1ebcaed54493c26ef9a67887913498c17b10f3bc2 SHA512 0a81a20bb2aff533d035d6b76f1403437b2e11bce390db57e34b8c26e4b9b3150346d83dddcbfbbdc58063f046ca3223508dba35c6ce88e375d201e7a777a8b9 WHIRLPOOL dc4f689b403160272dccb1e306ee3584f6d06156d3318d745bba46f9b4a31a477795223233ffb420b096b1c196aba09492e4ab5803f6150326b48e1045f92e06
+EBUILD elfutils-0.166.ebuild 2534 SHA256 871895d2063eb8de76d8a53097d44744d5a648b2a11b04e930f08a37dc4b0b4e SHA512 57f011f6758371eb072a0592d51e89e9ced73d795466a2c5158ebde65cc1d55ebe5f2e1e1bb2faec1f9891d1234d7ff5229fab82505d317678b01b204e3c4e17 WHIRLPOOL 4ea30b8d36cb3f50e997316312f41b916e3b2a34c6d5e91e350de34e61933b0bae2e7e930d6e012528d779b46f169625a5528cf6e210c113dab32f6543ad6483
+EBUILD elfutils-0.169.ebuild 2143 SHA256 e76610a9b7dc5f11e27f467dcb79f806658cdbbe144edf4fb9664b87ce3984c5 SHA512 e84565ef80741d57de00d19f94745dd1ee2423124c8c40e68e7bc6b887a686d85ac28222546715d0b9a62da37e1b27247aa53ff558ecf4e2503d3d942f6a1fb8 WHIRLPOOL 9afd964ead5393d136f6121c795650b1699746155f10199f8ce5634188e875ad82412d3f51075cebaf7204692f57b33b3ee661f21e6216b28aba127298bc2a8a
MISC metadata.xml 536 SHA256 c3a1800d65f3a779757015fa973588785610daa943a0f5781faf854792ef6993 SHA512 ad625d13a4e5411db4423030760ac51dd44e8da599409bff3e5607c02ed158421e90d7cec8c0b4c0228049b975d3c65a7dbebef78eedd7aca700d38612873cac WHIRLPOOL 4f06288344e8654c048b3ed2aaee8353e0f76a1623eb6936564f65954d52247db57903bdc70f50cd7465681887279024bad5ddd6c9d9c4297a17ef758bd1cf43
diff --git a/dev-libs/elfutils/elfutils-0.166.ebuild b/dev-libs/elfutils/elfutils-0.166.ebuild
index 9ed5b3f..ba6e6a0 100644
--- a/dev-libs/elfutils/elfutils-0.166.ebuild
+++ b/dev-libs/elfutils/elfutils-0.166.ebuild
@@ -1,6 +1,5 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Id$
EAPI="5"
diff --git a/dev-libs/elfutils/elfutils-0.168.ebuild b/dev-libs/elfutils/elfutils-0.169.ebuild
index 37e1f9c..b1de51a 100644
--- a/dev-libs/elfutils/elfutils-0.168.ebuild
+++ b/dev-libs/elfutils/elfutils-0.169.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI="5"
+EAPI=6
inherit autotools eutils flag-o-matic multilib-minimal
@@ -29,17 +29,20 @@ DEPEND="${RDEPEND}
)"
src_prepare() {
+ default
epatch "${FILESDIR}"/${PN}-0.118-PaX-support.patch
# Add MUSL patches
- epatch "${FILESDIR}"/${P}-musl-obstack-fts.patch
+ epatch "${FILESDIR}"/${PN}-0.168-musl-obstack-fts.patch
epatch "${FILESDIR}"/${P}-musl-libs.patch
- epatch "${FILESDIR}"/${P}-musl-utils.patch
+ epatch "${FILESDIR}"/${PN}-0.168-musl-utils.patch
eautoreconf
- use static-libs || sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in
- sed -i 's:-Werror::' */Makefile.in
+ if use static-libs; then
+ sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in || die
+ fi
+ sed -i 's:-Werror::' */Makefile.in || die
}
src_configure() {
@@ -69,5 +72,7 @@ multilib_src_install_all() {
dodoc NOTES
# These build quick, and are needed for most tests, so don't
# disable their building when the USE flag is disabled.
- use utils || rm -rf "${ED}"/usr/bin
+ if use utils; then
+ rm -rf "${ED}"/usr/bin || die
+ fi
}
diff --git a/dev-libs/elfutils/files/elfutils-0.168-musl-libs.patch b/dev-libs/elfutils/files/elfutils-0.168-musl-libs.patch
deleted file mode 100644
index 047cb99..0000000
--- a/dev-libs/elfutils/files/elfutils-0.168-musl-libs.patch
+++ /dev/null
@@ -1,173 +0,0 @@
-diff -Naur elfutils-0.168.orig/lib/error.h elfutils-0.168/lib/error.h
---- elfutils-0.168.orig/lib/error.h 1969-12-31 16:00:00.000000000 -0800
-+++ elfutils-0.168/lib/error.h 2016-12-28 11:32:13.814801412 -0800
-@@ -0,0 +1,27 @@
-+#ifndef _ERROR_H_
-+#define _ERROR_H_
-+
-+#include <stdarg.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <errno.h>
-+
-+static unsigned int error_message_count = 0;
-+
-+static inline void error(int status, int errnum, const char* format, ...)
-+{
-+ va_list ap;
-+ fprintf(stderr, "%s: ", program_invocation_name);
-+ va_start(ap, format);
-+ vfprintf(stderr, format, ap);
-+ va_end(ap);
-+ if (errnum)
-+ fprintf(stderr, ": %s", strerror(errnum));
-+ fprintf(stderr, "\n");
-+ error_message_count++;
-+ if (status)
-+ exit(status);
-+}
-+
-+#endif /* _ERROR_H_ */
-diff -Naur elfutils-0.168.orig/lib/fixedsizehash.h elfutils-0.168/lib/fixedsizehash.h
---- elfutils-0.168.orig/lib/fixedsizehash.h 2016-12-28 10:56:21.563727556 -0800
-+++ elfutils-0.168/lib/fixedsizehash.h 2016-12-28 11:32:13.815801422 -0800
-@@ -30,7 +30,6 @@
- #include <errno.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/cdefs.h>
-
- #include <system.h>
-
-diff -Naur elfutils-0.168.orig/lib/libeu.h elfutils-0.168/lib/libeu.h
---- elfutils-0.168.orig/lib/libeu.h 2016-12-28 10:56:21.562727546 -0800
-+++ elfutils-0.168/lib/libeu.h 2016-12-28 11:32:13.816801431 -0800
-@@ -29,6 +29,7 @@
- #ifndef LIBEU_H
- #define LIBEU_H
-
-+#include "system.h"
- #include <stddef.h>
- #include <stdint.h>
-
-diff -Naur elfutils-0.168.orig/lib/system.h elfutils-0.168/lib/system.h
---- elfutils-0.168.orig/lib/system.h 2016-12-28 10:56:21.564727565 -0800
-+++ elfutils-0.168/lib/system.h 2016-12-28 11:32:13.816801431 -0800
-@@ -81,7 +81,7 @@
- do \
- __res = expression; \
- while (__res == -1 && errno == EINTR); \
-- __res; });
-+ __res; })
- #endif
-
- static inline ssize_t __attribute__ ((unused))
-diff -Naur elfutils-0.168.orig/libdwfl/dwfl_build_id_find_elf.c elfutils-0.168/libdwfl/dwfl_build_id_find_elf.c
---- elfutils-0.168.orig/libdwfl/dwfl_build_id_find_elf.c 2016-12-28 10:56:21.720729030 -0800
-+++ elfutils-0.168/libdwfl/dwfl_build_id_find_elf.c 2016-12-28 11:32:13.816801431 -0800
-@@ -30,6 +30,7 @@
- #include <inttypes.h>
- #include <fcntl.h>
- #include <unistd.h>
-+#include "system.h"
-
-
- int
-@@ -94,7 +95,7 @@
- {
- if (*file_name != NULL)
- free (*file_name);
-- *file_name = canonicalize_file_name (name);
-+ *file_name = realpath (name, NULL);
- if (*file_name == NULL)
- {
- *file_name = name;
-diff -Naur elfutils-0.168.orig/libdwfl/dwfl_error.c elfutils-0.168/libdwfl/dwfl_error.c
---- elfutils-0.168.orig/libdwfl/dwfl_error.c 2016-12-28 10:56:21.714728974 -0800
-+++ elfutils-0.168/libdwfl/dwfl_error.c 2016-12-28 11:34:41.712239116 -0800
-@@ -154,7 +154,16 @@
- switch (error &~ 0xffff)
- {
- case OTHER_ERROR (ERRNO):
-+#if defined(__GLIBC__)
- return strerror_r (error & 0xffff, "bad", 0);
-+#else
-+ {
-+ static __thread char buf[128] = "";
-+ if (strerror_r (error & 0xffff, buf, sizeof(buf)) == 0)
-+ return buf;
-+ }
-+ return "strerror_r() failed";
-+#endif
- case OTHER_ERROR (LIBELF):
- return elf_errmsg (error & 0xffff);
- case OTHER_ERROR (LIBDW):
-diff -Naur elfutils-0.168.orig/libdwfl/dwfl_module_getdwarf.c elfutils-0.168/libdwfl/dwfl_module_getdwarf.c
---- elfutils-0.168.orig/libdwfl/dwfl_module_getdwarf.c 2016-12-28 10:56:21.710728936 -0800
-+++ elfutils-0.168/libdwfl/dwfl_module_getdwarf.c 2016-12-28 11:32:13.817801441 -0800
-@@ -33,6 +33,7 @@
- #include <unistd.h>
- #include "../libdw/libdwP.h" /* DWARF_E_* values are here. */
- #include "../libelf/libelfP.h"
-+#include "system.h"
-
- static inline Dwfl_Error
- open_elf_file (Elf **elf, int *fd, char **name)
-diff -Naur elfutils-0.168.orig/libdwfl/find-debuginfo.c elfutils-0.168/libdwfl/find-debuginfo.c
---- elfutils-0.168.orig/libdwfl/find-debuginfo.c 2016-12-28 10:56:21.716728992 -0800
-+++ elfutils-0.168/libdwfl/find-debuginfo.c 2016-12-28 11:32:13.817801441 -0800
-@@ -385,7 +385,7 @@
- /* If FILE_NAME is a symlink, the debug file might be associated
- with the symlink target name instead. */
-
-- char *canon = canonicalize_file_name (file_name);
-+ char *canon = realpath (file_name, NULL);
- if (canon != NULL && strcmp (file_name, canon))
- fd = find_debuginfo_in_path (mod, canon,
- debuglink_file, debuglink_crc,
-diff -Naur elfutils-0.168.orig/libdwfl/libdwfl_crc32_file.c elfutils-0.168/libdwfl/libdwfl_crc32_file.c
---- elfutils-0.168.orig/libdwfl/libdwfl_crc32_file.c 2016-12-28 10:56:21.710728936 -0800
-+++ elfutils-0.168/libdwfl/libdwfl_crc32_file.c 2016-12-28 11:32:13.817801441 -0800
-@@ -31,6 +31,5 @@
-
- #define crc32_file attribute_hidden __libdwfl_crc32_file
- #define crc32 __libdwfl_crc32
--#define LIB_SYSTEM_H 1
- #include <libdwflP.h>
- #include "../lib/crc32_file.c"
-diff -Naur elfutils-0.168.orig/libdwfl/linux-kernel-modules.c elfutils-0.168/libdwfl/linux-kernel-modules.c
---- elfutils-0.168.orig/libdwfl/linux-kernel-modules.c 2016-12-28 10:56:21.717729002 -0800
-+++ elfutils-0.168/libdwfl/linux-kernel-modules.c 2016-12-28 11:32:13.818801450 -0800
-@@ -45,6 +45,7 @@
- #include <sys/utsname.h>
- #include <fcntl.h>
- #include <unistd.h>
-+#include "system.h"
-
- /* If fts.h is included before config.h, its indirect inclusions may not
- give us the right LFS aliases of these functions, so map them manually. */
-diff -Naur elfutils-0.168.orig/libelf/elf.h elfutils-0.168/libelf/elf.h
---- elfutils-0.168.orig/libelf/elf.h 2016-12-28 10:56:21.585727762 -0800
-+++ elfutils-0.168/libelf/elf.h 2016-12-28 11:32:13.819801460 -0800
-@@ -21,7 +21,9 @@
-
- #include <features.h>
-
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /* Standard ELF types. */
-
-@@ -3682,6 +3684,7 @@
- #define R_BPF_NONE 0 /* No reloc */
- #define R_BPF_MAP_FD 1 /* Map fd to pointer */
-
--__END_DECLS
--
-+#ifdef __cplusplus
-+}
-+#endif
- #endif /* elf.h */
diff --git a/dev-libs/elfutils/files/elfutils-0.169-musl-libs.patch b/dev-libs/elfutils/files/elfutils-0.169-musl-libs.patch
new file mode 100644
index 0000000..0fcf72d
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.169-musl-libs.patch
@@ -0,0 +1,110 @@
+diff -Naur elfutils-0.169.orig/lib/error.h elfutils-0.169/lib/error.h
+--- elfutils-0.169.orig/lib/error.h 1969-12-31 16:00:00.000000000 -0800
++++ elfutils-0.169/lib/error.h 2017-05-22 11:46:56.303656762 -0700
+@@ -0,0 +1,27 @@
++#ifndef _ERROR_H_
++#define _ERROR_H_
++
++#include <stdarg.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <errno.h>
++
++static unsigned int error_message_count = 0;
++
++static inline void error(int status, int errnum, const char* format, ...)
++{
++ va_list ap;
++ fprintf(stderr, "%s: ", program_invocation_name);
++ va_start(ap, format);
++ vfprintf(stderr, format, ap);
++ va_end(ap);
++ if (errnum)
++ fprintf(stderr, ": %s", strerror(errnum));
++ fprintf(stderr, "\n");
++ error_message_count++;
++ if (status)
++ exit(status);
++}
++
++#endif /* _ERROR_H_ */
+diff -Naur elfutils-0.169.orig/lib/fixedsizehash.h elfutils-0.169/lib/fixedsizehash.h
+--- elfutils-0.169.orig/lib/fixedsizehash.h 2017-05-22 11:45:32.228023470 -0700
++++ elfutils-0.169/lib/fixedsizehash.h 2017-05-22 11:47:08.380737748 -0700
+@@ -30,7 +30,6 @@
+ #include <errno.h>
+ #include <stdlib.h>
+ #include <string.h>
+-#include <sys/cdefs.h>
+
+ #include <system.h>
+
+diff -Naur elfutils-0.169.orig/libdwfl/dwfl_build_id_find_elf.c elfutils-0.169/libdwfl/dwfl_build_id_find_elf.c
+--- elfutils-0.169.orig/libdwfl/dwfl_build_id_find_elf.c 2017-05-22 11:45:32.397025345 -0700
++++ elfutils-0.169/libdwfl/dwfl_build_id_find_elf.c 2017-05-22 11:48:25.398377146 -0700
+@@ -99,7 +99,7 @@
+ {
+ if (*file_name != NULL)
+ free (*file_name);
+- *file_name = canonicalize_file_name (name);
++ *file_name = realpath (name, NULL);
+ if (*file_name == NULL)
+ {
+ *file_name = name;
+diff -Naur elfutils-0.169.orig/libdwfl/dwfl_error.c elfutils-0.169/libdwfl/dwfl_error.c
+--- elfutils-0.169.orig/libdwfl/dwfl_error.c 2017-05-22 11:45:32.391025278 -0700
++++ elfutils-0.169/libdwfl/dwfl_error.c 2017-05-22 11:48:49.678619010 -0700
+@@ -154,7 +154,16 @@
+ switch (error &~ 0xffff)
+ {
+ case OTHER_ERROR (ERRNO):
++#if defined(__GLIBC__)
+ return strerror_r (error & 0xffff, "bad", 0);
++#else
++ {
++ static __thread char buf[128] = "";
++ if (strerror_r (error & 0xffff, buf, sizeof(buf)) == 0)
++ return buf;
++ }
++ return "strerror_r() failed";
++#endif
+ case OTHER_ERROR (LIBELF):
+ return elf_errmsg (error & 0xffff);
+ case OTHER_ERROR (LIBDW):
+diff -Naur elfutils-0.169.orig/libdwfl/find-debuginfo.c elfutils-0.169/libdwfl/find-debuginfo.c
+--- elfutils-0.169.orig/libdwfl/find-debuginfo.c 2017-05-22 11:45:32.393025301 -0700
++++ elfutils-0.169/libdwfl/find-debuginfo.c 2017-05-22 11:49:16.492886117 -0700
+@@ -389,7 +389,7 @@
+ /* If FILE_NAME is a symlink, the debug file might be associated
+ with the symlink target name instead. */
+
+- char *canon = canonicalize_file_name (file_name);
++ char *canon = realpath (file_name, NULL);
+ if (canon != NULL && strcmp (file_name, canon))
+ fd = find_debuginfo_in_path (mod, canon,
+ debuglink_file, debuglink_crc,
+diff -Naur elfutils-0.169.orig/libelf/elf.h elfutils-0.169/libelf/elf.h
+--- elfutils-0.169.orig/libelf/elf.h 2017-05-22 11:45:32.267023903 -0700
++++ elfutils-0.169/libelf/elf.h 2017-05-22 11:50:20.851532624 -0700
+@@ -21,7 +21,9 @@
+
+ #include <features.h>
+
+-__BEGIN_DECLS
++#ifdef __cplusplus
++extern "C" {
++#endif
+
+ /* Standard ELF types. */
+
+@@ -3683,6 +3685,8 @@
+ #define R_BPF_NONE 0 /* No reloc */
+ #define R_BPF_MAP_FD 1 /* Map fd to pointer */
+
+-__END_DECLS
++#ifdef __cplusplus
++}
++#endif
+
+ #endif /* elf.h */