Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: [PR PATCH] boost: add patch for context on ppc64
Date: Sat, 04 May 2019 04:42:20 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-11479@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 385 bytes --]

There is a new pull request by q66 against master on the void-packages repository

https://github.com/void-ppc64/void-packages boost
https://github.com/void-linux/void-packages/pull/11479

boost: add patch for context on ppc64
This fixes the ontop_fcontext function of boost::context on ppc64.

A patch file from https://github.com/void-linux/void-packages/pull/11479.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-boost-11479.patch --]
[-- Type: application/text/x-diff, Size: 1788 bytes --]

From c4f3cdbe411d26b7463f630c59b44a0a2290bb84 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sat, 4 May 2019 04:39:19 +0200
Subject: [PATCH] boost: add patch for context on ppc64

This fixes the ontop_fcontext function of boost::context on
ppc64.

[ci skip]
---
 srcpkgs/boost/patches/ppc64-context.patch | 30 +++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 srcpkgs/boost/patches/ppc64-context.patch

diff --git a/srcpkgs/boost/patches/ppc64-context.patch b/srcpkgs/boost/patches/ppc64-context.patch
new file mode 100644
index 00000000000..a8d71e764cc
--- /dev/null
+++ b/srcpkgs/boost/patches/ppc64-context.patch
@@ -0,0 +1,30 @@
+From 2354eca9b776a6739112833f64754108cc0d1dc5 Mon Sep 17 00:00:00 2001
+From: Shawn Anastasio <shawn@anastas.io>
+Date: Fri, 3 May 2019 20:18:11 -0500
+Subject: [PATCH] Fix ABI violation on ppc64 ELFv2, fixes #72
+
+The existing ontop_fcontext implementation for ppc64 ELFv2
+violates the ABI by not storing the callback entry address
+in %r12 before branching. This results in crashes on this
+platform.
+
+This commit addresses this and allows the context library
+to function as expected on ppc64 platforms using the ELFv2 ABI.
+---
+ src/asm/ontop_ppc64_sysv_elf_gas.S | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/asm/ontop_ppc64_sysv_elf_gas.S b/src/asm/ontop_ppc64_sysv_elf_gas.S
+index d54b16e7..cd97f456 100644
+--- libs/context/src/asm/ontop_ppc64_sysv_elf_gas.S
++++ libs/context/src/asm/ontop_ppc64_sysv_elf_gas.S
+@@ -174,6 +174,9 @@ ontop_fcontext:
+     # restore CTR
+     mtctr  %r5
+ 
++    # store cb entrypoint in %r12, used for TOC calculation
++    mr %r12, %r5
++
+     # copy transfer_t into ontop_fn arg registers
+     mr  %r3, %r7
+     # arg pointer already in %r4

             reply	other threads:[~2019-05-04  2:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-04  2:42 voidlinux-github [this message]
2019-05-04  6:00 ` [PR PATCH] [Merged]: " voidlinux-github

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-11479@inbox.vuxu.org \
    --to=voidlinux-github@inbox.vuxu.org \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).