summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2021-11-16 18:38:47 -0800
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2021-11-16 18:39:07 -0800
commit03757f59d10a55b3b97676aeb02ab9e1f1365aec (patch)
tree8052df4d221567328f8b1aab293c6b4dc0d466ef /sys-apps
parentsys-apps/grep: add ppc32 musl patch (diff)
downloadgentoo-03757f59d10a55b3b97676aeb02ab9e1f1365aec.tar.gz
gentoo-03757f59d10a55b3b97676aeb02ab9e1f1365aec.tar.bz2
gentoo-03757f59d10a55b3b97676aeb02ab9e1f1365aec.zip
sys-apps/diffutils: add ppc32 musl patch
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/diffutils/diffutils-3.8.ebuild2
-rw-r--r--sys-apps/diffutils/files/ppc-musl.patch14
2 files changed, 16 insertions, 0 deletions
diff --git a/sys-apps/diffutils/diffutils-3.8.ebuild b/sys-apps/diffutils/diffutils-3.8.ebuild
index fc7ab80b4a3b..4cae3d13edc4 100644
--- a/sys-apps/diffutils/diffutils-3.8.ebuild
+++ b/sys-apps/diffutils/diffutils-3.8.ebuild
@@ -17,6 +17,8 @@ IUSE="nls static"
BDEPEND="nls? ( sys-devel/gettext )"
+PATCHES=( "${FILESDIR}/ppc-musl.patch" )
+
src_configure() {
use static && append-ldflags -static
diff --git a/sys-apps/diffutils/files/ppc-musl.patch b/sys-apps/diffutils/files/ppc-musl.patch
new file mode 100644
index 000000000000..6ba37f233591
--- /dev/null
+++ b/sys-apps/diffutils/files/ppc-musl.patch
@@ -0,0 +1,14 @@
+--- a/lib/sigsegv.c
++++ b/lib/sigsegv.c
+@@ -221,8 +221,10 @@ int libsigsegv_version = LIBSIGSEGV_VERSION;
+ /* both should be equivalent */
+ # if 0
+ # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1]
+-# else
++# elif defined(__GLIBC__)
+ # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1]
++# else
++# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gregs[1]
+ # endif
+ # endif
+