aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/elfutils/patches
diff options
context:
space:
mode:
Diffstat (limited to 'package/libs/elfutils/patches')
-rw-r--r--package/libs/elfutils/patches/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch34
-rw-r--r--package/libs/elfutils/patches/003-libintl-compatibility.patch56
-rw-r--r--package/libs/elfutils/patches/005-build_only_libs.patch8
-rw-r--r--package/libs/elfutils/patches/006-Fix-build-on-aarch64-musl.patch6
-rw-r--r--package/libs/elfutils/patches/100-musl-compat.patch48
-rw-r--r--package/libs/elfutils/patches/101-no-fts.patch6
-rw-r--r--package/libs/elfutils/patches/110-no-cdefs.patch51
7 files changed, 27 insertions, 182 deletions
diff --git a/package/libs/elfutils/patches/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch b/package/libs/elfutils/patches/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch
deleted file mode 100644
index 904da2b44ef..00000000000
--- a/package/libs/elfutils/patches/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From http://cgit.openembedded.org/openembedded-core/plain/meta/recipes-devtools/elfutils/files/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch
-
-From 2e2232d0935bf8ef6e66ebffba3be68a73b5b3e5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sun, 8 Sep 2019 15:57:59 -0700
-Subject: [PATCH] ppc_initreg.c: Incliude asm/ptrace.h for pt_regs definition
-
-Fixes
-| ../../elfutils-0.176/backends/ppc_initreg.c:79:22: error: field 'r' has incomplete type
-| struct pt_regs r;
-| ^
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- backends/ppc_initreg.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c
-index 0e0d359..e5cca7e 100644
---- a/backends/ppc_initreg.c
-+++ b/backends/ppc_initreg.c
-@@ -33,6 +33,7 @@
- #include <stdlib.h>
- #if defined(__powerpc__) && defined(__linux__)
- # include <sys/ptrace.h>
-+# include <asm/ptrace.h>
- # include <sys/user.h>
- #endif
-
---
-2.23.0
-
diff --git a/package/libs/elfutils/patches/003-libintl-compatibility.patch b/package/libs/elfutils/patches/003-libintl-compatibility.patch
index e883a302e61..1271796af54 100644
--- a/package/libs/elfutils/patches/003-libintl-compatibility.patch
+++ b/package/libs/elfutils/patches/003-libintl-compatibility.patch
@@ -8,12 +8,12 @@
+Libs: -L${libdir} -lelf @intl_LDFLAGS@
Cflags: -I${includedir}
- Requires.private: zlib
+ Requires.private: zlib @LIBZSTD@
--- a/configure.ac
+++ b/configure.ac
-@@ -586,6 +586,9 @@ AC_CONFIG_FILES([config/libelf.pc config
- AC_SUBST(USE_NLS, yes)
- AM_PO_SUBDIRS
+@@ -717,6 +717,9 @@ dnl AM_GNU_GETTEXT_REQUIRE_VERSION suppo
+ AM_GNU_GETTEXT_VERSION([0.19.6])
+ AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6])
+case "$USE_NLS" in yes) intl_LDFLAGS="-lintl" ;; esac
+AC_SUBST([intl_LDFLAGS])
@@ -21,51 +21,3 @@
dnl Appended to the config.h file.
dnl We hide all kinds of configuration magic in lib/eu-config.h.
AH_BOTTOM([#include <eu-config.h>])
---- a/libasm/libasmP.h
-+++ b/libasm/libasmP.h
-@@ -36,6 +36,9 @@
-
- #include "libdwelf.h"
-
-+#ifdef _ /* fix libintl-stub */
-+#undef _
-+#endif
- /* gettext helper macros. */
- #define _(Str) dgettext ("elfutils", Str)
-
---- a/libdw/libdwP.h
-+++ b/libdw/libdwP.h
-@@ -37,6 +37,9 @@
- #include <dwarf.h>
- #include "atomics.h"
-
-+#ifdef _ /* fix libintl-stub */
-+#undef _
-+#endif
-
- /* gettext helper macros. */
- #define _(Str) dgettext ("elfutils", Str)
---- a/libdwfl/libdwflP.h
-+++ b/libdwfl/libdwflP.h
-@@ -44,6 +44,9 @@
-
- typedef struct Dwfl_Process Dwfl_Process;
-
-+#ifdef _ /* fix libintl-stub */
-+#undef _
-+#endif
- /* gettext helper macros. */
- #define _(Str) dgettext ("elfutils", Str)
-
---- a/libelf/libelfP.h
-+++ b/libelf/libelfP.h
-@@ -39,6 +39,9 @@
- #include <stdio.h>
- #include <string.h>
-
-+#ifdef _ /* fix libintl-stub */
-+#undef _
-+#endif
- /* gettext helper macros. */
- #define _(Str) dgettext ("elfutils", Str)
-
diff --git a/package/libs/elfutils/patches/005-build_only_libs.patch b/package/libs/elfutils/patches/005-build_only_libs.patch
index a81d1d2cabe..304b85c47a1 100644
--- a/package/libs/elfutils/patches/005-build_only_libs.patch
+++ b/package/libs/elfutils/patches/005-build_only_libs.patch
@@ -3,9 +3,9 @@
@@ -27,7 +27,7 @@ AM_MAKEFLAGS = --no-print-directory
pkginclude_HEADERS = version.h
- SUBDIRS = config m4 lib libelf libcpu backends libebl libdwelf libdwfl libdw \
-- libasm src po doc tests
+ SUBDIRS = config lib libelf libcpu backends libebl libdwelf libdwfl libdw \
+- libasm debuginfod src po doc tests
+ libasm
- if DEBUGINFOD
- SUBDIRS += debuginfod
+ EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
+ COPYING COPYING-GPLV2 COPYING-LGPLV3
diff --git a/package/libs/elfutils/patches/006-Fix-build-on-aarch64-musl.patch b/package/libs/elfutils/patches/006-Fix-build-on-aarch64-musl.patch
index 6f7956c5ae3..d8066c5ca71 100644
--- a/package/libs/elfutils/patches/006-Fix-build-on-aarch64-musl.patch
+++ b/package/libs/elfutils/patches/006-Fix-build-on-aarch64-musl.patch
@@ -22,8 +22,6 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
backends/arm_initreg.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
-diff --git a/backends/aarch64_initreg.c b/backends/aarch64_initreg.c
-index daf6f37..6445276 100644
--- a/backends/aarch64_initreg.c
+++ b/backends/aarch64_initreg.c
@@ -33,7 +33,7 @@
@@ -35,7 +33,7 @@ index daf6f37..6445276 100644
# include <sys/user.h>
# include <sys/ptrace.h>
/* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */
-@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t tid __attribute__ ((unused)),
+@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t
Dwarf_Word dwarf_fregs[32];
for (int r = 0; r < 32; r++)
@@ -44,8 +42,6 @@ index daf6f37..6445276 100644
if (! setfunc (64, 32, dwarf_fregs, arg))
return false;
-diff --git a/backends/arm_initreg.c b/backends/arm_initreg.c
-index efcabaf..062bb9e 100644
--- a/backends/arm_initreg.c
+++ b/backends/arm_initreg.c
@@ -38,7 +38,7 @@
diff --git a/package/libs/elfutils/patches/100-musl-compat.patch b/package/libs/elfutils/patches/100-musl-compat.patch
index 508ff9e946f..3fa095bd74d 100644
--- a/package/libs/elfutils/patches/100-musl-compat.patch
+++ b/package/libs/elfutils/patches/100-musl-compat.patch
@@ -1,27 +1,3 @@
-https://sourceware.org/bugzilla/show_bug.cgi?id=21002
-
---- a/lib/system.h
-+++ b/lib/system.h
-@@ -30,7 +30,18 @@
- #define LIB_SYSTEM_H 1
-
- #include <errno.h>
--#include <error.h>
-+#ifdef HAVE_ERROR_H
-+#include "error.h"
-+#else
-+#include "err.h"
-+#include <stdio.h>
-+#define error(status, errno, ...) \
-+ do { \
-+ fflush(stdout); \
-+ warn(__VA_ARGS__); \
-+ if (status) exit(status); \
-+ } while(0)
-+#endif
- #include <stddef.h>
- #include <stdint.h>
- #include <sys/param.h>
--- a/libdw/libdw_alloc.c
+++ b/libdw/libdw_alloc.c
@@ -152,5 +152,5 @@ __attribute ((noreturn)) attribute_hidde
@@ -33,15 +9,21 @@ https://sourceware.org/bugzilla/show_bug.cgi?id=21002
}
--- a/libdwfl/dwfl_error.c
+++ b/libdwfl/dwfl_error.c
-@@ -154,7 +154,11 @@ dwfl_errmsg (int error)
- switch (error &~ 0xffff)
- {
- case OTHER_ERROR (ERRNO):
+@@ -139,6 +139,7 @@ __libdwfl_seterrno (Dwfl_Error error)
+ static const char *
+ errnomsg(int error)
+ {
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
- return strerror_r (error & 0xffff, "bad", 0);
+ /* Won't be changed by strerror_r, but not const so compiler doesn't throw warning */
+ static char unknown[] = "unknown error";
+
+@@ -149,6 +150,9 @@ errnomsg(int error)
+ static __thread char msg[128];
+ return strerror_r (error, msg, sizeof (msg)) ? unknown : msg;
+ #endif
+#else
-+ return strerror (error & 0xffff);
++ return strerror (error & 0xffff);
+#endif
- case OTHER_ERROR (LIBELF):
- return elf_errmsg (error & 0xffff);
- case OTHER_ERROR (LIBDW):
+ }
+
+ const char *
diff --git a/package/libs/elfutils/patches/101-no-fts.patch b/package/libs/elfutils/patches/101-no-fts.patch
index 29ec9ecac04..29a6c4b36cb 100644
--- a/package/libs/elfutils/patches/101-no-fts.patch
+++ b/package/libs/elfutils/patches/101-no-fts.patch
@@ -1,6 +1,6 @@
--- a/libdwfl/argp-std.c
+++ b/libdwfl/argp-std.c
-@@ -56,9 +56,6 @@ static const struct argp_option options[
+@@ -51,9 +51,6 @@ static const struct argp_option options[
{ "linux-process-map", 'M', "FILE", 0,
N_("Find addresses in files mapped as read from FILE"
" in Linux /proc/PID/maps format"), 0 },
@@ -10,7 +10,7 @@
{ "debuginfo-path", OPT_DEBUGINFO, "PATH", 0,
N_("Search path for separate debuginfo files"), 0 },
{ NULL, 0, NULL, 0, NULL, 0 }
-@@ -85,15 +82,6 @@ static const Dwfl_Callbacks proc_callbac
+@@ -80,15 +77,6 @@ static const Dwfl_Callbacks proc_callbac
.find_elf = INTUSE(dwfl_linux_proc_find_elf),
};
@@ -26,7 +26,7 @@
/* Structure held at state->HOOK. */
struct parse_opt
{
-@@ -226,43 +214,6 @@ parse_opt (int key, char *arg, struct ar
+@@ -221,43 +209,6 @@ parse_opt (int key, char *arg, struct ar
}
break;
diff --git a/package/libs/elfutils/patches/110-no-cdefs.patch b/package/libs/elfutils/patches/110-no-cdefs.patch
deleted file mode 100644
index f95625a9131..00000000000
--- a/package/libs/elfutils/patches/110-no-cdefs.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From e399540ab67ffe83ca3c4cb768a2f0f2f32a9057 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Sun, 5 Apr 2020 15:56:59 -0700
-Subject: [PATCH] libelf: remove usage of sys/cdefs
-
-sys/cdefs is a deprecated glibc header that is unavailable with other
-libc implementations such as musl.
-
-features.h under glibc includes sys/cdefs whereas it does not under musl.
-
-Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- lib/fixedsizehash.h | 1 -
- libelf/elf.h | 10 ++++++----
- 2 files changed, 6 insertions(+), 5 deletions(-)
-
---- a/lib/fixedsizehash.h
-+++ b/lib/fixedsizehash.h
-@@ -30,7 +30,6 @@
- #include <errno.h>
- #include <stdlib.h>
- #include <string.h>
--#include <sys/cdefs.h>
-
- #include <system.h>
-
---- a/libelf/elf.h
-+++ b/libelf/elf.h
-@@ -19,9 +19,9 @@
- #ifndef _ELF_H
- #define _ELF_H 1
-
--#include <features.h>
--
--__BEGIN_DECLS
-+#ifdef __cplusplus
-+extern "C" {
-+#endif
-
- /* Standard ELF types. */
-
-@@ -4103,6 +4103,8 @@ enum
- #define R_ARC_TLS_LE_S9 0x4a
- #define R_ARC_TLS_LE_32 0x4b
-
--__END_DECLS
-+#ifdef __cplusplus
-+}
-+#endif
-
- #endif /* elf.h */