[OpenWrt-Devel] [PATCH] elfutils: Fix compile with uClibc-ng

Petr Štetiar ynezz at true.cz
Fri May 3 10:09:12 PDT 2019


Rosen Penev <rosenp at gmail.com> [2019-05-01 10:05:20]:

Hi,

> Probably glibc too. argp_help takes a char *. not const char *.

I'm wondering if we need to cary another patch forever, thus if it wouldn't be
better to backport upstreamed patch and/or bump to fixed upstream version.

-- ynezz

> Signed-off-by: Rosen Penev <rosenp at gmail.com>
> ---
>  package/libs/elfutils/Makefile                        |  2 +-
>  .../libs/elfutils/patches/200-uclibc-ng-compat.patch  | 11 +++++++++++
>  2 files changed, 12 insertions(+), 1 deletion(-)
>  create mode 100644 package/libs/elfutils/patches/200-uclibc-ng-compat.patch
> 
> diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile
> index c6b1d6df65..e148df096c 100644
> --- a/package/libs/elfutils/Makefile
> +++ b/package/libs/elfutils/Makefile
> @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
>  
>  PKG_NAME:=elfutils
>  PKG_VERSION:=0.176
> -PKG_RELEASE:=1
> +PKG_RELEASE:=2
>  
>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
>  PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
> diff --git a/package/libs/elfutils/patches/200-uclibc-ng-compat.patch b/package/libs/elfutils/patches/200-uclibc-ng-compat.patch
> new file mode 100644
> index 0000000000..b0ae1c7401
> --- /dev/null
> +++ b/package/libs/elfutils/patches/200-uclibc-ng-compat.patch
> @@ -0,0 +1,11 @@
> +--- a/lib/color.c
> ++++ b/lib/color.c
> +@@ -132,7 +132,7 @@ valid arguments are:\n\
> +   - 'auto', 'tty', 'if-tty'\n"),
> + 		     program_invocation_short_name, arg);
> + 	      argp_help (&color_argp, stderr, ARGP_HELP_SEE,
> +-			 program_invocation_short_name);
> ++			 (char *) program_invocation_short_name);
> + 	      exit (EXIT_FAILURE);
> + 	    }
> + 	}



More information about the openwrt-devel mailing list