diff options
| author | Seth Flynn <[email protected]> | 2025-03-06 06:50:33 -0500 |
|---|---|---|
| committer | Seth Flynn <[email protected]> | 2025-03-23 19:31:27 -0400 |
| commit | c3ff5407ef46dac4a53610a321e39f20a5d4864e (patch) | |
| tree | ffce27b884e563dc79c40568d552590b971fbb1c /pkgs/lwjgl/patches/3.3.3/0003-build-rpmalloc-get_thread_id-support-on-riscv64.patch | |
| parent | 8529c2d55a31291ef2eb8627e926b729422e7fbe (diff) | |
add lwjgl v3.3.3
Diffstat (limited to 'pkgs/lwjgl/patches/3.3.3/0003-build-rpmalloc-get_thread_id-support-on-riscv64.patch')
| -rw-r--r-- | pkgs/lwjgl/patches/3.3.3/0003-build-rpmalloc-get_thread_id-support-on-riscv64.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/pkgs/lwjgl/patches/3.3.3/0003-build-rpmalloc-get_thread_id-support-on-riscv64.patch b/pkgs/lwjgl/patches/3.3.3/0003-build-rpmalloc-get_thread_id-support-on-riscv64.patch new file mode 100644 index 0000000..414e43a --- /dev/null +++ b/pkgs/lwjgl/patches/3.3.3/0003-build-rpmalloc-get_thread_id-support-on-riscv64.patch @@ -0,0 +1,28 @@ +From 6e3048e9f0e4fb13a72c219337f2908736efc8ff Mon Sep 17 00:00:00 2001 +From: Jackson Huff <[email protected]> +Date: Sat, 7 Oct 2023 08:37:11 +0000 +Subject: [PATCH 3/4] build(rpmalloc) get_thread_id support on riscv64 + +Backport of https://github.com/LWJGL/lwjgl3/pull/890 + +(cherry picked from commit 924b295fd7e7fde3cbe19ea30d6b115e6dd0ef15) +--- + modules/lwjgl/rpmalloc/src/main/c/rpmalloc.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/modules/lwjgl/rpmalloc/src/main/c/rpmalloc.c b/modules/lwjgl/rpmalloc/src/main/c/rpmalloc.c +index 755127d9f..317242721 100644 +--- a/modules/lwjgl/rpmalloc/src/main/c/rpmalloc.c ++++ b/modules/lwjgl/rpmalloc/src/main/c/rpmalloc.c +@@ -808,6 +808,8 @@ get_thread_id(void) { + # else + __asm__ volatile ("mrs %0, tpidr_el0" : "=r" (tid)); + # endif ++# elif defined(__riscv) ++ __asm__ volatile ("mv %0, tp" : "=r" (tid)); + # else + # error This platform needs implementation of get_thread_id() + # endif +-- +2.48.1 + |
