Files
gentoo/dev-libs/elfutils/files/elfutils-0.189-musl-aarch64-regs.patch
Sam James c7245f6d8e dev-libs/elfutils: drop stale patches, fix tests w/ mawk
Thank you again to mjw for pointing this out!

Drop two stale patches:
- elfutils-0.177-disable-large.patch: see https://sourceware.org/bugzilla/show_bug.cgi?id=24158#c3.
- elfutils-0.175-disable-biarch-test-PR24158.patch: see https://sourceware.org/bugzilla/show_bug.cgi?id=28975.

Add two test patches:
- elfutils-0.189-skip-DT_RELR-failing-tests.patch
- elfutils-0.189-tests-run-lfs-symbols.sh-needs-gawk.patch

Import musl patches to files/ so all of them are in the same place (there's
no longer a huge musl patch for error.h so this is fine):
- elfutils-0.189-musl-aarch64-regs.patch
- elfutils-0.189-musl-macros.patch

Signed-off-by: Sam James <sam@gentoo.org>
2023-07-20 00:55:06 +01:00

58 lines
1.8 KiB
Diff

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. */