Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] LuaJIT: don't apply ppc64 patchset for ppc (breaks JIT)
@ 2019-10-11 10:16 voidlinux-github
  2019-10-11 10:29 ` voidlinux-github
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: voidlinux-github @ 2019-10-11 10:16 UTC (permalink / raw)
  To: ml

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

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

https://github.com/void-ppc/void-packages luajit-32
https://github.com/void-linux/void-packages/pull/15328

LuaJIT: don't apply ppc64 patchset for ppc (breaks JIT)
There is something in the ppc64 patch that breaks 32-bit ppc in some scenarios (it appears to work but segfaults e.g. when building neovim). So until that is investigated and fixed, conditionalize this.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-luajit-32-15328.patch --]
[-- Type: text/x-diff, Size: 3896 bytes --]

From 2bb3dd53600391f6329c3bbbdbb6980b0438a085 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Fri, 11 Oct 2019 12:07:41 +0200
Subject: [PATCH] LuaJIT: don't apply ppc64 patchset for ppc (breaks JIT)

There is something in the ppc64 patch that breaks 32-bit ppc in
some scenarios (it appears to work but segfaults e.g. when
building neovim). So until that is investigated and fixed,
conditionalize this.
---
 .../patches/ppc}/musl-ppc-secureplt.patch       | 16 ++++++----------
 .../patches/ppc64}/add-ppc64-support.patch      |  0
 .../patches/ppc64}/fix-vm-jit-ppc64.patch       |  0
 srcpkgs/LuaJIT/template                         | 17 +++++++++++++++++
 4 files changed, 23 insertions(+), 10 deletions(-)
 rename srcpkgs/LuaJIT/{patches => files/patches/ppc}/musl-ppc-secureplt.patch (89%)
 rename srcpkgs/LuaJIT/{patches => files/patches/ppc64}/add-ppc64-support.patch (100%)
 rename srcpkgs/LuaJIT/{patches => files/patches/ppc64}/fix-vm-jit-ppc64.patch (100%)

diff --git a/srcpkgs/LuaJIT/patches/musl-ppc-secureplt.patch b/srcpkgs/LuaJIT/files/patches/ppc/musl-ppc-secureplt.patch
similarity index 89%
rename from srcpkgs/LuaJIT/patches/musl-ppc-secureplt.patch
rename to srcpkgs/LuaJIT/files/patches/ppc/musl-ppc-secureplt.patch
index 2b0578f9c58..b7304474f77 100644
--- a/srcpkgs/LuaJIT/patches/musl-ppc-secureplt.patch
+++ b/srcpkgs/LuaJIT/files/patches/ppc/musl-ppc-secureplt.patch
@@ -33,8 +33,6 @@ This fixes crashes on ppc-musl, as musl only supports secureplt.
  }
  
  #if LJ_HASJIT
-diff --git a/src/lj_dispatch.h b/src/lj_dispatch.h
-index 5bda51a..23f937f 100644
 --- src/lj_dispatch.h
 +++ src/lj_dispatch.h
 @@ -66,6 +66,21 @@ GOTDEF(GOTENUM)
@@ -68,14 +66,12 @@ index 5bda51a..23f937f 100644
    ASMFunction got[LJ_GOT__MAX];		/* Global offset table. */
  #endif
  #if LJ_HASJIT
-diff --git a/src/vm_ppc.dasc b/src/vm_ppc.dasc
-index 14a35d2..c239006 100644
 --- src/vm_ppc.dasc
 +++ src/vm_ppc.dasc
-@@ -51,7 +51,12 @@
- |.macro blex, target; bl extern target; nop; .endmacro
- |.macro .toc, a, b; a, b; .endmacro
- |.else
+@@ -59,7 +59,12 @@
+ |.define ENV_OFS,	8
+ |.endif
+ |.else  // No TOC.
 -|.macro blex, target; bl extern target@plt; .endmacro
 +|.macro blex, target
 +|  lwz TMP0, DISPATCH_GOT(target)(DISPATCH)
@@ -85,8 +81,8 @@ index 14a35d2..c239006 100644
 +|.endmacro
  |.macro .toc, a, b; .endmacro
  |.endif
- |.if OPD
-@@ -540,6 +545,8 @@
+ |.macro .tocenv, a, b; .if TOCENV; a, b; .endif; .endmacro
+@@ -448,6 +453,8 @@
  |// Assumes DISPATCH is relative to GL.
  #define DISPATCH_GL(field)	(GG_DISP2G + (int)offsetof(global_State, field))
  #define DISPATCH_J(field)	(GG_DISP2J + (int)offsetof(jit_State, field))
diff --git a/srcpkgs/LuaJIT/patches/add-ppc64-support.patch b/srcpkgs/LuaJIT/files/patches/ppc64/add-ppc64-support.patch
similarity index 100%
rename from srcpkgs/LuaJIT/patches/add-ppc64-support.patch
rename to srcpkgs/LuaJIT/files/patches/ppc64/add-ppc64-support.patch
diff --git a/srcpkgs/LuaJIT/patches/fix-vm-jit-ppc64.patch b/srcpkgs/LuaJIT/files/patches/ppc64/fix-vm-jit-ppc64.patch
similarity index 100%
rename from srcpkgs/LuaJIT/patches/fix-vm-jit-ppc64.patch
rename to srcpkgs/LuaJIT/files/patches/ppc64/fix-vm-jit-ppc64.patch
diff --git a/srcpkgs/LuaJIT/template b/srcpkgs/LuaJIT/template
index b204c21811f..313404defe1 100644
--- a/srcpkgs/LuaJIT/template
+++ b/srcpkgs/LuaJIT/template
@@ -47,6 +47,23 @@ if [ "$CROSS_BUILD" ]; then
 	esac
 fi
 
+# the ppc64 patchset subtly breaks ppc, needs investigation; for
+# now apply patches conditionally, separately for ppc64 and ppc
+post_patch() {
+	local patchdir
+
+	case "$XBPS_TARGET_MACHINE" in
+		ppc64*) patchdir="ppc64";;
+		ppc*) patchdir="ppc";;
+		*) return;;
+	esac
+
+	for i in ${FILESDIR}/patches/${patchdir}/*.patch; do
+		msg_normal "patching: $i\n"
+		patch -sNp0 -i ${i}
+	done
+}
+
 do_build() {
 	local _cflags=$CFLAGS
 	local _ldflags=$LDFLAGS

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: LuaJIT: don't apply ppc64 patchset for ppc (breaks JIT)
  2019-10-11 10:16 [PR PATCH] LuaJIT: don't apply ppc64 patchset for ppc (breaks JIT) voidlinux-github
@ 2019-10-11 10:29 ` voidlinux-github
  2019-10-11 10:29 ` voidlinux-github
  2019-10-12  8:51 ` [PR PATCH] [Merged]: " voidlinux-github
  2 siblings, 0 replies; 4+ messages in thread
