mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-16 06:07:00 +02:00
ppsspp: fix riscv64-musl
This commit is contained in:
parent
edfc31ec37
commit
58e777cf20
1 changed files with 23 additions and 0 deletions
23
srcpkgs/ppsspp/patches/riscv-musl.patch
Normal file
23
srcpkgs/ppsspp/patches/riscv-musl.patch
Normal file
|
@ -0,0 +1,23 @@
|
|||
--- a/Common/RiscVEmitter.cpp 2024-02-04 14:08:02.000000000 +0100
|
||||
+++ - 2024-02-16 16:49:35.344381020 +0100
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <cstring>
|
||||
#if PPSSPP_ARCH(RISCV64) && PPSSPP_PLATFORM(LINUX)
|
||||
#include <sys/cachectl.h>
|
||||
+#include <sys/syscall.h>
|
||||
#endif
|
||||
#include "Common/BitScan.h"
|
||||
#include "Common/CPUDetect.h"
|
||||
@@ -1139,8 +1140,12 @@
|
||||
void RiscVEmitter::FlushIcacheSection(const u8 *start, const u8 *end) {
|
||||
#if PPSSPP_ARCH(RISCV64)
|
||||
#if PPSSPP_PLATFORM(LINUX)
|
||||
+#ifdef __GLIBC__
|
||||
__riscv_flush_icache((char *)start, (char *)end, 0);
|
||||
#else
|
||||
+ syscall(__NR_riscv_flush_icache, (char*)start, (char*)end, 0UL);
|
||||
+#endif
|
||||
+#else
|
||||
// TODO: This might only correspond to a local hart icache clear, which is no good.
|
||||
__builtin___clear_cache((char *)start, (char *)end);
|
||||
#endif
|
Loading…
Add table
Reference in a new issue