games/libretro-beetle_psx: Fix build on armv7

The functions __addsf3 and __adddf3 are part of libgcc which is not
provided when compiling with clang.  Fiddle with some #if directives to
provide shims if we compile with clang.

PR:		268077
MFH:		2022Q4 (build fix)
This commit is contained in:
Robert Clausecker 2022-12-01 21:12:04 +00:00 committed by Nuno Teixeira
parent 80afc63eeb
commit 4b93307b9d
2 changed files with 28 additions and 2 deletions

View File

@ -1,6 +1,6 @@
PORTNAME= libretro-beetle_psx
PORTVERSION= 0.20220211
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= games
MAINTAINER= ports@FreeBSD.org
@ -20,8 +20,14 @@ GH_TAGNAME= 88929ae
PLIST_FILES= lib/libretro/mednafen_psx_libretro.so
.include <bsd.port.pre.mk>
.if ${ARCH:Marmv?}
USE_GCC= yes:build
.endif
do-install:
${MKDIR} ${STAGEDIR}/${PREFIX}/lib/libretro;
${INSTALL_LIB} ${WRKSRC}/mednafen_psx_libretro.so ${STAGEDIR}/${PREFIX}/lib/libretro;
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View File

@ -0,0 +1,20 @@
--- deps/lightning/lib/jit_arm-swf.c.orig 2022-11-30 10:43:45 UTC
+++ deps/lightning/lib/jit_arm-swf.c
@@ -402,7 +402,7 @@ static void _swf_vaarg_d(jit_state_t*, jit_int32_t, ji
BICI(rt, rn, encode_arm_immediate(im)); \
} while (0)
-#if !defined(__GNUC__)
+#if !defined(__GNUC__) || defined(__llvm__)
float __addsf3(float u, float v)
{
return (u + v);
@@ -414,6 +414,8 @@ __adddf3(double u, double v)
return (u + v);
}
+#endif
+#if !defined(__GNUC__)
float
__aeabi_fsub(float u, float v)
{