Skip to content

Commit b3ef51e

Browse files
committed
fix ir_gdb.c build
1 parent c63a89b commit b3ef51e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

patches/static_opcache_84.patch

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,27 @@ index 24b4acaabc..452d57cc7d 100644
8181

8282
if (PHP_OPCACHE_JIT == "yes") {
8383
if (CHECK_HEADER_ADD_INCLUDE("ir/ir.h", "CFLAGS_OPCACHE", PHP_OPCACHE + ";ext\\opcache\\jit")) {
84+
diff --git a/ext/opcache/jit/ir/ir_gdb.c b/ext/opcache/jit/ir/ir_gdb.c
85+
index cf3a507d25..e679a8a55d 100644
86+
--- a/ext/opcache/jit/ir/ir_gdb.c
87+
+++ b/ext/opcache/jit/ir/ir_gdb.c
88+
@@ -500,14 +500,14 @@ typedef struct _ir_gdbjit_descriptor {
89+
struct _ir_gdbjit_code_entry *first_entry;
90+
} ir_gdbjit_descriptor;
91+
92+
-ir_gdbjit_descriptor __jit_debug_descriptor = {
93+
+static ir_gdbjit_descriptor __jit_debug_descriptor = {
94+
1, IR_GDBJIT_NOACTION, NULL, NULL
95+
};
96+
97+
#ifdef IR_EXTERNAL_GDB_ENTRY
98+
void __jit_debug_register_code(void);
99+
#else
100+
-IR_NEVER_INLINE void __jit_debug_register_code(void)
101+
+static IR_NEVER_INLINE void __jit_debug_register_code(void)
102+
{
103+
__asm__ __volatile__("");
104+
}
84105
diff --git a/main/main.c b/main/main.c
85106
index a3acaf94b7..a1324aab51 100644
86107
--- a/main/main.c

0 commit comments

Comments
 (0)