aports/main/luajit/fix-compilation-error-on-ppc.patch
Jakub Jirutka c12fb28e6d main/luajit: switch to OpenResty's maintained branch
The MoonJIT fork is unmaintained since September 2020 [1]:

> This code base does not have an active maintainer anymore, please
> read this [Twitter thread][2] to know more. If you are an existing
> contributor (or otherwise have an interest in maintaining this
> project actively) then please email me using the email address in
> my Twitter profile.

Moreover, the transition from original LuaJIT to MoonJIT caused multiple
compatibility and stability issues, mainly with Lua NGINX module
(#12410, #10478), but also with some Lua packages written in C (segfaults).

I wanted to switch back to the original (Mike's) LuaJIT, the latest revision
from the v2.1 branch. The problem is that it doesn't support ppc64le and
s390x. The existing patches don't apply anymore and I really don't have
enough knowledge and insanity in blood to update them. Dropping these
architectures would require updating many dependent aports which is not
a good idea at this moment (v3.14 will be released very soon).

OpenResty's "fork" seems to be the only active LuaJIT fork that regularly
synchronize changes from the upstream LuaJIT project and provides support
for all architectures we need.

> This is the official OpenResty branch of LuaJIT. It is not to be
> considered a fork, since we still regularly synchronize changes from the
> upstream LuaJIT project

Patches CVE-2020-15890 and 20-src-lib_string are already included in the
OpenResty's branch.

[1]: a2a39ea718:
[2]: https://twitter.com/siddhesh_p/status/1308594269502885889

Resolves #12410 #10478
2021-06-13 03:13:33 +02:00

27 lines
743 B
Diff

From 4d080589ada785636bf440e3e8afe9947671f406 Mon Sep 17 00:00:00 2001
From: Maniraj Deivendran <maniraj.deivendran@ibm.com>
Date: Tue, 1 Jun 2021 09:14:02 +0000
Subject: [PATCH] Change: Resolve compilation error in ppc
---
src/lj_ccallback.c | 4 ++++
1 file changed, 4 insertions(+)
Patch-Source: https://github.com/openresty/luajit2/pull/124
diff --git a/src/lj_ccallback.c b/src/lj_ccallback.c
index 3dbf1e9c..568ab336 100644
--- a/src/lj_ccallback.c
+++ b/src/lj_ccallback.c
@@ -21,6 +21,10 @@
#include "lj_trace.h"
#include "lj_vm.h"
+#if LJ_ARCH_PPC_ELFV2
+#include "lualib.h"
+#endif
+
/* -- Target-specific handling of callback slots -------------------------- */
#define CALLBACK_MCODE_SIZE (LJ_PAGESIZE * LJ_NUM_CBPAGE)