summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2021-11-14 07:56:14 +0000
committerSam James <sam@gentoo.org>2021-11-14 07:57:23 +0000
commitef17e2c45cd32e31ec8c696702bb7baf6707f9ef (patch)
tree042fcc584267fd474c16fe1916ec68ac1a34a3bb
parentprofiles/arch/powerpc/ppc64/64le: unmask firefox[screencast] (diff)
downloadgentoo-ef17e2c45cd32e31ec8c696702bb7baf6707f9ef.tar.gz
gentoo-ef17e2c45cd32e31ec8c696702bb7baf6707f9ef.tar.bz2
gentoo-ef17e2c45cd32e31ec8c696702bb7baf6707f9ef.zip
dev-libs/elfutils: use patches from devspace; update for musl in 0.186
- Move 0.185 and 0.186 patches into their own compressed tarball in devspace (files dir was getting _way_ too big) - Fix patches for musl in 0.186 (both one which didn't apply anymore and an additional upstream patch). Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--dev-libs/elfutils/Manifest2
-rw-r--r--dev-libs/elfutils/elfutils-0.185.ebuild11
-rw-r--r--dev-libs/elfutils/elfutils-0.186.ebuild14
-rw-r--r--dev-libs/elfutils/files/elfutils-0.175-disable-biarch-test-PR24158.patch9
-rw-r--r--dev-libs/elfutils/files/elfutils-0.177-disable-large.patch14
-rw-r--r--dev-libs/elfutils/files/elfutils-0.180-PaX-support.patch26
-rw-r--r--dev-libs/elfutils/files/elfutils-0.185-configure.ac-rework-gnu99-ext-check-to-allow-clang.patch146
-rw-r--r--dev-libs/elfutils/files/elfutils-0.185-glibc-2.34-test-failure.patch124
-rw-r--r--dev-libs/elfutils/files/elfutils-0.185-pull-advance_pc-in-file-scope.patch70
-rw-r--r--dev-libs/elfutils/files/elfutils-0.185-static-inline.patch12
-rw-r--r--dev-libs/elfutils/files/musl/elfutils-0.185-aarch64-regs.patch57
-rw-r--r--dev-libs/elfutils/files/musl/elfutils-0.185-cdefs.patch20
-rw-r--r--dev-libs/elfutils/files/musl/elfutils-0.185-error-h.patch68
-rw-r--r--dev-libs/elfutils/files/musl/elfutils-0.185-macros.patch86
-rw-r--r--dev-libs/elfutils/files/musl/elfutils-0.185-strndupa.patch22
15 files changed, 8 insertions, 673 deletions
diff --git a/dev-libs/elfutils/Manifest b/dev-libs/elfutils/Manifest
index 0a6a8004f327..6af4e92e7b9e 100644
--- a/dev-libs/elfutils/Manifest
+++ b/dev-libs/elfutils/Manifest
@@ -1,2 +1,4 @@
+DIST elfutils-0.185-patches.tar.gz 7625 BLAKE2B 92aff147aa7e45976863e8129e25ecad74ad9bca231c9223897094c5933c3b350eb525a203b492d80c1eabee3b3808b43e30bdb879d7173eac968afa2005e97c SHA512 3f253c4de97190731ac157044572912b76df80f9473f3df335f0383dad6409f987593a749c5284672cf1b20241ac3ed9d77b126f730aaf594725703b6a426906
DIST elfutils-0.185.tar.bz2 9187627 BLAKE2B 57cfa7e4060975c4bf6170dbd354687a19a92f7069c060db1ac2fa4da5a9d34e8bddd07c7ce376b5c28b5670ad5b8c1df795164cbcfb600a44cf1db60c20c4af SHA512 34de0de1355b11740e036e0fc64f2fc063587c8eb121b19216ee5548d3f0f268d8fc3995176c47190466b9d881007cfa11a9d01e9a50e38af6119492bf8bb47f
+DIST elfutils-0.186-patches.tar.gz 3323 BLAKE2B 360365597d3a08d6f4fe843d04bcddd07a44ca93dae2034615abc450517e1be21c81a55aa379c409902e134ae795b38bb7461c65cdba3934ac7ef1e4e0e53091 SHA512 e2d427be505fdc416751a1fbc3bb4f39577859d94ce43990faa83c135fe36be2ddb3a2ef0f1020cfa37060e6d43dc7b8cf3db0d07d62b31bf29cb9a4a5945ce1
DIST elfutils-0.186.tar.bz2 9230491 BLAKE2B 49573d0a1f3519eab81d1ba3e94354cbc0935a36a94a3fdb22fe223a47b78cca8fd6e322870b0e335a809529fa6f54180b13c67936dec0242123c54ba20c9fc9 SHA512 c9180b27ec62935f18b9431268d176f6023d1bb938731d2af6e7626ae460af6608a70ba68483aa1ec7e6cb0fa0528b661ca8b68bc4f58ea8e18af527c5950c78
diff --git a/dev-libs/elfutils/elfutils-0.185.ebuild b/dev-libs/elfutils/elfutils-0.185.ebuild
index 84df482f3f86..26aeca00e2e8 100644
--- a/dev-libs/elfutils/elfutils-0.185.ebuild
+++ b/dev-libs/elfutils/elfutils-0.185.ebuild
@@ -8,6 +8,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"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-0.185-patches.tar.gz"
LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )"
SLOT="0"
@@ -36,20 +37,14 @@ BDEPEND="nls? ( sys-devel/gettext )
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
- "${FILESDIR}"/${PN}-0.185-pull-advance_pc-in-file-scope.patch
- "${FILESDIR}"/${PN}-0.185-configure.ac-rework-gnu99-ext-check-to-allow-clang.patch
- "${FILESDIR}"/${PN}-0.185-glibc-2.34-test-failure.patch
+ "${WORKDIR}"/${PN}-0.185-patches/
)
src_prepare() {
default
if use elibc_musl; then
- eapply "${FILESDIR}"/musl/
+ eapply "${WORKDIR}"/${PN}-0.185-patches/musl/
fi
if ! use static-libs; then
diff --git a/dev-libs/elfutils/elfutils-0.186.ebuild b/dev-libs/elfutils/elfutils-0.186.ebuild
index d7c479481a35..e8c5b4a6a800 100644
--- a/dev-libs/elfutils/elfutils-0.186.ebuild
+++ b/dev-libs/elfutils/elfutils-0.186.ebuild
@@ -8,6 +8,7 @@ inherit flag-o-matic multilib-minimal
DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
HOMEPAGE="https://elfutils.org/"
SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2"
+SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-0.186-patches.tar.gz"
LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )"
SLOT="0"
@@ -36,23 +37,14 @@ BDEPEND="nls? ( sys-devel/gettext )
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
+ "${WORKDIR}"/${PN}-0.186-patches/
)
src_prepare() {
default
if use elibc_musl; then
- mkdir -p "${T}"/musl || die
- cp -rv "${FILESDIR}"/musl/*.patch "${T}"/musl || die
-
- # Delete patches upstreamed in 0.186
- rm "${T}/musl/${PN}-0.185-error-h.patch" || die
- rm "${T}/musl/${PN}-0.185-strndupa.patch" || die
-
- eapply "${T}"/musl/
+ eapply "${WORKDIR}"/${PN}-0.186-patches/musl/
fi
if ! use static-libs; then
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 809c3df1efad..000000000000
--- 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 782958517611..000000000000
--- 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.180-PaX-support.patch b/dev-libs/elfutils/files/elfutils-0.180-PaX-support.patch
deleted file mode 100644
index 2d44c757711a..000000000000
--- 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 <kevquinn@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.185-configure.ac-rework-gnu99-ext-check-to-allow-clang.patch b/dev-libs/elfutils/files/elfutils-0.185-configure.ac-rework-gnu99-ext-check-to-allow-clang.patch
deleted file mode 100644
index fe0b111ca859..000000000000
--- a/dev-libs/elfutils/files/elfutils-0.185-configure.ac-rework-gnu99-ext-check-to-allow-clang.patch
+++ /dev/null
@@ -1,146 +0,0 @@
-From c9ff5c53c319f963cac34a41c86cd43edf902459 Mon Sep 17 00:00:00 2001
-From: Adrian Ratiu <adrian.ratiu@collabora.com>
-Date: Mon, 30 Aug 2021 18:43:13 +0300
-Subject: [PATCH] configure.ac: rework gnu99 ext check to allow clang
-
-It is true that Clang does not support all gnu99 extensions [1],
-but not all of them are used in the codebase and over time there
-have been code cleanup efforts to improve Clang support.
-
-For example after commit 779c57ea ("readelf: Pull advance_pc()
-in file scope") there are no more nested function declarations
-and elfutils now builds fine with Clang.
-
-So in the interest of enabling Clang builds we remove the only
-remaining blocker: the configure checks for nested functions and
-variable length arrays which are also unused.
-
-Considering mixed decls and code is also part of c99 standard,
-the entire check becomes redundant and we can just replace
-AC_PROG_CC -> AC_PROG_CC_C99.
-
-Upstream-Status: Backport [master commit 6eb991a9]
-
-[1] https://sourceware.org/bugzilla/show_bug.cgi?id=24964
-[Adrian: backported to v0.185]
-Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
----
- configure | 48 ------------------------------------------------
- configure.ac | 35 +----------------------------------
- 2 files changed, 1 insertion(+), 82 deletions(-)
-
-diff --git a/configure b/configure
-index 4ea75ee..22bda6c 100755
---- a/configure
-+++ b/configure
-@@ -5162,54 +5162,6 @@ else
- fi
-
-
--# We use -std=gnu99 but have explicit checks for some language constructs
--# and GNU extensions since some compilers claim GNU99 support, but don't
--# really support all language extensions. In particular we need
--# Mixed Declarations and Code
--# https://gcc.gnu.org/onlinedocs/gcc/Mixed-Declarations.html
--# Nested Functions
--# https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html
--# Arrays of Variable Length
--# https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc with GNU99 support" >&5
--$as_echo_n "checking for gcc with GNU99 support... " >&6; }
--if ${ac_cv_c99+:} false; then :
-- $as_echo_n "(cached) " >&6
--else
-- old_CFLAGS="$CFLAGS"
--CFLAGS="$CFLAGS -std=gnu99"
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h. */
--int foo (int a)
--{
-- for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; return s;
--}
--
--double bar (double a, double b)
--{
-- double square (double z) { return z * z; }
-- return square (a) + square (b);
--}
--
--void baz (int n)
--{
-- struct S { int x[n]; };
--}
--_ACEOF
--if ac_fn_c_try_compile "$LINENO"; then :
-- ac_cv_c99=yes
--else
-- ac_cv_c99=no
--fi
--rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
--CFLAGS="$old_CFLAGS"
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c99" >&5
--$as_echo "$ac_cv_c99" >&6; }
--if test "x$ac_cv_c99" != xyes; then :
-- as_fn_error $? "gcc with GNU99 support required" "$LINENO" 5
--fi
--
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports __attribute__((visibility()))" >&5
- $as_echo_n "checking whether gcc supports __attribute__((visibility()))... " >&6; }
- if ${ac_cv_visibility+:} false; then :
-diff --git a/configure.ac b/configure.ac
-index b348a71..6298547 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -87,7 +87,7 @@ AS_IF([test "$use_locks" = yes],
-
- AH_TEMPLATE([USE_LOCKS], [Defined if libraries should be thread-safe.])
-
--AC_PROG_CC
-+AC_PROG_CC_C99
- AC_PROG_RANLIB
- AC_PROG_YACC
- AM_PROG_LEX
-@@ -96,39 +96,6 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
- AC_CHECK_TOOL([READELF], [readelf])
- AC_CHECK_TOOL([NM], [nm])
-
--# We use -std=gnu99 but have explicit checks for some language constructs
--# and GNU extensions since some compilers claim GNU99 support, but don't
--# really support all language extensions. In particular we need
--# Mixed Declarations and Code
--# https://gcc.gnu.org/onlinedocs/gcc/Mixed-Declarations.html
--# Nested Functions
--# https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html
--# Arrays of Variable Length
--# https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html
--AC_CACHE_CHECK([for gcc with GNU99 support], ac_cv_c99, [dnl
--old_CFLAGS="$CFLAGS"
--CFLAGS="$CFLAGS -std=gnu99"
--AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl
--int foo (int a)
--{
-- for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; return s;
--}
--
--double bar (double a, double b)
--{
-- double square (double z) { return z * z; }
-- return square (a) + square (b);
--}
--
--void baz (int n)
--{
-- struct S { int x[[n]]; };
--}])],
-- ac_cv_c99=yes, ac_cv_c99=no)
--CFLAGS="$old_CFLAGS"])
--AS_IF([test "x$ac_cv_c99" != xyes],
-- AC_MSG_ERROR([gcc with GNU99 support required]))
--
- AC_CACHE_CHECK([whether gcc supports __attribute__((visibility()))],
- ac_cv_visibility, [dnl
- save_CFLAGS="$CFLAGS"
---
-2.33.0
-
diff --git a/dev-libs/elfutils/files/elfutils-0.185-glibc-2.34-test-failure.patch b/dev-libs/elfutils/files/elfutils-0.185-glibc-2.34-test-failure.patch
deleted file mode 100644
index 134e642ab0eb..000000000000
--- a/dev-libs/elfutils/files/elfutils-0.185-glibc-2.34-test-failure.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-https://sourceware.org/git/?p=elfutils.git;a=commit;h=9aee0992d6e6ec4cce2c015d8da4b61022c6f6dd
-
-Author: Mark Wielaard <mark@klomp.org>
-Date: Wed Aug 4 21:01:27 2021 +0200
-
- tests: Allow an extra pthread_kill frame in backtrace tests
-
- glibc 2.34 calls pthread_kill from the raise function. Before raise
- directly called the (tg)kill syscall. So allow pthread_kill to be the
- first frame in a backtrace where raise is expected. Also change some
- asserts to fprintf plus abort to make it more clear why the testcase
- fails.
-
- https://sourceware.org/bugzilla/show_bug.cgi?id=28190
-
- Signed-off-by: Mark Wielaard <mark@klomp.org>
-
---- a/tests/backtrace.c
-+++ b/tests/backtrace.c
-@@ -97,6 +97,9 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
- static bool reduce_frameno = false;
- if (reduce_frameno)
- frameno--;
-+ static bool pthread_kill_seen = false;
-+ if (pthread_kill_seen)
-+ frameno--;
- if (! use_raise_jmp_patching && frameno >= 2)
- frameno += 2;
- const char *symname2 = NULL;
-@@ -107,11 +110,26 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
- && (strcmp (symname, "__kernel_vsyscall") == 0
- || strcmp (symname, "__libc_do_syscall") == 0))
- reduce_frameno = true;
-+ else if (! pthread_kill_seen && symname
-+ && strstr (symname, "pthread_kill") != NULL)
-+ pthread_kill_seen = true;
- else
-- assert (symname && strcmp (symname, "raise") == 0);
-+ {
-+ if (!symname || strcmp (symname, "raise") != 0)
-+ {
-+ fprintf (stderr,
-+ "case 0: expected symname 'raise' got '%s'\n", symname);
-+ abort ();
-+ }
-+ }
- break;
- case 1:
-- assert (symname != NULL && strcmp (symname, "sigusr2") == 0);
-+ if (symname == NULL || strcmp (symname, "sigusr2") != 0)
-+ {
-+ fprintf (stderr,
-+ "case 1: expected symname 'sigusr2' got '%s'\n", symname);
-+ abort ();
-+ }
- break;
- case 2: // x86_64 only
- /* __restore_rt - glibc maybe does not have to have this symbol. */
-@@ -120,11 +138,21 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
- if (use_raise_jmp_patching)
- {
- /* Verify we trapped on the very first instruction of jmp. */
-- assert (symname != NULL && strcmp (symname, "jmp") == 0);
-+ if (symname == NULL || strcmp (symname, "jmp") != 0)
-+ {
-+ fprintf (stderr,
-+ "case 3: expected symname 'raise' got '%s'\n", symname);
-+ abort ();
-+ }
- mod = dwfl_addrmodule (dwfl, pc - 1);
- if (mod)
- symname2 = dwfl_module_addrname (mod, pc - 1);
-- assert (symname2 == NULL || strcmp (symname2, "jmp") != 0);
-+ if (symname2 == NULL || strcmp (symname2, "jmp") != 0)
-+ {
-+ fprintf (stderr,
-+ "case 3: expected symname2 'jmp' got '%s'\n", symname2);
-+ abort ();
-+ }
- break;
- }
- FALLTHROUGH;
-@@ -137,11 +165,22 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
- duplicate_sigusr2 = true;
- break;
- }
-- assert (symname != NULL && strcmp (symname, "stdarg") == 0);
-+ if (symname == NULL || strcmp (symname, "stdarg") != 0)
-+ {
-+ fprintf (stderr,
-+ "case 4: expected symname 'stdarg' got '%s'\n", symname);
-+ abort ();
-+ }
- break;
- case 5:
- /* Verify we trapped on the very last instruction of child. */
-- assert (symname != NULL && strcmp (symname, "backtracegen") == 0);
-+ if (symname == NULL || strcmp (symname, "backtracegen") != 0)
-+ {
-+ fprintf (stderr,
-+ "case 5: expected symname 'backtracegen' got '%s'\n",
-+ symname);
-+ abort ();
-+ }
- mod = dwfl_addrmodule (dwfl, pc);
- if (mod)
- symname2 = dwfl_module_addrname (mod, pc);
-@@ -151,7 +190,15 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
- // instructions or even inserts some padding instructions at the end
- // (which apparently happens on ppc64).
- if (use_raise_jmp_patching)
-- assert (symname2 == NULL || strcmp (symname2, "backtracegen") != 0);
-+ {
-+ if (symname2 != NULL && strcmp (symname2, "backtracegen") == 0)
-+ {
-+ fprintf (stderr,
-+ "use_raise_jmp_patching didn't expect symname2 "
-+ "'backtracegen'\n");
-+ abort ();
-+ }
-+ }
- break;
- }
- }
diff --git a/dev-libs/elfutils/files/elfutils-0.185-pull-advance_pc-in-file-scope.patch b/dev-libs/elfutils/files/elfutils-0.185-pull-advance_pc-in-file-scope.patch
deleted file mode 100644
index e0678c9ba73e..000000000000
--- a/dev-libs/elfutils/files/elfutils-0.185-pull-advance_pc-in-file-scope.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 779c57ea864d104bad88455535df9b26336349fd Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder@redhat.com>
-Date: Thu, 18 Mar 2021 10:25:24 +0100
-Subject: [PATCH] readelf: Pull advance_pc() in file scope
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Make advance_pc() a static function so we can get rid of another nested
-function. Rename it to run_advance_pc() and use a local advance_pc()
-macro to pass all the local variables. This is similar to what the
-equivalent code in libdw/dwarf_getsrclines.c is doing.
-
-Upstream-Status: Backport [master commit 779c57ea]
-
-Signed-off-by: Timm Bäder <tbaeder@redhat.com>
-[Adrian: backported to v0.185]
-Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
----
- src/ChangeLog | 7 +++++++
- src/readelf.c | 26 +++++++++++++++++++-------
- 2 files changed, 26 insertions(+), 7 deletions(-)
-
-diff --git a/src/readelf.c b/src/readelf.c
-index 161d7e65..8191bde2 100644
---- a/src/readelf.c
-+++ b/src/readelf.c
-@@ -8373,6 +8373,23 @@ print_form_data (Dwarf *dbg, int form, const unsigned char *readp,
- return readp;
- }
-
-+/* Only used via run_advance_pc() macro */
-+static inline void
-+run_advance_pc (unsigned int op_advance,
-+ unsigned int minimum_instr_len,
-+ unsigned int max_ops_per_instr,
-+ unsigned int *op_addr_advance,
-+ Dwarf_Word *address,
-+ unsigned int *op_index)
-+{
-+ const unsigned int advanced_op_index = (*op_index) + op_advance;
-+
-+ *op_addr_advance = minimum_instr_len * (advanced_op_index
-+ / max_ops_per_instr);
-+ *address = *address + *op_addr_advance;
-+ *op_index = advanced_op_index % max_ops_per_instr;
-+}
-+
- static void
- print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
- Elf_Scn *scn, GElf_Shdr *shdr, Dwarf *dbg)
-@@ -8763,13 +8780,8 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr,
- /* Apply the "operation advance" from a special opcode
- or DW_LNS_advance_pc (as per DWARF4 6.2.5.1). */
- unsigned int op_addr_advance;
-- inline void advance_pc (unsigned int op_advance)
-- {
-- op_addr_advance = minimum_instr_len * ((op_index + op_advance)
-- / max_ops_per_instr);
-- address += op_addr_advance;
-- op_index = (op_index + op_advance) % max_ops_per_instr;
-- }
-+#define advance_pc(op_advance) run_advance_pc(op_advance, minimum_instr_len, \
-+ max_ops_per_instr, &op_addr_advance, &address, &op_index)
-
- if (max_ops_per_instr == 0)
- {
---
-2.32.0
-
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 ec1aaf47a331..000000000000
--- 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/files/musl/elfutils-0.185-aarch64-regs.patch b/dev-libs/elfutils/files/musl/elfutils-0.185-aarch64-regs.patch
deleted file mode 100644
index 222c0527b689..000000000000
--- a/dev-libs/elfutils/files/musl/elfutils-0.185-aarch64-regs.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-https://www.sourceware.org/bugzilla/show_bug.cgi?id=25832
-https://cgit.openembedded.org/openembedded-core/plain/meta/recipes-devtools/elfutils/files/0006-Fix-build-on-aarch64-musl.patch
-https://bugs.gentoo.org/693772
-
-Other variants/links:
-https://git.alpinelinux.org/aports/tree/main/elfutils/fix-aarch64_fregs.patch
-https://github.com/gentoo/musl/blob/6450482b9b4463b57ac249c63b7ed796e9874c40/dev-libs/elfutils/files/0.178/fix-aarch64_fregs.patch
-
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Tue, 15 Aug 2017 17:27:30 +0800
-Subject: [PATCH] Fix build on aarch64/musl
-
-Errors
-
-invalid operands to binary & (have 'long double' and 'unsigned int')
-
-error: redefinition
- of 'struct iovec'
- struct iovec { void *iov_base; size_t iov_len; };
- ^
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
-Rebase to 0.170
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
-
---- 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;
---- 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. */
diff --git a/dev-libs/elfutils/files/musl/elfutils-0.185-cdefs.patch b/dev-libs/elfutils/files/musl/elfutils-0.185-cdefs.patch
deleted file mode 100644
index 42fc10945ebe..000000000000
--- a/dev-libs/elfutils/files/musl/elfutils-0.185-cdefs.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-From: Jory Pratt <anarchy@gentoo.org>
-Date: Thu, 12 Dec 2019 22:38:30 -0600
-Subject: [PATCH 3/3] Fix cdefs.h include for musl
-
---- 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/dev-libs/elfutils/files/musl/elfutils-0.185-error-h.patch b/dev-libs/elfutils/files/musl/elfutils-0.185-error-h.patch
deleted file mode 100644
index 2be63fca48df..000000000000
--- a/dev-libs/elfutils/files/musl/elfutils-0.185-error-h.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Should be obsolete with the next release (0.186?).
-
-https://raw.githubusercontent.com/gentoo/musl/master/dev-libs/elfutils/files/0.178/musl-error_h.patch
-https://sourceware.org/bugzilla/show_bug.cgi?id=21008
-
-Date: Thu, 12 Dec 2019 22:00:47 -0600
-Subject: [PATCH 9/9] Add hacked up error header for non GLIBC machines
-
---- /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_ */
---- /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_ */
diff --git a/dev-libs/elfutils/files/musl/elfutils-0.185-macros.patch b/dev-libs/elfutils/files/musl/elfutils-0.185-macros.patch
deleted file mode 100644
index 6ab2e96548bd..000000000000
--- a/dev-libs/elfutils/files/musl/elfutils-0.185-macros.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-May not be required (or at least some hunks) with next release (0.186?)
-
-https://git.alpinelinux.org/aports/plain/main/elfutils/musl-macros.patch
---- 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;
---- a/src/elfcompress.c
-+++ b/src/elfcompress.c
-@@ -35,6 +35,14 @@
- #include <gelf.h>
- #include "system.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. */
- static void print_version (FILE *stream, struct argp_state *state);
- ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
---- a/lib/libeu.h
-+++ b/lib/libeu.h
-@@ -31,6 +31,27 @@
-
- #include <stddef.h>
- #include <stdint.h>
-+#include <unistd.h>
-+#include <alloca.h>
-+#include <string.h>
-+
-+#ifndef TEMP_FAILURE_RETRY
-+#define TEMP_FAILURE_RETRY(expression) \
-+ (__extension__ \
-+ ({ long int __result; \
-+ do __result = (long int) (expression); \
-+ while (__result == -1L && errno == EINTR); \
-+ __result; }))
-+#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
-
- extern void *xmalloc (size_t) __attribute__ ((__malloc__));
- extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__));
---- 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. */
diff --git a/dev-libs/elfutils/files/musl/elfutils-0.185-strndupa.patch b/dev-libs/elfutils/files/musl/elfutils-0.185-strndupa.patch
deleted file mode 100644
index 030bc779c614..000000000000
--- a/dev-libs/elfutils/files/musl/elfutils-0.185-strndupa.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-Should be fixed in next release (0.186?).
-
-https://sourceware.org/git/?p=elfutils.git;a=commit;h=e7e4c92650892cf67210be5ea89ffba967427cbf
-https://git.alpinelinux.org/aports/plain/main/elfutils/musl-strndupa.patch
---- 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;
-