commit: e355b4dd3328425db3613f4136620e4a5ac95d6c
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 17 02:14:05 2021 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Nov 17 02:39:06 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e355b4dd
sys-devel/m4: add ppc32 musl patch
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
sys-devel/m4/files/ppc-musl.patch | 14 ++++++++++++++
sys-devel/m4/m4-1.4.19.ebuild | 2 ++
2 files changed, 16 insertions(+)
diff --git a/sys-devel/m4/files/ppc-musl.patch
b/sys-devel/m4/files/ppc-musl.patch
new file mode 100644
index 000000000000..6ba37f233591
--- /dev/null
+++ b/sys-devel/m4/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
+
diff --git a/sys-devel/m4/m4-1.4.19.ebuild b/sys-devel/m4/m4-1.4.19.ebuild
index 7713695a5daf..96bbad225664 100644
--- a/sys-devel/m4/m4-1.4.19.ebuild
+++ b/sys-devel/m4/m4-1.4.19.ebuild
@@ -30,6 +30,8 @@ DEPEND="${RDEPEND}"
BDEPEND="app-arch/xz-utils
nls? ( sys-devel/gettext )"
+PATCHES=( "${FILESDIR}/ppc-musl.patch" )
+
src_configure() {
local -a myeconfargs=(
--enable-changeword