libretro.parallel-n64: fix build with gcc15 (#476511)
This commit is contained in:
@@ -18,6 +18,14 @@ mkLibretroCore {
|
||||
hash = "sha256-Th8VqENewfTeRTH+lONN7ZTMLQ0G6901q6ZBNMgepL4=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix build with gcc15
|
||||
# Upstream considers this core legacy (for "potato PC") and won't fix.
|
||||
# See: https://github.com/libretro/parallel-n64/issues/797
|
||||
# /nix/store/...-glibc-2.40-66-dev/include/bits/mathcalls-narrow.h:36:20: error: conflicting types for 'fsqrt'; have 'float(double)'
|
||||
./patches/parallel-n64-gcc15.patch
|
||||
];
|
||||
|
||||
extraBuildInputs = [
|
||||
libGLU
|
||||
libGL
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
From 3a891c0450c4968afbe76c594c22347354bd8834 Mon Sep 17 00:00:00 2001
|
||||
From: Moraxyc <i@qaq.li>
|
||||
Date: Sat, 3 Jan 2026 13:41:55 +0800
|
||||
Subject: [PATCH] Rename fsqrt to _fsqrt to avoid conflict
|
||||
|
||||
---
|
||||
mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h | 2 +-
|
||||
.../src/r4300/hacktarux_dynarec/hacktarux_dynarec.c | 8 ++++----
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h b/mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h
|
||||
index 8161292..e256dd9 100644
|
||||
--- a/mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h
|
||||
+++ b/mupen64plus-core/src/r4300/hacktarux_dynarec/assemble.h
|
||||
@@ -1650,7 +1650,7 @@ static INLINE void fchs(void)
|
||||
}
|
||||
|
||||
|
||||
-static INLINE void fsqrt(void)
|
||||
+static INLINE void _fsqrt(void)
|
||||
{
|
||||
put8(0xD9);
|
||||
put8(0xFA);
|
||||
diff --git a/mupen64plus-core/src/r4300/hacktarux_dynarec/hacktarux_dynarec.c b/mupen64plus-core/src/r4300/hacktarux_dynarec/hacktarux_dynarec.c
|
||||
index 89fb982..2fc70d1 100644
|
||||
--- a/mupen64plus-core/src/r4300/hacktarux_dynarec/hacktarux_dynarec.c
|
||||
+++ b/mupen64plus-core/src/r4300/hacktarux_dynarec/hacktarux_dynarec.c
|
||||
@@ -6317,13 +6317,13 @@ void gensqrt_d(void)
|
||||
#ifdef __x86_64__
|
||||
mov_xreg64_m64rel(RAX, (uint64_t *)(®_cop1_double[dst->f.cf.fs]));
|
||||
fld_preg64_qword(RAX);
|
||||
- fsqrt();
|
||||
+ _fsqrt();
|
||||
mov_xreg64_m64rel(RAX, (uint64_t *)(®_cop1_double[dst->f.cf.fd]));
|
||||
fstp_preg64_qword(RAX);
|
||||
#else
|
||||
mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fs]));
|
||||
fld_preg32_qword(EAX);
|
||||
- fsqrt();
|
||||
+ _fsqrt();
|
||||
mov_eax_memoffs32((unsigned int *)(®_cop1_double[dst->f.cf.fd]));
|
||||
fstp_preg32_qword(EAX);
|
||||
#endif
|
||||
@@ -7301,13 +7301,13 @@ void gensqrt_s(void)
|
||||
#ifdef __x86_64__
|
||||
mov_xreg64_m64rel(RAX, (uint64_t *)(®_cop1_simple[dst->f.cf.fs]));
|
||||
fld_preg64_dword(RAX);
|
||||
- fsqrt();
|
||||
+ _fsqrt();
|
||||
mov_xreg64_m64rel(RAX, (uint64_t *)(®_cop1_simple[dst->f.cf.fd]));
|
||||
fstp_preg64_dword(RAX);
|
||||
#else
|
||||
mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fs]));
|
||||
fld_preg32_dword(EAX);
|
||||
- fsqrt();
|
||||
+ _fsqrt();
|
||||
mov_eax_memoffs32((unsigned int *)(®_cop1_simple[dst->f.cf.fd]));
|
||||
fstp_preg32_dword(EAX);
|
||||
#endif
|
||||
--
|
||||
2.52.0
|
||||
|
||||
Reference in New Issue
Block a user