From: voidlinux-github @ 2019-10-11 10:29 UTC (permalink / raw)
  To: ml

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

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/15328#issuecomment-541009777

Comment:
`armv7l` build broken because of mismatched `gcc-multilib`, unrelated to this PR though...

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: LuaJIT: don't apply ppc64 patchset for ppc (breaks JIT)
  2019-10-11 10:16 [PR PATCH] LuaJIT: don't apply ppc64 patchset for ppc (breaks JIT) voidlinux-github
  2019-10-11 10:29 ` voidlinux-github
@ 2019-10-11 10:29 ` voidlinux-github
  2019-10-12  8:51 ` [PR PATCH] [Merged]: " voidlinux-github
  2 siblings, 0 replies; 4+ messages in thread
From: voidlinux-github @ 2019-10-11 10:29 UTC (permalink / raw)
  To: ml

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

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/15328#issuecomment-541009777

Comment:
`armv7l` build broken because of mismatched `gcc-multilib`, unrelated to this PR though... (can be applied safely because no revbump)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PR PATCH] [Merged]: LuaJIT: don't apply ppc64 patchset for ppc (breaks JIT)
  2019-10-11 10:16 [PR PATCH] LuaJIT: don't apply ppc64 patchset for ppc (breaks JIT) voidlinux-github
  2019-10-11 10:29 ` voidlinux-github
  2019-10-11 10:29 ` voidlinux-github
@ 2019-10-12  8:51 ` voidlinux-github
  2 siblings, 0 replies; 4+ messages in thread
From: voidlinux-github @ 2019-10-12  8:51 UTC (permalink / raw)
  To: ml

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

There's a merged pull request on the void-packages repository

LuaJIT: don't apply ppc64 patchset for ppc (breaks JIT)
https://github.com/void-linux/void-packages/pull/15328

Description:
There is something in the ppc64 patch that breaks 32-bit ppc in some scenarios (it appears to work but segfaults e.g. when building neovim). So until that is investigated and fixed, conditionalize this.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-12  8:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-11 10:16 [PR PATCH] LuaJIT: don't apply ppc64 patchset for ppc (breaks JIT) voidlinux-github
2019-10-11 10:29 ` voidlinux-github
2019-10-11 10:29 ` voidlinux-github
2019-10-12  8:51 ` [PR PATCH] [Merged]: " voidlinux-github

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).