From 786007d3f8d63b7324e0c3619db6fa8408b753f9 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 11 Nov 2021 06:31:08 +0200 Subject: [PATCH] libelf: 0.186 --- extra/libelf/build | 10 ++---- extra/libelf/checksums | 4 +-- extra/libelf/files/error.h | 27 --------------- extra/libelf/patches/musl.patch | 59 +++++++++++++++++++++++++++++++++ extra/libelf/sources | 2 +- extra/libelf/version | 2 +- 6 files changed, 65 insertions(+), 39 deletions(-) delete mode 100644 extra/libelf/files/error.h create mode 100644 extra/libelf/patches/musl.patch diff --git a/extra/libelf/build b/extra/libelf/build index a3c86ed2..9e48196c 100755 --- a/extra/libelf/build +++ b/extra/libelf/build @@ -1,16 +1,10 @@ #!/bin/sh -e +patch -p1 < musl.patch + # Build sometimes forces -Werror. export CFLAGS="$CFLAGS -Wno-error" -# Disable configure error for missing argp/fts/obstack. -sed 's/as_fn_error.*\(argp\|fts\|_obstack\)/: "/g' configure > _ -mv -f _ configure - -# Don't compile two unrelated C files which require argp. -sed 's/color.*printversion../#/g' lib/Makefile.in > _ -mv -f _ lib/Makefile.in - sh ./configure \ --prefix=/usr \ --disable-symbol-versioning \ diff --git a/extra/libelf/checksums b/extra/libelf/checksums index d5dbb046..1089e7c3 100644 --- a/extra/libelf/checksums +++ b/extra/libelf/checksums @@ -1,2 +1,2 @@ -dc8d3e74ab209465e7f568e1b3bb9a5a142f8656e2b57d10049a73da2ae6b5a6 -bf11b56670c7919b44e33b5b0f3a216b7f20cf2859b74bf5e2e837532f8e0579 +7f6fb9149b1673d38d9178a0d3e0fb8a1ec4f53a9f4c2ff89469609879641177 +f0f6ea6e93ad57ba5665181a55882531c174b56b59dd70a04b485e45bc299799 diff --git a/extra/libelf/files/error.h b/extra/libelf/files/error.h deleted file mode 100644 index ef06827a..00000000 --- a/extra/libelf/files/error.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _ERROR_H_ -#define _ERROR_H_ - -#include -#include -#include -#include -#include - -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 --git a/extra/libelf/patches/musl.patch b/extra/libelf/patches/musl.patch new file mode 100644 index 00000000..a37912f6 --- /dev/null +++ b/extra/libelf/patches/musl.patch @@ -0,0 +1,59 @@ +diff --git a/configure b/configure +index d03dab4..7fc88bd 100755 +--- a/configure ++++ b/configure +@@ -7758,7 +7758,7 @@ LIBS="$saved_LIBS" + case "$ac_cv_search_argp_parse" in + no) { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error $? "failed to find argp_parse ++: $? "failed to find argp_parse + See \`config.log' for more details" "$LINENO" 5; } ;; + -l*) argp_LDADD="$ac_cv_search_argp_parse" ;; + *) argp_LDADD= ;; +@@ -7826,7 +7826,7 @@ LIBS="$saved_LIBS" + case "$ac_cv_search_fts_close" in + no) { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error $? "failed to find fts_close ++: $? "failed to find fts_close + See \`config.log' for more details" "$LINENO" 5; } ;; + -l*) fts_LIBS="$ac_cv_search_fts_close" ;; + *) fts_LIBS= ;; +@@ -7894,7 +7894,7 @@ LIBS="$saved_LIBS" + case "$ac_cv_search__obstack_free" in + no) { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error $? "failed to find _obstack_free ++: $? "failed to find _obstack_free + See \`config.log' for more details" "$LINENO" 5; } ;; + -l*) obstack_LIBS="$ac_cv_search__obstack_free" ;; + *) obstack_LIBS= ;; +diff --git a/lib/Makefile.in b/lib/Makefile.in +index 41ff5f7..0c81496 100644 +--- a/lib/Makefile.in ++++ b/lib/Makefile.in +@@ -117,8 +117,8 @@ libeu_a_AR = $(AR) $(ARFLAGS) + libeu_a_LIBADD = + am_libeu_a_OBJECTS = xasprintf.$(OBJEXT) xstrdup.$(OBJEXT) \ + xstrndup.$(OBJEXT) xmalloc.$(OBJEXT) next_prime.$(OBJEXT) \ +- crc32.$(OBJEXT) crc32_file.$(OBJEXT) color.$(OBJEXT) \ +- error.$(OBJEXT) printversion.$(OBJEXT) ++ crc32.$(OBJEXT) crc32_file.$(OBJEXT) \ ++ error.$(OBJEXT) + libeu_a_OBJECTS = $(am_libeu_a_OBJECTS) + AM_V_P = $(am__v_P_@AM_V@) + am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +@@ -406,10 +406,10 @@ textrel_check = if $(READELF) -d $@ | fgrep -q TEXTREL; then $(textrel_found); f + noinst_LIBRARIES = libeu.a + libeu_a_SOURCES = xasprintf.c xstrdup.c xstrndup.c xmalloc.c next_prime.c \ + crc32.c crc32_file.c \ +- color.c error.c printversion.c ++ error.c + + noinst_HEADERS = fixedsizehash.h libeu.h system.h dynamicsizehash.h list.h \ +- eu-config.h color.h printversion.h bpf.h \ ++ eu-config.h bpf.h \ + atomics.h stdatomic-fbsd.h dynamicsizehash_concurrent.h + + EXTRA_DIST = dynamicsizehash.c dynamicsizehash_concurrent.c diff --git a/extra/libelf/sources b/extra/libelf/sources index 8be59331..013a4c09 100644 --- a/extra/libelf/sources +++ b/extra/libelf/sources @@ -1,2 +1,2 @@ https://sourceware.org/elfutils/ftp/VERSION/elfutils-VERSION.tar.bz2 -files/error.h lib +patches/musl.patch diff --git a/extra/libelf/version b/extra/libelf/version index 4b6b3aea..c137d6c9 100644 --- a/extra/libelf/version +++ b/extra/libelf/version @@ -1 +1 @@ -0.185 1 +0.186 1