Github messages for voidlinux
 help / color / mirror / Atom feed
From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] higan: add a patch to prevent elfv2 ppc64(le) crashes
Date: Wed, 17 Jul 2019 04:31:35 +0200	[thread overview]
Message-ID: <20190717023135.YrnnRtDtymhzv9Xx7lE10BDu35qf0GxXfX-2qztNxFU@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-13158@inbox.vuxu.org>

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

There is an updated pull request by q66 against master on the void-packages repository

https://github.com/void-ppc/void-packages higan-elfv2
https://github.com/void-linux/void-packages/pull/13158

higan: add a patch to prevent elfv2 ppc64(le) crashes
I was able to load an SNES ROM without segfaulting after this.

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

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

From d6164528879d5cc68e8b13f35dc2ae11bdaae4d2 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Tue, 16 Jul 2019 20:18:55 +0200
Subject: [PATCH] higan: add a patch to prevent elfv2 ppc64(le) crashes

[ci skip]
---
 srcpkgs/higan/patches/ppc64-no-asm.patch | 26 ++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/higan/patches/ppc64-no-asm.patch

diff --git a/srcpkgs/higan/patches/ppc64-no-asm.patch b/srcpkgs/higan/patches/ppc64-no-asm.patch
new file mode 100644
index 00000000000..e2a58d5f3df
--- /dev/null
+++ b/srcpkgs/higan/patches/ppc64-no-asm.patch
@@ -0,0 +1,26 @@
+Higan's ppc code assumes big endian, so fall back to sjlj for that. ELFv2 big
+endian just needs a small patch to function.
+
+--- libco/libco.c
++++ libco/libco.c
+@@ -9,7 +9,7 @@
+     #include "amd64.c"
+   #elif defined(__arm__)
+     #include "arm.c"
+-  #elif defined(_ARCH_PPC)
++  #elif defined(_ARCH_PPC) && !defined(__LITTLE_ENDIAN__)
+     #include "ppc.c"
+   #elif defined(_WIN32)
+     #include "fiber.c"
+--- libco/ppc.c
++++ libco/ppc.c
+@@ -36,7 +36,8 @@ static thread_local cothread_t co_active_handle = 0;
+ 
+ /* whether function calls are indirect through a descriptor, or are directly to function */
+ #ifndef LIBCO_PPCDESC
+-  #if !_CALL_SYSV && (_CALL_AIX || _CALL_AIXDESC || LIBCO_PPC64)
++  #if !_CALL_SYSV && (_CALL_AIX || _CALL_AIXDESC || \
++      (LIBCO_PPC64 && (!defined(_CALL_ELF) || _CALL_ELF == 1)))
+     #define LIBCO_PPCDESC 1
+   #endif
+ #endif

  parent reply	other threads:[~2019-07-17  2:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-16 18:26 [PR PATCH] " voidlinux-github
2019-07-16 19:25 ` voidlinux-github
2019-07-16 19:38 ` voidlinux-github
2019-07-17  2:31 ` voidlinux-github [this message]
2019-07-17  2:31 ` [PR PATCH] [Updated] " voidlinux-github
2019-07-18  5:38 ` [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=20190717023135.YrnnRtDtymhzv9Xx7lE10BDu35qf0GxXfX-2qztNxFU@z \
    --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).