diff options
author | Bart Ribbers <bribbers@disroot.org> | 2020-03-10 10:27:07 +0100 |
---|---|---|
committer | Rasmus Thomsen <oss@cogitri.dev> | 2020-03-28 09:49:16 +0000 |
commit | 0017d10490a8cbf1313eedd4b53244c56b132bf5 (patch) | |
tree | ba30b36f0b41b2e4edbc85e4194c59cd30c024d3 /community/qt5-qtwebkit/musl-mcontext.patch | |
parent | 8253e0a1bc5d29b219d9236a3b6ba1e026620631 (diff) |
community/qt5-qtwebkit: upgrade to 5.212.0-alpha4
Diffstat (limited to 'community/qt5-qtwebkit/musl-mcontext.patch')
-rw-r--r-- | community/qt5-qtwebkit/musl-mcontext.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/community/qt5-qtwebkit/musl-mcontext.patch b/community/qt5-qtwebkit/musl-mcontext.patch new file mode 100644 index 00000000000..20100ca6e74 --- /dev/null +++ b/community/qt5-qtwebkit/musl-mcontext.patch @@ -0,0 +1,67 @@ +diff --git a/Source/JavaScriptCore/heap/MachineStackMarker.cpp b/Source/JavaScriptCore/heap/MachineStackMarker.cpp +index 883914fd3d1..9c0209ad2f3 100644 +--- a/Source/JavaScriptCore/heap/MachineStackMarker.cpp ++++ b/Source/JavaScriptCore/heap/MachineStackMarker.cpp +@@ -683,7 +683,19 @@ void* MachineThreads::Thread::Registers::framePointer() const + #endif + + #else +-#error Need a way to get the frame pointer for another thread on this platform ++ ++// The following sequence depends on musl libc's sys/ucontext.h. ++#if CPU(X86) ++ return reinterpret_cast<void*>((uintptr_t) regs.machineContext.gregs[REG_EBP]); ++#elif CPU(X86_64) ++ return reinterpret_cast<void*>((uintptr_t) regs.machineContext.gregs[REG_RBP]); ++#elif CPU(ARM) ++ return reinterpret_cast<void*>((uintptr_t) regs.machineContext.arm_fp); ++#elif CPU(ARM64) ++ return reinterpret_cast<void*>((uintptr_t) regs.machineContext.regs[29]); ++#elif CPU(MIPS) ++ return reinterpret_cast<void*>((uintptr_t) regs.machineContext.gregs[30]); ++#endif + #endif + } + +@@ -765,7 +777,19 @@ void* MachineThreads::Thread::Registers::instructionPointer() const + #endif + + #else +-#error Need a way to get the instruction pointer for another thread on this platform ++ ++// The following sequence depends on musl libc's sys/ucontext.h. ++#if CPU(X86) ++ return reinterpret_cast<void*>((uintptr_t) regs.machineContext.gregs[REG_EIP]); ++#elif CPU(X86_64) ++ return reinterpret_cast<void*>((uintptr_t) regs.machineContext.gregs[REG_RIP]); ++#elif CPU(ARM) ++ return reinterpret_cast<void*>((uintptr_t) regs.machineContext.arm_pc); ++#elif CPU(ARM64) ++ return reinterpret_cast<void*>((uintptr_t) regs.machineContext.pc); ++#elif CPU(MIPS) ++ return reinterpret_cast<void *>((uintptr_t)regs.machineContext.pc); ++#endif + #endif + } + void* MachineThreads::Thread::Registers::llintPC() const +@@ -856,7 +880,19 @@ void* MachineThreads::Thread::Registers::llintPC() const + #endif + + #else +-#error Need a way to get the LLIntPC for another thread on this platform ++ ++// The following sequence depends on musl libc's sys/ucontext.h. ++#if CPU(X86) ++ return reinterpret_cast<void*>((uintptr_t) regs.machineContext.gregs[REG_ESI]); ++#elif CPU(X86_64) ++ return reinterpret_cast<void*>((uintptr_t) regs.machineContext.gregs[REG_R8]); ++#elif CPU(ARM) ++ return reinterpret_cast<void*>((uintptr_t) regs.machineContext.arm_r8); ++#elif CPU(ARM64) ++ return reinterpret_cast<void*>((uintptr_t) regs.machineContext.regs[4]); ++#elif CPU(MIPS) ++ return reinterpret_cast<void*>((uintptr_t) regs.machineContext.gregs[12]); ++#endif + #endif + } + #endif // ENABLE(SAMPLING_PROFILER) |