elfutils: update to 0.183.
Remove all patches: they are now all upstream :) Also add more checkdepends so we skip less tests.
This commit is contained in:
parent
900bdf655b
commit
89d5a0f44a
|
@ -1,13 +0,0 @@
|
|||
diff --git debuginfod/debuginfod.cxx debuginfod/debuginfod.cxx
|
||||
index 3085f388..d2a434ee 100644
|
||||
--- debuginfod/debuginfod.cxx
|
||||
+++ debuginfod/debuginfod.cxx
|
||||
@@ -46,7 +46,7 @@ extern "C" {
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <error.h>
|
||||
-// #include <libintl.h> // not until it supports C++ << better
|
||||
+#include <libintl.h>
|
||||
#include <locale.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
|
@ -1,107 +0,0 @@
|
|||
diff --git ChangeLog ChangeLog
|
||||
index 128da6c6..565d021c 100644
|
||||
--- ChangeLog
|
||||
+++ ChangeLog
|
||||
@@ -1,3 +1,7 @@
|
||||
+2020-11-01 Érico N. Rolim <erico.erc@gmail.com>
|
||||
+
|
||||
+ * configure.ac: Check for fts and obstack from outside libc.
|
||||
+
|
||||
2020-10-28 Mark Wielaard <mark@klomp.org>
|
||||
|
||||
* configure.ac: Set version to 0.182.
|
||||
diff --git configure.ac configure.ac
|
||||
index 515ac704..c1a6954d 100644
|
||||
--- configure.ac
|
||||
+++ configure.ac
|
||||
@@ -542,6 +542,26 @@ else
|
||||
fi
|
||||
AC_SUBST([argp_LDADD])
|
||||
|
||||
+saved_LIBS="$LIBS"
|
||||
+AC_SEARCH_LIBS([fts_close], [fts])
|
||||
+LIBS="$saved_LIBS"
|
||||
+case "$ac_cv_search_fts_close" in
|
||||
+ no) AC_MSG_FAILURE([failed to find fts_close]) ;;
|
||||
+ -l*) fts_LIBS="$ac_cv_search_fts_close" ;;
|
||||
+ *) fts_LIBS= ;;
|
||||
+esac
|
||||
+AC_SUBST([fts_LIBS])
|
||||
+
|
||||
+saved_LIBS="$LIBS"
|
||||
+AC_SEARCH_LIBS([_obstack_free], [obstack])
|
||||
+LIBS="$saved_LIBS"
|
||||
+case "$ac_cv_search__obstack_free" in
|
||||
+ no) AC_MSG_FAILURE([failed to find obstack_free]) ;;
|
||||
+ -l*) obstack_LIBS="$ac_cv_search__obstack_free" ;;
|
||||
+ *) obstack_LIBS= ;;
|
||||
+esac
|
||||
+AC_SUBST([obstack_LIBS])
|
||||
+
|
||||
dnl The directories with content.
|
||||
|
||||
dnl Documentation.
|
||||
diff --git debuginfod/Makefile.am debuginfod/Makefile.am
|
||||
index 01985600..0af3b58c 100644
|
||||
--- debuginfod/Makefile.am
|
||||
+++ debuginfod/Makefile.am
|
||||
@@ -71,10 +71,10 @@ bin_PROGRAMS += debuginfod-find
|
||||
endif
|
||||
|
||||
debuginfod_SOURCES = debuginfod.cxx
|
||||
-debuginfod_LDADD = $(libdw) $(libelf) $(libeu) $(libdebuginfod) $(libmicrohttpd_LIBS) $(sqlite3_LIBS) $(libarchive_LIBS) -lpthread -ldl
|
||||
+debuginfod_LDADD = $(libdw) $(libelf) $(libeu) $(libdebuginfod) $(argp_LDADD) $(fts_LIBS) $(libmicrohttpd_LIBS) $(sqlite3_LIBS) $(libarchive_LIBS) -lpthread -ldl
|
||||
|
||||
debuginfod_find_SOURCES = debuginfod-find.c
|
||||
-debuginfod_find_LDADD = $(libdw) $(libelf) $(libeu) $(libdebuginfod)
|
||||
+debuginfod_find_LDADD = $(libdw) $(libelf) $(libeu) $(libdebuginfod) $(argp_LDADD) $(fts_LIBS)
|
||||
|
||||
if LIBDEBUGINFOD
|
||||
noinst_LIBRARIES = libdebuginfod.a
|
||||
@@ -98,7 +98,7 @@ libdebuginfod_so_LIBS = libdebuginfod_pic.a
|
||||
if DUMMY_LIBDEBUGINFOD
|
||||
libdebuginfod_so_LDLIBS =
|
||||
else
|
||||
-libdebuginfod_so_LDLIBS = $(libcurl_LIBS)
|
||||
+libdebuginfod_so_LDLIBS = $(libcurl_LIBS) $(fts_LIBS)
|
||||
endif
|
||||
libdebuginfod.so$(EXEEXT): $(srcdir)/libdebuginfod.map $(libdebuginfod_so_LIBS)
|
||||
$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
|
||||
diff --git libdw/Makefile.am libdw/Makefile.am
|
||||
index 33b5838d..1dbb3d5e 100644
|
||||
--- libdw/Makefile.am
|
||||
+++ libdw/Makefile.am
|
||||
@@ -109,7 +109,7 @@ libdw_so_LIBS = ../libebl/libebl_pic.a ../backends/libebl_backends_pic.a \
|
||||
../libcpu/libcpu_pic.a libdw_pic.a ../libdwelf/libdwelf_pic.a \
|
||||
../libdwfl/libdwfl_pic.a
|
||||
libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so
|
||||
-libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(zip_LIBS) -pthread
|
||||
+libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(fts_LIBS) $(obstack_LIBS) $(zip_LIBS) -pthread
|
||||
libdw_so_SOURCES =
|
||||
libdw.so$(EXEEXT): $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
|
||||
$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
|
||||
diff --git src/Makefile.am src/Makefile.am
|
||||
index e462e7d7..88d0ac8f 100644
|
||||
--- src/Makefile.am
|
||||
+++ src/Makefile.am
|
||||
@@ -69,7 +69,7 @@ ar_no_Wstack_usage = yes
|
||||
unstrip_no_Wstack_usage = yes
|
||||
|
||||
readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD)
|
||||
-nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) \
|
||||
+nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) $(argp_LDADD) $(obstack_LIBS) \
|
||||
$(demanglelib)
|
||||
size_LDADD = $(libelf) $(libeu) $(argp_LDADD)
|
||||
strip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
|
||||
@@ -78,9 +78,9 @@ findtextrel_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD)
|
||||
addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib)
|
||||
elfcmp_LDADD = $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
|
||||
objdump_LDADD = $(libasm) $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
|
||||
-ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD)
|
||||
+ranlib_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LIBS)
|
||||
strings_LDADD = $(libelf) $(libeu) $(argp_LDADD)
|
||||
-ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD)
|
||||
+ar_LDADD = libar.a $(libelf) $(libeu) $(argp_LDADD) $(obstack_LIBS)
|
||||
unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
|
||||
stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD) $(demanglelib)
|
||||
elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
|
|
@ -1,10 +0,0 @@
|
|||
--- backends/ppc_initreg.c 2019-11-26 23:48:42.000000000 +0100
|
||||
+++ backends/ppc_initreg.c 2019-12-08 16:57:58.334872602 +0100
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#if defined(__powerpc__) && defined(__linux__)
|
||||
+# include <asm/ptrace.h>
|
||||
# include <sys/ptrace.h>
|
||||
# include <sys/user.h>
|
||||
#endif
|
|
@ -1,74 +0,0 @@
|
|||
diff --git debuginfod/debuginfod-client.c debuginfod/debuginfod-client.c
|
||||
index 0e5177bc..ce1d819b 100644
|
||||
--- debuginfod/debuginfod-client.c
|
||||
+++ debuginfod/debuginfod-client.c
|
||||
@@ -212,13 +212,13 @@ debuginfod_init_cache (char *cache_path, char *interval_path, char *maxage_path)
|
||||
return 0;
|
||||
|
||||
/* Create the cache and config files as necessary. */
|
||||
- if (stat(cache_path, &st) != 0 && mkdir(cache_path, 0777) < 0)
|
||||
+ if (stat(cache_path, &st) != 0 && mkdir(cache_path, ACCESSPERMS) < 0)
|
||||
return -errno;
|
||||
|
||||
int fd = -1;
|
||||
|
||||
/* init cleaning interval config file. */
|
||||
- fd = open(interval_path, O_CREAT | O_RDWR, 0666);
|
||||
+ fd = open(interval_path, O_CREAT | O_RDWR, DEFFILEMODE);
|
||||
if (fd < 0)
|
||||
return -errno;
|
||||
|
||||
@@ -227,7 +227,7 @@ debuginfod_init_cache (char *cache_path, char *interval_path, char *maxage_path)
|
||||
|
||||
/* init max age config file. */
|
||||
if (stat(maxage_path, &st) != 0
|
||||
- && (fd = open(maxage_path, O_CREAT | O_RDWR, 0666)) < 0)
|
||||
+ && (fd = open(maxage_path, O_CREAT | O_RDWR, DEFFILEMODE)) < 0)
|
||||
return -errno;
|
||||
|
||||
if (dprintf(fd, "%ld", cache_default_max_unused_age_s) < 0)
|
||||
diff --git lib/system.h lib/system.h
|
||||
index 292082bd..5d16ebc6 100644
|
||||
--- lib/system.h
|
||||
+++ lib/system.h
|
||||
@@ -85,6 +85,18 @@
|
||||
__res; })
|
||||
#endif
|
||||
|
||||
+#ifndef ACCESSPERMS
|
||||
+#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
|
||||
+#endif
|
||||
+
|
||||
+#ifndef ALLPERMS
|
||||
+#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
|
||||
+#endif
|
||||
+
|
||||
+#ifndef DEFFILEMODE
|
||||
+#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* DEFFILEMODE*/
|
||||
+#endif
|
||||
+
|
||||
static inline ssize_t __attribute__ ((unused))
|
||||
pwrite_retry (int fd, const void *buf, size_t len, off_t off)
|
||||
{
|
||||
diff --git src/unstrip.c src/unstrip.c
|
||||
index 0257d9cc..c99ee612 100644
|
||||
--- src/unstrip.c
|
||||
+++ src/unstrip.c
|
||||
@@ -315,7 +315,7 @@ make_directories (const char *path)
|
||||
if (dir == NULL)
|
||||
error(EXIT_FAILURE, errno, _("memory exhausted"));
|
||||
|
||||
- while (mkdir (dir, 0777) < 0 && errno != EEXIST)
|
||||
+ while (mkdir (dir, ACCESSPERMS) < 0 && errno != EEXIST)
|
||||
{
|
||||
if (errno == ENOENT)
|
||||
make_directories (dir);
|
||||
@@ -2192,7 +2192,7 @@ DWARF data in '%s' not adjusted for prelinking bias; consider prelink -u"),
|
||||
|
||||
/* Copy the unstripped file and then modify it. */
|
||||
int outfd = open (output_file, O_RDWR | O_CREAT,
|
||||
- stripped_ehdr->e_type == ET_REL ? 0666 : 0777);
|
||||
+ stripped_ehdr->e_type == ET_REL ? DEFFILEMODE : ACCESSPERMS);
|
||||
if (outfd < 0)
|
||||
error (EXIT_FAILURE, errno, _("cannot open '%s'"), output_file);
|
||||
Elf *outelf = elf_begin (outfd, ELF_C_WRITE, NULL);
|
|
@ -1,65 +0,0 @@
|
|||
--- src/readelf.c
|
||||
+++ src/readelf.c
|
||||
@@ -4773,10 +4773,11 @@ listptr_base (struct listptr *p)
|
||||
return cudie_base (&cu);
|
||||
}
|
||||
|
||||
+static const char *listptr_name;
|
||||
+
|
||||
static int
|
||||
-compare_listptr (const void *a, const void *b, void *arg)
|
||||
+compare_listptr (const void *a, const void *b)
|
||||
{
|
||||
- const char *name = arg;
|
||||
struct listptr *p1 = (void *) a;
|
||||
struct listptr *p2 = (void *) b;
|
||||
|
||||
@@ -4792,21 +4793,21 @@ compare_listptr (const void *a, const void *b, void *arg)
|
||||
p1->warned = p2->warned = true;
|
||||
error (0, 0,
|
||||
gettext ("%s %#" PRIx64 " used with different address sizes"),
|
||||
- name, (uint64_t) p1->offset);
|
||||
+ listptr_name, (uint64_t) p1->offset);
|
||||
}
|
||||
if (p1->dwarf64 != p2->dwarf64)
|
||||
{
|
||||
p1->warned = p2->warned = true;
|
||||
error (0, 0,
|
||||
gettext ("%s %#" PRIx64 " used with different offset sizes"),
|
||||
- name, (uint64_t) p1->offset);
|
||||
+ listptr_name, (uint64_t) p1->offset);
|
||||
}
|
||||
if (listptr_base (p1) != listptr_base (p2))
|
||||
{
|
||||
p1->warned = p2->warned = true;
|
||||
error (0, 0,
|
||||
gettext ("%s %#" PRIx64 " used with different base addresses"),
|
||||
- name, (uint64_t) p1->offset);
|
||||
+ listptr_name, (uint64_t) p1->offset);
|
||||
}
|
||||
if (p1->attr != p2 ->attr)
|
||||
{
|
||||
@@ -4814,7 +4815,7 @@ compare_listptr (const void *a, const void *b, void *arg)
|
||||
error (0, 0,
|
||||
gettext ("%s %#" PRIx64
|
||||
" used with different attribute %s and %s"),
|
||||
- name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr),
|
||||
+ listptr_name, (uint64_t) p1->offset, dwarf_attr_name (p2->attr),
|
||||
dwarf_attr_name (p2->attr));
|
||||
}
|
||||
}
|
||||
@@ -4885,9 +4886,11 @@ notice_listptr (enum section_e section, struct listptr_table *table,
|
||||
static void
|
||||
sort_listptr (struct listptr_table *table, const char *name)
|
||||
{
|
||||
- if (table->n > 0)
|
||||
- qsort_r (table->table, table->n, sizeof table->table[0],
|
||||
- &compare_listptr, (void *) name);
|
||||
+ if (table->n > 0) {
|
||||
+ listptr_name = name;
|
||||
+ qsort (table->table, table->n, sizeof table->table[0],
|
||||
+ &compare_listptr);
|
||||
+ }
|
||||
}
|
||||
|
||||
static bool
|
|
@ -1,19 +0,0 @@
|
|||
--- libdwfl/dwfl_error.c 2015-09-29 17:18:51.000000000 +0200
|
||||
+++ libdwfl/dwfl_error.c 2015-11-20 05:11:29.889002058 +0100
|
||||
@@ -154,7 +154,16 @@
|
||||
switch (error &~ 0xffff)
|
||||
{
|
||||
case OTHER_ERROR (ERRNO):
|
||||
+#if defined(__GLIBC__)
|
||||
return strerror_r (error & 0xffff, "bad", 0);
|
||||
+#else
|
||||
+ {
|
||||
+ static __thread char buf[128] = "";
|
||||
+ if (0 == strerror_r(error & 0xffff, buf, sizeof(buf)))
|
||||
+ return buf;
|
||||
+ }
|
||||
+ return "strerror_r() failed";
|
||||
+#endif
|
||||
case OTHER_ERROR (LIBELF):
|
||||
return elf_errmsg (error & 0xffff);
|
||||
case OTHER_ERROR (LIBDW):
|
|
@ -1,38 +1,38 @@
|
|||
# Template file for 'elfutils'
|
||||
pkgname=elfutils
|
||||
version=0.182
|
||||
revision=4
|
||||
version=0.183
|
||||
revision=1
|
||||
build_style=gnu-configure
|
||||
configure_args="--program-prefix=eu-"
|
||||
hostmakedepends="automake libtool pkg-config"
|
||||
_devel_depends="bzip2-devel liblzma-devel zlib-devel libzstd-devel"
|
||||
makedepends="${_devel_depends} libcurl-devel libarchive-devel sqlite-devel
|
||||
libmicrohttpd-devel"
|
||||
checkdepends="zstd bzip2 curl rpm cpio"
|
||||
short_desc="Utilities to handle ELF object files"
|
||||
maintainer="Érico Nogueira <ericonr@disroot.org>"
|
||||
license="GPL-3.0-or-later"
|
||||
homepage="https://sourceware.org/elfutils/"
|
||||
distfiles="https://sourceware.org/${pkgname}/ftp/${version}/${pkgname}-${version}.tar.bz2"
|
||||
checksum=ecc406914edf335f0b7fc084ebe6c460c4d6d5175bfdd6688c1c78d9146b8858
|
||||
checksum=c3637c208d309d58714a51e61e63f1958808fead882e9b607506a29e5474f2c5
|
||||
# subpackages require explicit ordering
|
||||
subpackages="debuginfod libdebuginfod libelf elfutils-devel"
|
||||
|
||||
CFLAGS="-Wno-error"
|
||||
CXXFLAGS="-Wno-error -Wl,-z,stack-size=2097152"
|
||||
|
||||
if [ "$XBPS_TARGET_LIBC" = musl ]; then
|
||||
makedepends+=" argp-standalone musl-fts-devel musl-obstack-devel musl-legacy-compat"
|
||||
|
||||
# mainly warnings from using error.h
|
||||
CFLAGS="-Wno-error"
|
||||
# XXX: breaks some expected functionality
|
||||
CFLAGS+=" -DFNM_EXTMATCH=0"
|
||||
# warnings and avoid blowing the stack
|
||||
CXXFLAGS="-Wno-error -Wl,-z,stack-size=2097152"
|
||||
fi
|
||||
|
||||
pre_configure() {
|
||||
autoreconf -if
|
||||
}
|
||||
|
||||
do_check() {
|
||||
# test failures also expected if building with debug disabled
|
||||
make check ${makejobs} ||
|
||||
msg_warn "Failure in testsuite, expected on musl systems, at least"
|
||||
msg_warn "Failure in testsuite, expected on musl systems, at least\n"
|
||||
}
|
||||
|
||||
libdebuginfod_package() {
|
||||
|
|
Loading…
Reference in New Issue