LuaJIT: switch ppc patches to -p1 (fixes texlive build)

This commit is contained in:
q66 2021-07-29 18:33:03 +02:00
parent df8d6cba48
commit 02afff3663
4 changed files with 33 additions and 33 deletions

View file

@ -2,8 +2,8 @@ Imported from https://github.com/LuaJIT/LuaJIT/pull/486.
This fixes crashes on ppc-musl, as musl only supports secureplt. This fixes crashes on ppc-musl, as musl only supports secureplt.
--- src/lj_dispatch.c --- a/src/lj_dispatch.c
+++ src/lj_dispatch.c +++ b/src/lj_dispatch.c
@@ -56,6 +56,18 @@ static const ASMFunction dispatch_got[] = { @@ -56,6 +56,18 @@ static const ASMFunction dispatch_got[] = {
#undef GOTFUNC #undef GOTFUNC
#endif #endif
@ -33,8 +33,8 @@ This fixes crashes on ppc-musl, as musl only supports secureplt.
} }
#if LJ_HASJIT #if LJ_HASJIT
--- src/lj_dispatch.h --- a/src/lj_dispatch.h
+++ src/lj_dispatch.h +++ b/src/lj_dispatch.h
@@ -66,6 +66,21 @@ GOTDEF(GOTENUM) @@ -66,6 +66,21 @@ GOTDEF(GOTENUM)
}; };
#endif #endif
@ -66,8 +66,8 @@ This fixes crashes on ppc-musl, as musl only supports secureplt.
ASMFunction got[LJ_GOT__MAX]; /* Global offset table. */ ASMFunction got[LJ_GOT__MAX]; /* Global offset table. */
#endif #endif
#if LJ_HASJIT #if LJ_HASJIT
--- src/vm_ppc.dasc --- a/src/vm_ppc.dasc
+++ src/vm_ppc.dasc +++ b/src/vm_ppc.dasc
@@ -59,7 +59,12 @@ @@ -59,7 +59,12 @@
|.define ENV_OFS, 8 |.define ENV_OFS, 8
|.endif |.endif

View file

