commit: 24559c836744a2bdac53407dda420bb94fb44eb9 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> AuthorDate: Tue Jul 19 12:57:57 2022 +0000 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> CommitDate: Tue Jul 19 12:57:57 2022 +0000 URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=24559c83
dev-libs/elfutils: in tree version 0.187 works Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org> dev-libs/elfutils/Manifest | 2 - dev-libs/elfutils/elfutils-0.180.ebuild | 114 --------------------- dev-libs/elfutils/elfutils-0.185.ebuild | 102 ------------------ .../elfutils/files/0.178/fix-aarch64_fregs.patch | 48 --------- .../elfutils/files/0.178/musl-asm_ptrace_h.patch | 26 ----- dev-libs/elfutils/files/0.178/musl-cdefs.patch | 45 -------- dev-libs/elfutils/files/0.178/musl-error_h.patch | 81 --------------- .../elfutils/files/0.178/musl-fts-obstack.patch | 107 ------------------- dev-libs/elfutils/files/0.178/musl-macros.patch | 73 ------------- dev-libs/elfutils/files/0.178/musl-qsort_r.patch | 79 -------------- .../elfutils/files/0.178/musl-strerror_r.patch | 33 ------ dev-libs/elfutils/files/0.178/musl-strndupa.patch | 32 ------ dev-libs/elfutils/files/0.185/musl-cdefs.patch | 29 ------ .../0.185/musl-fix-uninitialized-mnebuf.patch | 24 ----- ...lfutils-0.175-disable-biarch-test-PR24158.patch | 9 -- .../files/elfutils-0.177-disable-large.patch | 14 --- .../files/elfutils-0.179-CC-in-tests.patch | 45 -------- .../files/elfutils-0.180-PaX-support.patch | 26 ----- .../elfutils/files/elfutils-0.180-readelf.patch | 23 ----- .../files/elfutils-0.185-static-inline.patch | 12 --- dev-libs/elfutils/metadata.xml | 17 --- 21 files changed, 941 deletions(-) diff --git a/dev-libs/elfutils/Manifest b/dev-libs/elfutils/Manifest deleted file mode 100644 index 61323144..00000000 --- a/dev-libs/elfutils/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST elfutils-0.180.tar.bz2 9079640 BLAKE2B bd7863b82a71d2932a23c9d125d5eb6485977a3256a8a0b25980183d33f7345c3d9fae78277de5c955eb0ceeb955f8fa71d209f4f39bcf6dd49e46a8bbd7efcf SHA512 62e96035ccfe8928baca2285decbe8b8703a2daa956df81ece18fecf643272fb68955806b3e807a514141a7a9bf44520bf09461672aa580bd6807485fb604d25 -DIST elfutils-0.185.tar.bz2 9187627 BLAKE2B 57cfa7e4060975c4bf6170dbd354687a19a92f7069c060db1ac2fa4da5a9d34e8bddd07c7ce376b5c28b5670ad5b8c1df795164cbcfb600a44cf1db60c20c4af SHA512 34de0de1355b11740e036e0fc64f2fc063587c8eb121b19216ee5548d3f0f268d8fc3995176c47190466b9d881007cfa11a9d01e9a50e38af6119492bf8bb47f diff --git a/dev-libs/elfutils/elfutils-0.180.ebuild b/dev-libs/elfutils/elfutils-0.180.ebuild deleted file mode 100644 index 6b36ae74..00000000 --- a/dev-libs/elfutils/elfutils-0.180.ebuild +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright 2003-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools flag-o-matic multilib-minimal toolchain-funcs - -DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)" -HOMEPAGE="http://elfutils.org/" -SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2" - -LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~mips ppc ppc64" -IUSE="bzip2 lzma nls static-libs test +threads +utils valgrind" - -RDEPEND=">=sys-libs/zlib-1.2.8-r1[static-libs?,${MULTILIB_USEDEP}] - bzip2? ( >=app-arch/bzip2-1.0.6-r4[static-libs?,${MULTILIB_USEDEP}] ) - lzma? ( >=app-arch/xz-utils-5.0.5-r1[static-libs?,${MULTILIB_USEDEP}] ) - elibc_musl? ( - sys-libs/argp-standalone - sys-libs/fts-standalone - sys-libs/obstack-standalone - dev-libs/libbsd - ) - !dev-libs/libelf" -DEPEND="${RDEPEND} - valgrind? ( dev-util/valgrind ) -" -BDEPEND="nls? ( sys-devel/gettext ) - >=sys-devel/flex-2.5.4a - sys-devel/m4" - -RESTRICT="!test? ( test )" - -PATCHES=( - "${FILESDIR}"/${PN}-0.175-disable-biarch-test-PR24158.patch - "${FILESDIR}"/${PN}-0.177-disable-large.patch - "${FILESDIR}"/${PN}-0.180-PaX-support.patch - "${FILESDIR}"/${PN}-0.179-CC-in-tests.patch - "${FILESDIR}"/${PN}-0.180-readelf.patch - - # Musl Patches - "${FILESDIR}"/0.178/fix-aarch64_fregs.patch - "${FILESDIR}"/0.178/musl-asm_ptrace_h.patch - "${FILESDIR}"/0.178/musl-cdefs.patch - "${FILESDIR}"/0.178/musl-macros.patch - "${FILESDIR}"/0.178/musl-fts-obstack.patch - "${FILESDIR}"/0.178/musl-qsort_r.patch - "${FILESDIR}"/0.178/musl-strerror_r.patch - "${FILESDIR}"/0.178/musl-strndupa.patch - "${FILESDIR}"/0.178/musl-error_h.patch -) - -src_prepare() { - default - - eautoreconf - - if ! use static-libs; then - sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in || die - fi - # https://sourceware.org/PR23914 - sed -i 's:-Werror::' */Makefile.in || die - - if use elibc_musl; then - cat > lib/libintl.h <<-EOF - #ifndef LIBINTL_H - #define LIBINTL_H - #define _(x) (x) - #endif - EOF - fi -} - -src_configure() { - use test && append-flags -g #407135 - - # Symbol aliases are implemented as asm statements. - # Will require porting: https://gcc.gnu.org/PR48200 - filter-flags '-flto*' - - multilib-minimal_src_configure -} - -multilib_src_configure() { - ECONF_SOURCE="${S}" econf \ - $(use_enable nls) \ - $(use_enable threads thread-safety) \ - $(use_enable valgrind) \ - --disable-debuginfod \ - --program-prefix="eu-" \ - --with-zlib \ - $(use_with bzip2 bzlib) \ - $(use_with lzma) -} - -multilib_src_test() { - # CC is a workaround for tests using ${CC-gcc} - env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \ - LC_ALL="C" \ - CC="$(tc-getCC)" \ - emake check VERBOSE=1 -} - -multilib_src_install_all() { - einstalldocs - dodoc NOTES - # These build quick, and are needed for most tests, so don't - # disable their building when the USE flag is disabled. - if ! use utils; then - rm -rf "${ED}"/usr/bin || die - fi -} diff --git a/dev-libs/elfutils/elfutils-0.185.ebuild b/dev-libs/elfutils/elfutils-0.185.ebuild deleted file mode 100644 index 36658ab9..00000000 --- a/dev-libs/elfutils/elfutils-0.185.ebuild +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 2003-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit flag-o-matic multilib-minimal - -DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)" -HOMEPAGE="http://elfutils.org/" -SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2" - -LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )" -SLOT="0" -KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 x86" -IUSE="bzip2 lzma nls static-libs test +threads +utils valgrind zstd" - -RDEPEND=">=sys-libs/zlib-1.2.8-r1[static-libs?,${MULTILIB_USEDEP}] - bzip2? ( >=app-arch/bzip2-1.0.6-r4[static-libs?,${MULTILIB_USEDEP}] ) - lzma? ( >=app-arch/xz-utils-5.0.5-r1[static-libs?,${MULTILIB_USEDEP}] ) - zstd? ( app-arch/zstd:=[static-libs?,${MULTILIB_USEDEP}] ) - !dev-libs/libelf - elibc_musl? ( - sys-libs/argp-standalone - sys-libs/fts-standalone - sys-libs/obstack-standalone - dev-libs/libbsd - ) -" -DEPEND="${RDEPEND} - valgrind? ( dev-util/valgrind ) -" -BDEPEND="nls? ( sys-devel/gettext ) - >=sys-devel/flex-2.5.4a - sys-devel/m4 -" -RESTRICT="!test? ( test )" - -PATCHES=( - "${FILESDIR}"/${PN}-0.175-disable-biarch-test-PR24158.patch - "${FILESDIR}"/${PN}-0.177-disable-large.patch - "${FILESDIR}"/${PN}-0.180-PaX-support.patch - "${FILESDIR}"/${PN}-0.185-static-inline.patch - - # Musl support patches - "${FILESDIR}"/0.178/fix-aarch64_fregs.patch - "${FILESDIR}"/0.178/musl-asm_ptrace_h.patch - "${FILESDIR}"/0.185/musl-cdefs.patch - "${FILESDIR}"/0.178/musl-macros.patch - "${FILESDIR}"/0.178/musl-strndupa.patch - "${FILESDIR}"/0.178/musl-error_h.patch - "${FILESDIR}"/0.185/musl-fix-uninitialized-mnebuf.patch -) - -src_prepare() { - default - - if ! use static-libs; then - sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in || die - fi - # https://sourceware.org/PR23914 - sed -i 's:-Werror::' */Makefile.in || die -} - -src_configure() { - use test && append-flags -g #407135 - - # Symbol aliases are implemented as asm statements. - # Will require porting: https://gcc.gnu.org/PR48200 - filter-flags '-flto*' - - multilib-minimal_src_configure -} - -multilib_src_configure() { - ECONF_SOURCE="${S}" econf \ - $(use_enable nls) \ - $(use_enable threads thread-safety) \ - $(use_enable valgrind) \ - --disable-debuginfod \ - --disable-libdebuginfod \ - --program-prefix="eu-" \ - --with-zlib \ - $(use_with bzip2 bzlib) \ - $(use_with lzma) \ - $(use_with zstd) -} - -multilib_src_test() { - env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \ - LC_ALL="C" \ - emake check VERBOSE=1 -} - -multilib_src_install_all() { - einstalldocs - dodoc NOTES - # These build quick, and are needed for most tests, so don't - # disable their building when the USE flag is disabled. - if ! use utils; then - rm -rf "${ED}"/usr/bin || die - fi -} diff --git a/dev-libs/elfutils/files/0.178/fix-aarch64_fregs.patch b/dev-libs/elfutils/files/0.178/fix-aarch64_fregs.patch deleted file mode 100644 index 004bafe0..00000000 --- a/dev-libs/elfutils/files/0.178/fix-aarch64_fregs.patch +++ /dev/null @@ -1,48 +0,0 @@ -From dd394676bb8b8e7e4a584a58664ea20472b948e5 Mon Sep 17 00:00:00 2001 -From: -Date: Thu, 12 Dec 2019 20:44:47 -0600 -Subject: [PATCH 1/9] Fix aarch64 support for dwarf_fregs - ---- - backends/aarch64_initreg.c | 4 ++-- - backends/arm_initreg.c | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/backends/aarch64_initreg.c b/backends/aarch64_initreg.c -index daf6f37..6445276 100644 ---- a/backends/aarch64_initreg.c -+++ b/backends/aarch64_initreg.c -@@ -33,7 +33,7 @@ - #include "system.h" - #include <assert.h> - #if defined(__aarch64__) && defined(__linux__) --# include <linux/uio.h> -+# include <sys/uio.h> - # include <sys/user.h> - # include <sys/ptrace.h> - /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ -@@ -82,7 +82,7 @@ aarch64_set_initial_registers_tid (pid_t tid __attribute__ ((unused)), - - Dwarf_Word dwarf_fregs[32]; - for (int r = 0; r < 32; r++) -- dwarf_fregs[r] = fregs.vregs[r] & 0xFFFFFFFF; -+ dwarf_fregs[r] = (unsigned int)fregs.vregs[r] & 0xFFFFFFFF; - - if (! setfunc (64, 32, dwarf_fregs, arg)) - return false; -diff --git a/backends/arm_initreg.c b/backends/arm_initreg.c -index efcabaf..062bb9e 100644 ---- a/backends/arm_initreg.c -+++ b/backends/arm_initreg.c -@@ -38,7 +38,7 @@ - #endif - - #ifdef __aarch64__ --# include <linux/uio.h> -+# include <sys/uio.h> - # include <sys/user.h> - # include <sys/ptrace.h> - /* Deal with old glibc defining user_pt_regs instead of user_regs_struct. */ --- -2.24.1 - diff --git a/dev-libs/elfutils/files/0.178/musl-asm_ptrace_h.patch b/dev-libs/elfutils/files/0.178/musl-asm_ptrace_h.patch deleted file mode 100644 index 7731f63b..00000000 --- a/dev-libs/elfutils/files/0.178/musl-asm_ptrace_h.patch +++ /dev/null @@ -1,26 +0,0 @@ -From fa623f8330c8e7264eba98d0e8199ef4aa219d2a Mon Sep 17 00:00:00 2001 -From: -Date: Thu, 12 Dec 2019 21:34:57 -0600 -Subject: [PATCH 2/9] include asm.h for non glibc systems on ppc - ---- - backends/ppc_initreg.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/backends/ppc_initreg.c b/backends/ppc_initreg.c -index 0e0d359..3dbcc2d 100644 ---- a/backends/ppc_initreg.c -+++ b/backends/ppc_initreg.c -@@ -32,6 +32,9 @@ - - #include <stdlib.h> - #if defined(__powerpc__) && defined(__linux__) -+#if !defined(__GLIBC__) -+# include <asm/ptrace.h> -+#endif - # include <sys/ptrace.h> - # include <sys/user.h> - #endif --- -2.24.1 - diff --git a/dev-libs/elfutils/files/0.178/musl-cdefs.patch b/dev-libs/elfutils/files/0.178/musl-cdefs.patch deleted file mode 100644 index 7a73f425..00000000 --- a/dev-libs/elfutils/files/0.178/musl-cdefs.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 4e124b57e40c15c9ccb19c6a219816cfc8d2a167 Mon Sep 17 00:00:00 2001 -From: Jory Pratt <anar...@gentoo.org> -Date: Thu, 12 Dec 2019 22:38:30 -0600 -Subject: [PATCH 3/3] Fix cdefs.h include for musl - ---- - lib/fixedsizehash.h | 5 ++++- - libelf/elf.h | 4 ++++ - 2 files changed, 8 insertions(+), 1 deletion(-) - -diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h -index dac2a5f..910f3ac 100644 ---- a/lib/fixedsizehash.h -+++ b/lib/fixedsizehash.h -@@ -30,8 +30,11 @@ - #include <errno.h> - #include <stdlib.h> - #include <string.h> -+#if !defined(__GLIBC__) -+#include <bsd/sys/cdefs.h> -+#else - #include <sys/cdefs.h> -- -+#endif - #include <system.h> - - #ifdef __CONCAT -diff --git a/libelf/elf.h b/libelf/elf.h -index 7adc752..8cfc337 100644 ---- a/libelf/elf.h -+++ b/libelf/elf.h -@@ -21,6 +21,10 @@ - - #include <features.h> - -+#if !defined(__GLIBC__) -+#include <bsd/sys/cdefs.h> -+#endif -+ - __BEGIN_DECLS - - /* Standard ELF types. */ --- -2.24.1 - diff --git a/dev-libs/elfutils/files/0.178/musl-error_h.patch b/dev-libs/elfutils/files/0.178/musl-error_h.patch deleted file mode 100644 index 949e6006..00000000 --- a/dev-libs/elfutils/files/0.178/musl-error_h.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 9cb8fad40329cc6445233af0b6ac3f2adde19c65 Mon Sep 17 00:00:00 2001 -From: -Date: Thu, 12 Dec 2019 22:00:47 -0600 -Subject: [PATCH 9/9] Add hacked up error header for non GLIBC machines - ---- - lib/error.h | 27 +++++++++++++++++++++++++++ - src/error.h | 27 +++++++++++++++++++++++++++ - 2 files changed, 54 insertions(+) - create mode 100644 lib/error.h - create mode 100644 src/error.h - -diff --git a/lib/error.h b/lib/error.h -new file mode 100644 -index 0000000..ef06827 ---- /dev/null -+++ b/lib/error.h -@@ -0,0 +1,27 @@ -+#ifndef _ERROR_H_ -+#define _ERROR_H_ -+ -+#include <stdarg.h> -+#include <stdio.h> -+#include <stdlib.h> -+#include <string.h> -+#include <errno.h> -+ -+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/src/error.h b/src/error.h -new file mode 100644 -index 0000000..ef06827 ---- /dev/null -+++ b/src/error.h -@@ -0,0 +1,27 @@ -+#ifndef _ERROR_H_ -+#define _ERROR_H_ -+ -+#include <stdarg.h> -+#include <stdio.h> -+#include <stdlib.h> -+#include <string.h> -+#include <errno.h> -+ -+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_ */ --- -2.24.1 - diff --git a/dev-libs/elfutils/files/0.178/musl-fts-obstack.patch b/dev-libs/elfutils/files/0.178/musl-fts-obstack.patch deleted file mode 100644 index 24841647..00000000 --- a/dev-libs/elfutils/files/0.178/musl-fts-obstack.patch +++ /dev/null @@ -1,107 +0,0 @@ -From e9c4f15652e5c89c51d61007c296daf2cebca014 Mon Sep 17 00:00:00 2001 -From: -Date: Thu, 12 Dec 2019 21:53:18 -0600 -Subject: [PATCH 4/9] Check libc for fts and obstack or use standalone - ---- - configure.ac | 56 +++++++++++++++++++++++++++++++++++++++++++++++ - libdw/Makefile.am | 2 +- - src/Makefile.am | 2 +- - 3 files changed, 58 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 5a2dc37..7a17a9d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -529,6 +529,62 @@ else - fi - AC_SUBST([argp_LDADD]) - -+dnl Check if we have fts available from our libc -+AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM( -+ [#if !defined(__x86_64__) -+ #undef _FILE_OFFSET_BITS -+ #define _FILE_OFFSET_BITS 32 -+ #endif -+ #include <fts.h>], -+ [FTS* fts = 0; return fts_close(fts); return 0;] -+ )], -+ [libc_has_fts="true"], -+ [libc_has_fts="false"] -+) -+ -+dnl If our libc doesn't provide fts, then test for libfts -+if test "$libc_has_fts" = "false" ; then -+ AC_MSG_WARN("libc does not have fts") -+ AC_CHECK_LIB([fts], [fts_close], [have_fts="true"], [have_fts="false"]) -+ -+ if test "$have_fts" = "false"; then -+ AC_MSG_ERROR("no libfts found") -+ else -+ fts_LDADD="-lfts" -+ fi -+else -+ fts_LDADD="" -+fi -+AC_SUBST([fts_LDADD]) -+ -+dnl Check if we have obstack available from our libc -+AC_LINK_IFELSE( -+ [AC_LANG_PROGRAM( -+ [#include <obstack.h>], -+ [_obstack_begin(0, 0, 0, NULL, NULL); return 0;] -+ )], -+ [libc_has_obstack="true"], -+ [libc_has_obstack="false"] -+) -+ -+dnl If our libc doesn't provide obstack, then test for libobstack -+if test "$libc_has_obstack" = "false" ; then -+ AC_MSG_WARN("libc does not have obstack") -+ AC_CHECK_LIB([obstack], [_obstack_begin], [have_obstack="true"], [have_obstack="false"]) -+ -+ if test "$have_obstack" = "false"; then -+ AC_MSG_ERROR("no libobstack found") -+ else -+ obstack_LDADD="-lobstack" -+ fi -+else -+ obstack_LDADD="" -+fi -+AC_SUBST([obstack_LDADD]) -+ -+dnl The directories with content. -+ - dnl The directories with content. - - dnl Documentation. -diff --git a/libdw/Makefile.am b/libdw/Makefile.am -index 33b5838..af30825 100644 ---- a/libdw/Makefile.am -+++ b/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_LDADD) $(obstack_LDADD) $(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 a/src/Makefile.am b/src/Makefile.am -index e462e7d..d0cab5a 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -46,7 +46,7 @@ libelf = ../libelf/libelf.a -lz - else - libasm = ../libasm/libasm.so - libdw = ../libdw/libdw.so --libelf = ../libelf/libelf.so -+libelf = ../libelf/libelf.so $(fts_LDADD) $(obstack_LDADD) - endif - libebl = ../libebl/libebl.a ../backends/libebl_backends.a ../libcpu/libcpu.a - libeu = ../lib/libeu.a --- -2.24.1 - diff --git a/dev-libs/elfutils/files/0.178/musl-macros.patch b/dev-libs/elfutils/files/0.178/musl-macros.patch deleted file mode 100644 index f549b69e..00000000 --- a/dev-libs/elfutils/files/0.178/musl-macros.patch +++ /dev/null @@ -1,73 +0,0 @@ -From f49c96b011df0bd03eb45f72bdb102d580fab964 Mon Sep 17 00:00:00 2001 -From: -Date: Thu, 12 Dec 2019 21:54:37 -0600 -Subject: [PATCH 5/9] Add macros for musl support - ---- - src/arlib.h | 10 ++++++++++ - src/elfcompress.c | 8 ++++++++ - src/strip.c | 8 ++++++++ - 3 files changed, 26 insertions(+) - -diff --git a/src/arlib.h b/src/arlib.h -index e117166..c66a5c9 100644 ---- a/src/arlib.h -+++ b/src/arlib.h -@@ -29,6 +29,16 @@ - #include <stdint.h> - #include <sys/types.h> - -+#if !defined(ACCESSPERMS) -+# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */ -+#endif -+#if !defined(ALLPERMS) -+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */ -+#endif -+#if !defined(DEFFILEMODE) -+# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/ -+#endif -+ - - /* State of -D/-U flags. */ - extern bool arlib_deterministic_output; -diff --git a/src/elfcompress.c b/src/elfcompress.c -index 6ba6af4..f7d032b 100644 ---- a/src/elfcompress.c -+++ b/src/elfcompress.c -@@ -37,6 +37,14 @@ - #include "libeu.h" - #include "printversion.h" - -+#if !defined(FNM_EXTMATCH) -+# define FNM_EXTMATCH 0 -+#endif -+ -+#if !defined(ALLPERMS) -+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */ -+#endif -+ - /* Name and version of program. */ - ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; - -diff --git a/src/strip.c b/src/strip.c -index 48792a7..d2f0c60 100644 ---- a/src/strip.c -+++ b/src/strip.c -@@ -46,6 +46,14 @@ - #include <system.h> - #include <printversion.h> - -+#if !defined(FNM_EXTMATCH) -+# define FNM_EXTMATCH 0 -+#endif -+ -+#if !defined(ACCESSPERMS) -+#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) -+#endif -+ - typedef uint8_t GElf_Byte; - - /* Name and version of program. */ --- -2.24.1 - diff --git a/dev-libs/elfutils/files/0.178/musl-qsort_r.patch b/dev-libs/elfutils/files/0.178/musl-qsort_r.patch deleted file mode 100644 index 3e458283..00000000 --- a/dev-libs/elfutils/files/0.178/musl-qsort_r.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 2fe70c56695e170ae7b859c154a83532de2dee22 Mon Sep 17 00:00:00 2001 -From: -Date: Thu, 12 Dec 2019 21:55:34 -0600 -Subject: [PATCH 6/9] musl qsort_r - ---- - src/readelf.c | 21 ++++++++++++--------- - 1 file changed, 12 insertions(+), 9 deletions(-) - -diff --git a/src/readelf.c b/src/readelf.c -index cbb519d..dea513b 100644 ---- a/src/readelf.c -+++ b/src/readelf.c -@@ -4829,10 +4829,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; - -@@ -4848,21 +4849,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) - { -@@ -4870,7 +4871,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)); - } - } -@@ -4941,9 +4942,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 --- -2.24.1 - diff --git a/dev-libs/elfutils/files/0.178/musl-strerror_r.patch b/dev-libs/elfutils/files/0.178/musl-strerror_r.patch deleted file mode 100644 index f6ca8008..00000000 --- a/dev-libs/elfutils/files/0.178/musl-strerror_r.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 00bd0b5e75bbed231aa743502df96e0641da86fd Mon Sep 17 00:00:00 2001 -From: -Date: Thu, 12 Dec 2019 21:58:10 -0600 -Subject: [PATCH 7/9] musl strerror_r - ---- - libdwfl/dwfl_error.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/libdwfl/dwfl_error.c b/libdwfl/dwfl_error.c -index 7bcf61c..ff25ebb 100644 ---- a/libdwfl/dwfl_error.c -+++ b/libdwfl/dwfl_error.c -@@ -154,7 +154,16 @@ dwfl_errmsg (int error) - 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): --- -2.24.1 - diff --git a/dev-libs/elfutils/files/0.178/musl-strndupa.patch b/dev-libs/elfutils/files/0.178/musl-strndupa.patch deleted file mode 100644 index 5acd7e47..00000000 --- a/dev-libs/elfutils/files/0.178/musl-strndupa.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 411f7a1d30f03cb64e4716977e3504e25af8ce90 Mon Sep 17 00:00:00 2001 -From: -Date: Thu, 12 Dec 2019 21:58:31 -0600 -Subject: [PATCH 8/9] musl strndupa - ---- - src/unstrip.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/src/unstrip.c b/src/unstrip.c -index 9b8c09a..afce497 100644 ---- a/src/unstrip.c -+++ b/src/unstrip.c -@@ -56,6 +56,15 @@ - # define _(str) gettext (str) - #endif - -+#ifndef strndupa -+#define strndupa(s, n) \ -+ (__extension__ ({const char *__in = (s); \ -+ size_t __len = strnlen (__in, (n)) + 1; \ -+ char *__out = (char *) alloca (__len); \ -+ __out[__len-1] = '\0'; \ -+ (char *) memcpy (__out, __in, __len-1);})) -+#endif -+ - /* Name and version of program. */ - ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; - --- -2.24.1 - diff --git a/dev-libs/elfutils/files/0.185/musl-cdefs.patch b/dev-libs/elfutils/files/0.185/musl-cdefs.patch deleted file mode 100644 index c102f04b..00000000 --- a/dev-libs/elfutils/files/0.185/musl-cdefs.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 4e124b57e40c15c9ccb19c6a219816cfc8d2a167 Mon Sep 17 00:00:00 2001 -From: Jory Pratt <anar...@gentoo.org> -Date: Thu, 12 Dec 2019 22:38:30 -0600 -Subject: [PATCH 3/3] Fix cdefs.h include for musl - ---- - lib/fixedsizehash.h | 5 ++++- - 1 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/lib/fixedsizehash.h b/lib/fixedsizehash.h -index dac2a5f..910f3ac 100644 ---- a/lib/fixedsizehash.h -+++ b/lib/fixedsizehash.h -@@ -30,8 +30,11 @@ - #include <errno.h> - #include <stdlib.h> - #include <string.h> -+#if !defined(__GLIBC__) -+#include <bsd/sys/cdefs.h> -+#else - #include <sys/cdefs.h> -- -+#endif - #include <system.h> - - #ifdef __CONCAT --- -2.24.1 - diff --git a/dev-libs/elfutils/files/0.185/musl-fix-uninitialized-mnebuf.patch b/dev-libs/elfutils/files/0.185/musl-fix-uninitialized-mnebuf.patch deleted file mode 100644 index 21514afd..00000000 --- a/dev-libs/elfutils/files/0.185/musl-fix-uninitialized-mnebuf.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 2c2d8d71838e9de7f711ea753414301e02f1e5a8 Mon Sep 17 00:00:00 2001 -From: -Date: Sat, 4 Sep 2021 10:08:49 -0500 -Subject: [PATCH] Fix uninitialized mnebuf - ---- - libcpu/i386_disasm.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c -index fd7340c..61a8256 100644 ---- a/libcpu/i386_disasm.c -+++ b/libcpu/i386_disasm.c -@@ -714,6 +714,7 @@ i386_disasm (Ebl *ebl __attribute__((unused)), - - case 'm': - /* Mnemonic. */ -+ str = mnebuf; - - if (unlikely (instrtab[cnt].mnemonic == MNE_INVALID)) - { --- -2.32.0 - diff --git a/dev-libs/elfutils/files/elfutils-0.175-disable-biarch-test-PR24158.patch b/dev-libs/elfutils/files/elfutils-0.175-disable-biarch-test-PR24158.patch deleted file mode 100644 index 809c3df1..00000000 --- a/dev-libs/elfutils/files/elfutils-0.175-disable-biarch-test-PR24158.patch +++ /dev/null @@ -1,9 +0,0 @@ -https://sourceware.org/PR24158 - -Tets fails when 32-bit elfutils tries to dump 64-bit process. ---- a/tests/run-backtrace-native-biarch.sh -+++ b/tests/run-backtrace-native-biarch.sh -@@ -17,2 +17,3 @@ - -+ELFUTILS_DISABLE_BIARCH=yes # https://sourceware.org/PR24158 - if test -n "$ELFUTILS_DISABLE_BIARCH"; then diff --git a/dev-libs/elfutils/files/elfutils-0.177-disable-large.patch b/dev-libs/elfutils/files/elfutils-0.177-disable-large.patch deleted file mode 100644 index 78295851..00000000 --- a/dev-libs/elfutils/files/elfutils-0.177-disable-large.patch +++ /dev/null @@ -1,14 +0,0 @@ -getconf does not disable test on 64-kernel with CFLAGS=-m32 ---- a/tests/run-large-elf-file.sh -+++ b/tests/run-large-elf-file.sh -@@ -19,6 +19,10 @@ - - # Only run on 64bit systems, 32bit systems don't support > 4GB - # ELF files. -+ -+# this detection fails for 64-bit systems with -m32 -+exit 77 -+ - long_bit=$(getconf LONG_BIT) - echo "long_bit: $long_bit" - if test $long_bit -ne 64; then diff --git a/dev-libs/elfutils/files/elfutils-0.179-CC-in-tests.patch b/dev-libs/elfutils/files/elfutils-0.179-CC-in-tests.patch deleted file mode 100644 index aa58862e..00000000 --- a/dev-libs/elfutils/files/elfutils-0.179-CC-in-tests.patch +++ /dev/null @@ -1,45 +0,0 @@ -https://bugs.gentoo.org/718872 ---- a/tests/run-disasm-x86-64.sh -+++ b/tests/run-disasm-x86-64.sh -@@ -22,7 +22,7 @@ case "`uname -m`" in - x86_64) - tempfiles testfile45.o - testfiles testfile45.S testfile45.expect -- gcc -m64 -c -o testfile45.o testfile45.S -+ ${CC-gcc} -m64 -c -o testfile45.o testfile45.S - testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect - ;; - esac ---- a/tests/run-disasm-x86.sh -+++ b/tests/run-disasm-x86.sh -@@ -22,7 +22,7 @@ case "`uname -m`" in - x86_64 | i?86 ) - tempfiles testfile44.o - testfiles testfile44.S testfile44.expect -- gcc -m32 -c -o testfile44.o testfile44.S -+ ${CC-gcc} -m32 -c -o testfile44.o testfile44.S - testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect - ;; - esac ---- a/tests/run-strip-g.sh -+++ b/tests/run-strip-g.sh -@@ -25,7 +25,7 @@ - tempfiles a.out strip.out debug.out readelf.out - - echo Create debug a.out. --echo "int main() { return 1; }" | gcc -g -xc - -+echo "int main() { return 1; }" | ${CC-gcc} -g -xc - - - echo strip -g to file with debug file - testrun ${abs_top_builddir}/src/strip -g -o strip.out -f debug.out || ---- a/tests/run-strip-nothing.sh -+++ b/tests/run-strip-nothing.sh -@@ -23,7 +23,7 @@ - tempfiles a.out strip.out debug.out - - # Create no-debug a.out. --echo "int main() { return 1; }" | gcc -s -xc - -+echo "int main() { return 1; }" | ${CC-gcc} -s -xc - - - # strip to file - testrun ${abs_top_builddir}/src/strip -g -o strip.out || diff --git a/dev-libs/elfutils/files/elfutils-0.180-PaX-support.patch b/dev-libs/elfutils/files/elfutils-0.180-PaX-support.patch deleted file mode 100644 index 2d44c757..00000000 --- a/dev-libs/elfutils/files/elfutils-0.180-PaX-support.patch +++ /dev/null @@ -1,26 +0,0 @@ -Add support for PaX ELF markings - -Patch by Kevin F. Quinn <kevqu...@gentoo.org> - -http://bugs.gentoo.org/115100 - ---- a/libelf/elf.h -+++ b/libelf/elf.h -@@ -722,6 +722,7 @@ typedef struct - #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ - #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ - #define PT_GNU_PROPERTY 0x6474e553 /* GNU property */ -+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ - #define PT_LOSUNW 0x6ffffffa - #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ - #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ ---- a/src/elflint.c -+++ b/src/elflint.c -@@ -4493,6 +4493,7 @@ only executables, shared objects, and core files can have program headers\n")); - - if (phdr->p_type >= PT_NUM && phdr->p_type != PT_GNU_EH_FRAME - && phdr->p_type != PT_GNU_STACK && phdr->p_type != PT_GNU_RELRO -+ && phdr->p_type != PT_PAX_FLAGS - && phdr->p_type != PT_GNU_PROPERTY - /* Check for a known machine-specific type. */ - && ebl_segment_type_name (ebl, phdr->p_type, NULL, 0) == NULL) diff --git a/dev-libs/elfutils/files/elfutils-0.180-readelf.patch b/dev-libs/elfutils/files/elfutils-0.180-readelf.patch deleted file mode 100644 index a347d030..00000000 --- a/dev-libs/elfutils/files/elfutils-0.180-readelf.patch +++ /dev/null @@ -1,23 +0,0 @@ -Use tool-prefixed readelf. ---- a/configure.ac -+++ b/configure.ac -@@ -200,7 +200,7 @@ fi - # We really want build-ids. Warn and force generating them if gcc was - # configure without --enable-linker-build-id - AC_CACHE_CHECK([whether the compiler generates build-ids], ac_cv_buildid, [dnl --AC_LINK_IFELSE([AC_LANG_PROGRAM()],[ac_cv_buildid=yes; readelf -n conftest$EXEEXT | grep -q NT_GNU_BUILD_ID || ac_cv_buildid=no],AC_MSG_FAILURE([unexpected compile failure]))]) -+AC_LINK_IFELSE([AC_LANG_PROGRAM()],[ac_cv_buildid=yes; $READELF -n conftest$EXEEXT | grep -q NT_GNU_BUILD_ID || ac_cv_buildid=no],AC_MSG_FAILURE([unexpected compile failure]))]) - if test "$ac_cv_buildid" = "no"; then - AC_MSG_WARN([compiler doesn't generate build-id by default]) - LDFLAGS="$LDFLAGS -Wl,--build-id" ---- a/configure -+++ b/configure -@@ -5343,7 +5343,7 @@ main () - } - _ACEOF - if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_buildid=yes; readelf -n conftest$EXEEXT | grep -q NT_GNU_BUILD_ID || ac_cv_buildid=no -+ ac_cv_buildid=yes; $READELF -n conftest$EXEEXT | grep -q NT_GNU_BUILD_ID || ac_cv_buildid=no - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} diff --git a/dev-libs/elfutils/files/elfutils-0.185-static-inline.patch b/dev-libs/elfutils/files/elfutils-0.185-static-inline.patch deleted file mode 100644 index ec1aaf47..00000000 --- a/dev-libs/elfutils/files/elfutils-0.185-static-inline.patch +++ /dev/null @@ -1,12 +0,0 @@ -https://bugs.gentoo.org/794601 ---- a/src/elflint.c -+++ b/src/elflint.c -@@ -3434,7 +3434,7 @@ buffer_pos (Elf_Data *data, const unsigned char *p) - return p - (const unsigned char *) data->d_buf; - } - --inline size_t -+static inline size_t - buffer_left (Elf_Data *data, const unsigned char *p) - { - return (const unsigned char *) data->d_buf + data->d_size - p; diff --git a/dev-libs/elfutils/metadata.xml b/dev-libs/elfutils/metadata.xml deleted file mode 100644 index 10d87fac..00000000 --- a/dev-libs/elfutils/metadata.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>toolch...@gentoo.org</email> - <name>Gentoo Toolchain Project</name> - </maintainer> - <use> - <flag name="lzma">Support automatic decompression of LZMA-compressed files and kernel images</flag> - <flag name="threads">Build the libraries with thread safe support</flag> - <flag name="utils">Install command-line utilities (all the eu-* programs)</flag> - <flag name="valgrind">Add support for memory debugging using <pkg>dev-util/valgrind</pkg></flag> - </use> - <upstream> - <remote-id type="cpe">cpe:/a:elfutils_project:elfutils</remote-id> - </upstream> -</pkgmetadata>