From 6835ea13f0fa2c3a6036e2af7d6f52839cf93d9a Mon Sep 17 00:00:00 2001 From: "Sergey V. Lobanov" Date: Tue, 4 Jan 2022 17:22:07 +0300 Subject: [PATCH] elfutils: update to 0.186 Upstreamed patches (deleted): 0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch - https://sourceware.org/git/?p=elfutils.git;a=commitdiff;h=8382833a257b57b0d288be07d2d5e7af6c102869 110-no-cdefs.patch - https://sourceware.org/git/?p=elfutils.git;a=commitdiff;h=d390548df1942e98a1d836269a5e41ba52e121f1 Auto-refreshed: 006-Fix-build-on-aarch64-musl.patch 101-no-fts.patch Manually updated and refreshed: 005-build_only_libs.patch 003-libintl-compatibility.patch 100-musl-compat.patch Disabled _obstack_free check (via configure vars) Signed-off-by: Sergey V. Lobanov --- package/libs/elfutils/Makefile | 10 +++- ...cliude-asm-ptrace.h-for-pt_regs-defi.patch | 29 ---------- .../patches/003-libintl-compatibility.patch | 54 ++----------------- .../patches/005-build_only_libs.patch | 2 +- .../elfutils/patches/100-musl-compat.patch | 48 ++++++----------- .../libs/elfutils/patches/101-no-fts.patch | 6 +-- .../libs/elfutils/patches/110-no-cdefs.patch | 26 --------- 7 files changed, 30 insertions(+), 145 deletions(-) delete mode 100644 package/libs/elfutils/patches/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch delete mode 100644 package/libs/elfutils/patches/110-no-cdefs.patch diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile index b0c9b8bd8ca5..f9a350f9fed5 100644 --- a/package/libs/elfutils/Makefile +++ b/package/libs/elfutils/Makefile @@ -7,12 +7,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=elfutils -PKG_VERSION:=0.182 +PKG_VERSION:=0.186 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION) -PKG_HASH:=ecc406914edf335f0b7fc084ebe6c460c4d6d5175bfdd6688c1c78d9146b8858 +PKG_HASH:=7f6fb9149b1673d38d9178a0d3e0fb8a1ec4f53a9f4c2ff89469609879641177 PKG_MAINTAINER:=Luiz Angelo Daros de Luca PKG_LICENSE:=GPL-3.0-or-later @@ -74,6 +74,12 @@ CONFIGURE_ARGS += \ --without-lzma \ --without-zstd +HOST_CONFIGURE_VARS += \ + ac_cv_search__obstack_free=yes + +CONFIGURE_VARS += \ + ac_cv_search__obstack_free=yes + TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral define Build/InstallDev 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 839f86ee6a32..000000000000 --- a/package/libs/elfutils/patches/0001-ppc_initreg.c-Incliude-asm-ptrace.h-for-pt_regs-defi.patch +++ /dev/null @@ -1,29 +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 -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 ---- - backends/ppc_initreg.c | 1 + - 1 file changed, 1 insertion(+) - ---- a/backends/ppc_initreg.c -+++ b/backends/ppc_initreg.c -@@ -33,6 +33,7 @@ - #include - #if defined(__powerpc__) && defined(__linux__) - # include -+# include - # include - #endif - diff --git a/package/libs/elfutils/patches/003-libintl-compatibility.patch b/package/libs/elfutils/patches/003-libintl-compatibility.patch index 26fcc85c8b63..3254dcffb261 100644 --- a/package/libs/elfutils/patches/003-libintl-compatibility.patch +++ b/package/libs/elfutils/patches/003-libintl-compatibility.patch @@ -11,9 +11,9 @@ Requires.private: zlib --- a/configure.ac +++ b/configure.ac -@@ -590,6 +590,9 @@ AC_CONFIG_FILES([config/libelf.pc config - AC_SUBST(USE_NLS, yes) - AM_PO_SUBDIRS +@@ -610,6 +610,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 ]) ---- 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 - #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 -@@ -47,6 +47,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 - #include - -+#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 501348f21cfb..304b85c47a1d 100644 --- a/package/libs/elfutils/patches/005-build_only_libs.patch +++ b/package/libs/elfutils/patches/005-build_only_libs.patch @@ -3,7 +3,7 @@ @@ -27,7 +27,7 @@ AM_MAKEFLAGS = --no-print-directory pkginclude_HEADERS = version.h - SUBDIRS = config m4 lib libelf libcpu backends libebl libdwelf libdwfl libdw \ + SUBDIRS = config lib libelf libcpu backends libebl libdwelf libdwfl libdw \ - libasm debuginfod src po doc tests + libasm diff --git a/package/libs/elfutils/patches/100-musl-compat.patch b/package/libs/elfutils/patches/100-musl-compat.patch index 508ff9e946f4..52b9f2c43b7e 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 --#include -+#ifdef HAVE_ERROR_H -+#include "error.h" -+#else -+#include "err.h" -+#include -+#define error(status, errno, ...) \ -+ do { \ -+ fflush(stdout); \ -+ warn(__VA_ARGS__); \ -+ if (status) exit(status); \ -+ } while(0) -+#endif - #include - #include - #include --- 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): +@@ -140,6 +140,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"; + +@@ -150,6 +151,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 29ec9ecac045..c4f0b88233f2 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[ +@@ -53,9 +53,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 +@@ -82,15 +79,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 +@@ -223,43 +211,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 d66f1e924f0e..000000000000 --- a/package/libs/elfutils/patches/110-no-cdefs.patch +++ /dev/null @@ -1,26 +0,0 @@ -From e399540ab67ffe83ca3c4cb768a2f0f2f32a9057 Mon Sep 17 00:00:00 2001 -From: Rosen Penev -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 ---- - 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 - #include - #include --#include - - #include - -- 2.30.2