@ -26,8 +26,8 @@ Author: Rodrigo R. Galvao <rosattig@br.ibm.com>
diff --git dynasm/dasm_ppc.lua dynasm/dasm_ppc.lua diff --git dynasm/dasm_ppc.lua dynasm/dasm_ppc.lua
index f73974d..a4ad70b 100644 index f73974d..a4ad70b 100644
--- dynasm/dasm_ppc.lua --- a/dynasm/dasm_ppc.lua
+++ dynasm/dasm_ppc.lua +++ b/dynasm/dasm_ppc.lua
@@ -257,9 +257,11 @@ map_op = { @@ -257,9 +257,11 @@ map_op = {
addic_3 = "30000000RRI", addic_3 = "30000000RRI",
["addic._3"] = "34000000RRI", ["addic._3"] = "34000000RRI",
@ -52,8 +52,8 @@ index f73974d..a4ad70b 100644
end), end),
diff --git src/Makefile src/Makefile diff --git src/Makefile src/Makefile
index 6b73a89..cc50bae 100644 index 6b73a89..cc50bae 100644
--- src/Makefile --- a/src/Makefile
+++ src/Makefile +++ b/src/Makefile
@@ -453,7 +453,16 @@ ifeq (ppc,$(TARGET_LJARCH)) @@ -453,7 +453,16 @@ ifeq (ppc,$(TARGET_LJARCH))
DASM_AFLAGS+= -D GPR64 DASM_AFLAGS+= -D GPR64
endif endif
@ -74,8 +74,8 @@ index 6b73a89..cc50bae 100644
DASM_ARCH= ppc64 DASM_ARCH= ppc64
diff --git src/host/buildvm_asm.c src/host/buildvm_asm.c diff --git src/host/buildvm_asm.c src/host/buildvm_asm.c
index ffd1490..6bb995e 100644 index ffd1490..6bb995e 100644
--- src/host/buildvm_asm.c --- a/src/host/buildvm_asm.c
+++ src/host/buildvm_asm.c +++ b/src/host/buildvm_asm.c
@@ -140,18 +140,14 @@ static void emit_asm_wordreloc(BuildCtx *ctx, uint8_t *p, int n, @@ -140,18 +140,14 @@ static void emit_asm_wordreloc(BuildCtx *ctx, uint8_t *p, int n,
#else #else
#define TOCPREFIX "" #define TOCPREFIX ""
@ -111,8 +111,8 @@ index ffd1490..6bb995e 100644
fprintf(ctx->fp, "\t.text\n"); fprintf(ctx->fp, "\t.text\n");
diff --git src/lj_arch.h src/lj_arch.h diff --git src/lj_arch.h src/lj_arch.h
index d609b37..53bc651 100644 index d609b37..53bc651 100644
--- src/lj_arch.h --- a/src/lj_arch.h
+++ src/lj_arch.h +++ b/src/lj_arch.h
@@ -269,10 +269,18 @@ @@ -269,10 +269,18 @@
#if LJ_TARGET_CONSOLE #if LJ_TARGET_CONSOLE
#define LJ_ARCH_PPC32ON64 1 #define LJ_ARCH_PPC32ON64 1
@ -149,8 +149,8 @@ index d609b37..53bc651 100644
#endif #endif
diff --git src/lj_ccall.c src/lj_ccall.c diff --git src/lj_ccall.c src/lj_ccall.c
index 5c252e5..b891591 100644 index 5c252e5..b891591 100644
--- src/lj_ccall.c --- a/src/lj_ccall.c
+++ src/lj_ccall.c +++ b/src/lj_ccall.c
@@ -369,21 +369,97 @@ @@ -369,21 +369,97 @@
#elif LJ_TARGET_PPC #elif LJ_TARGET_PPC
/* -- PPC calling conventions --------------------------------------------- */ /* -- PPC calling conventions --------------------------------------------- */
@ -376,8 +376,8 @@ index 5c252e5..b891591 100644
#if LJ_TARGET_MIPS64 #if LJ_TARGET_MIPS64
diff --git src/lj_ccall.h src/lj_ccall.h diff --git src/lj_ccall.h src/lj_ccall.h
index 59f6648..bbf309f 100644 index 59f6648..bbf309f 100644
--- src/lj_ccall.h --- a/src/lj_ccall.h
+++ src/lj_ccall.h +++ b/src/lj_ccall.h
@@ -86,10 +86,23 @@ typedef union FPRArg { @@ -86,10 +86,23 @@ typedef union FPRArg {
#elif LJ_TARGET_PPC #elif LJ_TARGET_PPC
@ -404,8 +404,8 @@ index 59f6648..bbf309f 100644
typedef intptr_t GPRArg; typedef intptr_t GPRArg;
diff --git src/lj_ccallback.c src/lj_ccallback.c diff --git src/lj_ccallback.c src/lj_ccallback.c
index 846827b..eb7f445 100644 index 846827b..eb7f445 100644
--- src/lj_ccallback.c --- a/src/lj_ccallback.c
+++ src/lj_ccallback.c +++ b/src/lj_ccallback.c
@@ -61,8 +61,24 @@ static MSize CALLBACK_OFS2SLOT(MSize ofs) @@ -61,8 +61,24 @@ static MSize CALLBACK_OFS2SLOT(MSize ofs)
#elif LJ_TARGET_PPC #elif LJ_TARGET_PPC
@ -513,8 +513,8 @@ index 846827b..eb7f445 100644
if (ctr->size <= 4 && if (ctr->size <= 4 &&
diff --git src/lj_ctype.h src/lj_ctype.h diff --git src/lj_ctype.h src/lj_ctype.h
index 0c220a8..105865b 100644 index 0c220a8..105865b 100644
--- src/lj_ctype.h --- a/src/lj_ctype.h
+++ src/lj_ctype.h +++ b/src/lj_ctype.h
@@ -153,7 +153,7 @@ typedef struct CType { @@ -153,7 +153,7 @@ typedef struct CType {
/* Simplify target-specific configuration. Checked in lj_ccall.h. */ /* Simplify target-specific configuration. Checked in lj_ccall.h. */
@ -526,8 +526,8 @@ index 0c220a8..105865b 100644
diff --git src/lj_def.h src/lj_def.h diff --git src/lj_def.h src/lj_def.h
index 2d8fff6..381d6f5 100644 index 2d8fff6..381d6f5 100644
--- src/lj_def.h --- a/src/lj_def.h
+++ src/lj_def.h +++ b/src/lj_def.h
@@ -71,7 +71,11 @@ typedef unsigned int uintptr_t; @@ -71,7 +71,11 @@ typedef unsigned int uintptr_t;
#define LJ_MAX_IDXCHAIN 100 /* __index/__newindex chain limit. */ #define LJ_MAX_IDXCHAIN 100 /* __index/__newindex chain limit. */
#define LJ_STACK_EXTRA (5+2*LJ_FR2) /* Extra stack space (metamethods). */ #define LJ_STACK_EXTRA (5+2*LJ_FR2) /* Extra stack space (metamethods). */
@ -542,8 +542,8 @@ index 2d8fff6..381d6f5 100644
#define LJ_MIN_GLOBAL 6 /* Min. global table size (hbits). */ #define LJ_MIN_GLOBAL 6 /* Min. global table size (hbits). */
diff --git src/lj_frame.h src/lj_frame.h diff --git src/lj_frame.h src/lj_frame.h
index 19c49a4..c666418 100644 index 19c49a4..c666418 100644
--- src/lj_frame.h --- a/src/lj_frame.h
+++ src/lj_frame.h +++ b/src/lj_frame.h
@@ -210,6 +210,15 @@ enum { LJ_CONT_TAILCALL, LJ_CONT_FFI_CALLBACK }; /* Special continuations. */ @@ -210,6 +210,15 @@ enum { LJ_CONT_TAILCALL, LJ_CONT_FFI_CALLBACK }; /* Special continuations. */
#define CFRAME_OFS_MULTRES 408 #define CFRAME_OFS_MULTRES 408
#define CFRAME_SIZE 384 #define CFRAME_SIZE 384
@ -562,8 +562,8 @@ index 19c49a4..c666418 100644
#define CFRAME_OFS_NRES 468 #define CFRAME_OFS_NRES 468
diff --git src/lj_target_ppc.h src/lj_target_ppc.h diff --git src/lj_target_ppc.h src/lj_target_ppc.h
index c5c991a..f0c8c94 100644 index c5c991a..f0c8c94 100644
--- src/lj_target_ppc.h --- a/src/lj_target_ppc.h
+++ src/lj_target_ppc.h +++ b/src/lj_target_ppc.h
@@ -30,8 +30,13 @@ enum { @@ -30,8 +30,13 @@ enum {
/* Calling conventions. */ /* Calling conventions. */
@ -603,8 +603,8 @@ index c5c991a..f0c8c94 100644
PPCI_BC = 0x40800000, PPCI_BC = 0x40800000,
diff --git src/vm_ppc.dasc src/vm_ppc.dasc diff --git src/vm_ppc.dasc src/vm_ppc.dasc
index b4260eb..abb381e 100644 index b4260eb..abb381e 100644
--- src/vm_ppc.dasc --- a/src/vm_ppc.dasc
+++ src/vm_ppc.dasc +++ b/src/vm_ppc.dasc
@@ -22,35 +22,40 @@ @@ -22,35 +22,40 @@
|// GPR64 64 bit registers (but possibly 32 bit pointers, e.g. PS3). |// GPR64 64 bit registers (but possibly 32 bit pointers, e.g. PS3).
|// Affects reg saves, stack layout, carry/overflow/dot flags etc. |// Affects reg saves, stack layout, carry/overflow/dot flags etc.

View file

@ -1,5 +1,5 @@
--- src/vm_ppc.dasc 2019-06-03 19:41:50.214671731 +0200 --- a/src/vm_ppc.dasc 2019-06-03 19:41:50.214671731 +0200
+++ src/vm_ppc.dasc 2019-06-03 19:44:40.229686143 +0200 +++ b/src/vm_ppc.dasc 2019-06-03 19:44:40.229686143 +0200
@@ -2774,7 +2774,7 @@ @@ -2774,7 +2774,7 @@
| |
|->vm_exit_handler: |->vm_exit_handler:

View file

@ -38,7 +38,7 @@ post_patch() {
for i in ${FILESDIR}/patches/${patchdir}/*.patch; do for i in ${FILESDIR}/patches/${patchdir}/*.patch; do
msg_normal "patching: $i\n" msg_normal "patching: $i\n"
patch -sNp0 -i ${i} patch -sNp1 -i ${i}
done done
} }