[OpenWrt-Devel] [PATCH] elfutils: update to 0.179
Oldřich Jedlička
oldium.pro at gmail.com
Mon Apr 6 02:01:02 EDT 2020
po 6. 4. 2020 v 4:02 odesílatel Rosen Penev <rosenp at gmail.com> napsal:
> Removed sys/cdefs usage. The header is deprecated.
>
> Removed canonicalize_file_name define. It's already fixed upstream.
>
> Added --disable-debuginfod. Seems to be needed.
>
> Modified patch 005 to build more stuff. It was failing before. It still
> only builds libraries.
>
> Modified patch 100 to use strerror under non-glibc. It is used under
> glibc as strerror is not thread safe. It is under musl and uClibc-ng.
> strerror_l is not available under uClibc-ng.
>
> Signed-off-by: Rosen Penev <rosenp at gmail.com>
> ---
> package/libs/elfutils/Makefile | 7 +-
> .../patches/003-libintl-compatibility.patch | 75 +++++++++----------
> .../patches/005-build_only_libs.patch | 13 ++--
> .../elfutils/patches/100-musl-compat.patch | 22 ++----
> .../libs/elfutils/patches/101-no-fts.patch | 2 +-
> .../libs/elfutils/patches/110-no-cdefs.patch | 58 ++++++++++++++
> 6 files changed, 113 insertions(+), 64 deletions(-)
> create mode 100644 package/libs/elfutils/patches/110-no-cdefs.patch
>
> diff --git a/package/libs/elfutils/Makefile
> b/package/libs/elfutils/Makefile
> index 630c48820a..e6868c56f4 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.177
> -PKG_RELEASE:=2
> +PKG_VERSION:=0.179
> +PKG_RELEASE:=1
>
> PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
> PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
> -PKG_HASH:=fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc05042e
> +PKG_HASH:=25a545566cbacaa37ae6222e58f1c48ea4570f53ba991886e2f5ce96e22a23a2
> <https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)-PKG_HASH:=fa489deccbcae7d8c920f60d85906124c1989c591196d90e0fd668e3dc05042e+PKG_HASH:=25a545566cbacaa37ae6222e58f1c48ea4570f53ba991886e2f5ce96e22a23a2>
>
> PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca at gmail.com>
> PKG_LICENSE:=GPL-3.0-or-later
> @@ -63,6 +63,7 @@ endif
>
> CONFIGURE_ARGS += \
> --program-prefix=eu- \
> + --disable-debuginfod \
> --without-lzma
>
> TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral
> diff --git a/package/libs/elfutils/patches/003-libintl-compatibility.patch
> b/package/libs/elfutils/patches/003-libintl-compatibility.patch
> index 32bfaf8e6d..ea0f4535a5 100644
> --- a/package/libs/elfutils/patches/003-libintl-compatibility.patch
> +++ b/package/libs/elfutils/patches/003-libintl-compatibility.patch
> @@ -1,8 +1,31 @@
> ---- a/libelf/libelfP.h
> -+++ b/libelf/libelfP.h
> -@@ -39,6 +39,9 @@
> - #include <stdio.h>
> - #include <string.h>
> +--- a/config/libelf.pc.in
> ++++ b/config/libelf.pc.in
> +@@ -8,7 +8,7 @@ Description: elfutils libelf library to read and write
> ELF files
> + Version: @VERSION@
> + URL: http://elfutils.org/
> +
> +-Libs: -L${libdir} -lelf
> ++Libs: -L${libdir} -lelf @intl_LDFLAGS@
> + Cflags: -I${includedir}
> +
> + Requires.private: zlib
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -586,6 +586,9 @@ AC_CONFIG_FILES([config/libelf.pc config/libdw.pc
> config/libdebuginfod.pc])
> + AC_SUBST(USE_NLS, yes)
> + AM_PO_SUBDIRS
> +
> ++case "$USE_NLS" in yes) intl_LDFLAGS="-lintl" ;; esac
> ++AC_SUBST([intl_LDFLAGS])
> ++
> + 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 _
> @@ -12,20 +35,19 @@
>
> --- a/libdw/libdwP.h
> +++ b/libdw/libdwP.h
> -@@ -35,7 +35,9 @@
> - #include <libdw.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
> -@@ -43,6 +43,9 @@
> +@@ -44,6 +44,9 @@
>
> typedef struct Dwfl_Process Dwfl_Process;
>
> @@ -35,11 +57,11 @@
> /* gettext helper macros. */
> #define _(Str) dgettext ("elfutils", Str)
>
> ---- a/libasm/libasmP.h
> -+++ b/libasm/libasmP.h
> -@@ -35,6 +35,9 @@
> -
> - #include "libdwelf.h"
> +--- a/libelf/libelfP.h
> ++++ b/libelf/libelfP.h
> +@@ -39,6 +39,9 @@
> + #include <stdio.h>
> + #include <string.h>
>
> +#ifdef _ /* fix libintl-stub */
> +#undef _
> @@ -47,26 +69,3 @@
> /* gettext helper macros. */
> #define _(Str) dgettext ("elfutils", Str)
>
> ---- a/config/libelf.pc.in
> -+++ b/config/libelf.pc.in
> -@@ -8,7 +8,7 @@ Description: elfutils libelf library to
> - Version: @VERSION@
> - URL: http://elfutils.org/
> -
> --Libs: -L${libdir} -lelf
> -+Libs: -L${libdir} -lelf @intl_LDFLAGS@
> - Cflags: -I${includedir}
> -
> - Requires.private: zlib
> ---- a/configure.ac
> -+++ b/configure.ac
> -@@ -543,6 +543,9 @@ AC_CONFIG_FILES([config/libelf.pc config
> - AC_SUBST(USE_NLS, yes)
> - AM_PO_SUBDIRS
> -
> -+case "$USE_NLS" in yes) intl_LDFLAGS="-lintl" ;; esac
> -+AC_SUBST([intl_LDFLAGS])
> -+
> - 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>])
> diff --git a/package/libs/elfutils/patches/005-build_only_libs.patch
> b/package/libs/elfutils/patches/005-build_only_libs.patch
> index 93d593a0fc..a81d1d2cab 100644
> --- a/package/libs/elfutils/patches/005-build_only_libs.patch
> +++ b/package/libs/elfutils/patches/005-build_only_libs.patch
> @@ -1,12 +1,11 @@
> --- a/Makefile.am
> +++ b/Makefile.am
> -@@ -27,8 +27,7 @@ AM_MAKEFLAGS = --no-print-directory
> +@@ -27,7 +27,7 @@ AM_MAKEFLAGS = --no-print-directory
> pkginclude_HEADERS = version.h
>
> - # Add doc back when we have some real content.
> --SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu
> libasm \
> -- backends src po tests
> -+SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libasm
> + SUBDIRS = config m4 lib libelf libcpu backends libebl libdwelf libdwfl
> libdw \
> +- libasm src po doc tests
> ++ libasm
>
> - EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
> - COPYING COPYING-GPLV2 COPYING-LGPLV3
> + if DEBUGINFOD
> + SUBDIRS += debuginfod
> diff --git a/package/libs/elfutils/patches/100-musl-compat.patch
> b/package/libs/elfutils/patches/100-musl-compat.patch
> index 109b7ece08..374e832d3f 100644
> --- a/package/libs/elfutils/patches/100-musl-compat.patch
> +++ b/package/libs/elfutils/patches/100-musl-compat.patch
> @@ -22,20 +22,9 @@ https://sourceware.org/bugzilla/show_bug.cgi?id=21002
> #include <stddef.h>
> #include <stdint.h>
> #include <sys/param.h>
> -@@ -38,6 +49,10 @@
> - #include <byteswap.h>
> - #include <unistd.h>
> -
> -+#ifndef __GLIBC__
> -+#define canonicalize_file_name(name) realpath(name,NULL)
> -+#endif
> -+
> - #if __BYTE_ORDER == __LITTLE_ENDIAN
> - # define LE32(n) (n)
> - # define LE64(n) (n)
> --- a/libdw/libdw_alloc.c
> +++ b/libdw/libdw_alloc.c
> -@@ -73,5 +73,5 @@ __attribute ((noreturn)) attribute_hidde
> +@@ -147,5 +147,5 @@ __attribute ((noreturn)) attribute_hidde
> __libdw_oom (void)
> {
> while (1)
> @@ -44,12 +33,15 @@ https://sourceware.org/bugzilla/show_bug.cgi?id=21002
> }
> --- a/libdwfl/dwfl_error.c
> +++ b/libdwfl/dwfl_error.c
> -@@ -154,7 +154,7 @@ dwfl_errmsg (int error)
> +@@ -154,7 +154,11 @@ dwfl_errmsg (int error)
> switch (error &~ 0xffff)
> {
> case OTHER_ERROR (ERRNO):
> -- return strerror_r (error & 0xffff, "bad", 0);
> -+ return strerror_l (error & 0xffff, LC_GLOBAL_LOCALE);
> ++#if defined(__GLIBC__) && !defined(__UCLIBC__)
> + return strerror_r (error & 0xffff, "bad", 0);
>
According to GNU documentation, this call uses insufficient buffer size
(buflen is 0), so it should lead to error ERANGE. Moreover, supplying fixed
string as a buffer does not look correct, so I doubt this does anything
useful.
Regards,
Oldrich.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200406/c8076188/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list