commit:     b33b10eb76f88a2d41f66ddc7184cb0e783e3d45
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov  9 02:50:27 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov  9 02:51:05 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b33b10eb

dev-libs/elfutils: add arm64 patch for musl

Alpine, OE are applying this too, although would prefer
to see some action upstream for this.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/musl/elfutils-0.185-aarch64-regs.patch   | 54 ++++++++++++++++++++++
 1 file changed, 54 insertions(+)

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
new file mode 100644
index 00000000000..99409540c1e
--- /dev/null
+++ b/dev-libs/elfutils/files/musl/elfutils-0.185-aarch64-regs.patch
@@ -0,0 +1,54 @@
+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://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 <[email protected]>
+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 <[email protected]>
+
+Rebase to 0.170
+Signed-off-by: Hongxu Jia <[email protected]>
+
+--- 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.  */

Reply via email to