Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Dec 2022 21:20:20 GMT
From:      Nuno Teixeira <eduardo@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: 0ad5602a2ac9 - 2022Q4 - games/libretro-beetle_psx: Fix build on armv7
Message-ID:  <202212012120.2B1LKKLO070596@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2022Q4 has been updated by eduardo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0ad5602a2ac93edff0568c23240e77b6ccf20e17

commit 0ad5602a2ac93edff0568c23240e77b6ccf20e17
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-12-01 21:12:04 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2022-12-01 21:18:29 +0000

    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)
    (cherry picked from commit 4b93307b9d1762c72e68c229301795c8ebdc79fc)
---
 games/libretro-beetle_psx/Makefile                   | 10 ++++++++--
 .../files/patch-deps_lightning_lib_jit__arm-swf.c    | 20 ++++++++++++++++++++
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/games/libretro-beetle_psx/Makefile b/games/libretro-beetle_psx/Makefile
index 51ea9c4f534f..f39260e485cc 100644
--- a/games/libretro-beetle_psx/Makefile
+++ b/games/libretro-beetle_psx/Makefile
@@ -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>
diff --git a/games/libretro-beetle_psx/files/patch-deps_lightning_lib_jit__arm-swf.c b/games/libretro-beetle_psx/files/patch-deps_lightning_lib_jit__arm-swf.c
new file mode 100644
index 000000000000..6e2cdfe00c4e
--- /dev/null
+++ b/games/libretro-beetle_psx/files/patch-deps_lightning_lib_jit__arm-swf.c
@@ -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)
+ {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202212012120.2B1LKKLO070596>