From 28f1a1ef0088a07446ded5fda716a77370029c9e Mon Sep 17 00:00:00 2001 From: Javier Marcet Date: Wed, 8 Jul 2026 23:11:14 +0200 Subject: [PATCH] luajit2: update to v2.1-20260701 For changes, see tagged commits: https://github.com/openresty/luajit2/releases/tag/v2.1-20260311 https://github.com/openresty/luajit2/releases/tag/v2.1-20260415 https://github.com/openresty/luajit2/releases/tag/v2.1-20260606 https://github.com/openresty/luajit2/releases/tag/v2.1-20260620 https://github.com/openresty/luajit2/releases/tag/v2.1-20260701 Signed-off-by: Javier Marcet --- lang/lua/luajit2/Makefile | 6 ++--- .../luajit2/patches/020-riscv64-support.patch | 26 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lang/lua/luajit2/Makefile b/lang/lua/luajit2/Makefile index 313051df3e6d20..89edd1a74b4c4c 100644 --- a/lang/lua/luajit2/Makefile +++ b/lang/lua/luajit2/Makefile @@ -1,14 +1,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luajit2 -PKG_SOURCE_DATE:=2026-02-27 +PKG_SOURCE_DATE:=2026-07-01 PKG_VERSION:=2.1.$(subst -,.,$(PKG_SOURCE_DATE)) PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/openresty/luajit2 -PKG_MIRROR_HASH:=057f6c02cdfac3f7cacc21fcac45ff74084cabb4a4db2cc589ed332bb1aeddbb -PKG_SOURCE_VERSION:=928290a470d35eb01324d5275b22fb86b13602a2 +PKG_MIRROR_HASH:=e263bc6b4c766fb4de03a3dfc8c2e73e43dee9902f374c0e8f0f3122429626db +PKG_SOURCE_VERSION:=2802aafe24b7c3b2892e616c2bee97a61e9c026e PKG_MAINTAINER:=Javier Marcet PKG_LICENSE:=MIT diff --git a/lang/lua/luajit2/patches/020-riscv64-support.patch b/lang/lua/luajit2/patches/020-riscv64-support.patch index ee4d560e9621e4..114507ecc36eff 100644 --- a/lang/lua/luajit2/patches/020-riscv64-support.patch +++ b/lang/lua/luajit2/patches/020-riscv64-support.patch @@ -2586,7 +2586,7 @@ Co-authored-by: Heinrich Schuchardt \ No newline at end of file --- a/src/lib_jit.c +++ b/src/lib_jit.c -@@ -706,6 +706,104 @@ JIT_PARAMDEF(JIT_PARAMINIT) +@@ -713,6 +713,104 @@ JIT_PARAMDEF(JIT_PARAMINIT) #include #endif @@ -2691,7 +2691,7 @@ Co-authored-by: Heinrich Schuchardt /* Arch-dependent CPU feature detection. */ static uint32_t jit_cpudetect(void) { -@@ -778,6 +876,29 @@ static uint32_t jit_cpudetect(void) +@@ -785,6 +883,29 @@ static uint32_t jit_cpudetect(void) #endif #elif LJ_TARGET_S390X /* No optional CPU features to detect (for now). */ @@ -4846,7 +4846,7 @@ Co-authored-by: Heinrich Schuchardt +} --- a/src/lj_ccall.c +++ b/src/lj_ccall.c -@@ -687,6 +687,146 @@ +@@ -689,6 +689,146 @@ if (ngpr < maxgpr) { dp = &cc->gpr[ngpr++]; goto done; } \ } @@ -4993,8 +4993,8 @@ Co-authored-by: Heinrich Schuchardt #else #error "Missing calling convention definitions for this architecture" #endif -@@ -1055,6 +1195,164 @@ static void ccall_copy_struct(CCallState - +@@ -1090,6 +1230,164 @@ static void ccall_copy_struct(CCallState + #define ccall_struct_align(cts, ct) ((ct)->info & CTF_ALIGN) #endif +/* -- RISC-V ABI struct classification ---------------------------- */ @@ -5158,7 +5158,7 @@ Co-authored-by: Heinrich Schuchardt /* -- Common C call handling ---------------------------------------------- */ /* Infer the destination CTypeID for a vararg argument. -@@ -1106,6 +1404,7 @@ static int ccall_set_args(lua_State *L, +@@ -1141,6 +1439,7 @@ static int ccall_set_args(lua_State *L, #endif #endif @@ -5166,7 +5166,7 @@ Co-authored-by: Heinrich Schuchardt /* Clear unused regs to get some determinism in case of misdeclaration. */ memset(cc->gpr, 0, sizeof(cc->gpr)); #if CCALL_NUM_FPR -@@ -1168,6 +1467,11 @@ static int ccall_set_args(lua_State *L, +@@ -1203,6 +1502,11 @@ static int ccall_set_args(lua_State *L, CType *d; CTSize sz; MSize n, isfp = 0, isva = 0; @@ -5178,7 +5178,7 @@ Co-authored-by: Heinrich Schuchardt void *dp, *rp = NULL; #if LJ_TARGET_PPC && LJ_ARCH_BITS == 64 int isf32 = 0; -@@ -1216,6 +1520,10 @@ static int ccall_set_args(lua_State *L, +@@ -1251,6 +1555,10 @@ static int ccall_set_args(lua_State *L, #if LJ_TARGET_S390X onstack = 1; #endif @@ -5187,9 +5187,9 @@ Co-authored-by: Heinrich Schuchardt + onsp = nsp; +#endif if (CCALL_ALIGN_STACKARG) { /* Align argument on stack. */ - MSize align = (1u << ctype_align(d->info)) - 1; - if (rp || (CCALL_PACK_STACKARG && isva && align < CTSIZE_PTR-1)) -@@ -1228,6 +1536,9 @@ static int ccall_set_args(lua_State *L, + MSize align = (1u << ctype_align(ccall_struct_align(cts, d))) - 1; + #if LJ_TARGET_ARM64 && LJ_TARGET_OSX +@@ -1266,6 +1574,9 @@ static int ccall_set_args(lua_State *L, #else dp = ((uint8_t *)cc->stack) + nsp; #endif @@ -5199,7 +5199,7 @@ Co-authored-by: Heinrich Schuchardt nsp += CCALL_PACK_STACKARG ? sz : n * CTSIZE_PTR; if ((int32_t)nsp > CCALL_SIZE_STACK) { /* Too many arguments. */ err_nyi: -@@ -1295,7 +1606,11 @@ static int ccall_set_args(lua_State *L, +@@ -1333,7 +1644,11 @@ static int ccall_set_args(lua_State *L, *(int64_t *)dp = (int64_t)*(int32_t *)dp; } #endif @@ -5212,7 +5212,7 @@ Co-authored-by: Heinrich Schuchardt if ((ctype_isinteger_or_bool(d->info) || ctype_isenum(d->info) #if LJ_TARGET_MIPS64 || (isfp && nsp == 0) -@@ -1335,6 +1650,107 @@ static int ccall_set_args(lua_State *L, +@@ -1373,6 +1688,107 @@ static int ccall_set_args(lua_State *L, CTSize i = (sz >> 2) - 1; do { ((uint64_t *)dp)[i] = ((uint32_t *)dp)[i]; } while (i--); }