* [PR PATCH] retroarch: add support for Neon SIMD on armv7l
@ 2021-01-08 21:07 ahesford
2021-01-11 14:51 ` [PR PATCH] [Closed]: " ahesford
0 siblings, 1 reply; 2+ messages in thread
From: ahesford @ 2021-01-08 21:07 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 950 bytes --]
There is a new pull request by ahesford against master on the void-packages repository
https://github.com/ahesford/void-packages retroarch
https://github.com/void-linux/void-packages/pull/27769
retroarch: add support for Neon SIMD on armv7l
`retroarch` is useless without "core" modules that provide emulation capabilities. For Linux on ARM, libretro provides precompiled modules for `armhf` and `armv7-neon-hf`. The `armhf` modules generally work in our `armv7l` build, but the `armv7-neon-hf` modules may offer better performance and---at least in the case of the `picodrive` Sega module---better functionality (I couldn't get the `armhf` version to run without crashing on a Raspberry Pi 3B+).
Since not every ARMv7 implementation supports Neon, this is a build option. However, because I believe Neon is commonly supported, it is enabled by default.
A patch file from https://github.com/void-linux/void-packages/pull/27769.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-retroarch-27769.patch --]
[-- Type: text/x-diff, Size: 1907 bytes --]
From f356c41d11a889b452aaff3d5c8af88777ca1aab Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Fri, 8 Jan 2021 15:25:57 -0500
Subject: [PATCH] retroarch: add support for Neon SIMD on armv7l
---
srcpkgs/retroarch/template | 41 ++++++++++++++++++++++++++------------
1 file changed, 28 insertions(+), 13 deletions(-)
diff --git a/srcpkgs/retroarch/template b/srcpkgs/retroarch/template
index ac9283bbb63..c3ab2846259 100644
--- a/srcpkgs/retroarch/template
+++ b/srcpkgs/retroarch/template
@@ -1,7 +1,7 @@
# Template file for 'retroarch'
pkgname=retroarch
version=1.9.0
-revision=1
+revision=2
wrksrc="RetroArch-$version"
build_style=configure
configure_args="--prefix=/usr --sysconfdir=/etc --enable-networking
@@ -80,17 +80,32 @@ if [ "$build_option_x11" ]; then
fi
fi
-do_configure() {
- if [ "$CROSS_BUILD" ]; then
- configure_args+=" --host=${XBPS_CROSS_TRIPLET}"
- fi
+case "$XBPS_TARGET_MACHINE" in
+ i686*|x86_64*)
+ configure_args+=" --enable-sse --enable-threads"
+ ;;
+ ppc*)
+ configure_args+=" --enable-threads"
+ ;;
+ aarch64*)
+ configure_args+=" --enable-threads"
+ ;;
+ armv7*)
+ build_options+=" neon"
+ build_options_default+=" neon"
+ desc_option_neon="Enable support for ARM Neon SIMD extension"
+
+ configure_args+=" --enable-threads $(vopt_enable neon)"
- case "$XBPS_TARGET_MACHINE" in
- i686*|x86_64*) configure_args+=" --enable-sse --enable-threads";;
- ppc*) configure_args+=" --enable-threads";;
- aarch64*) configure_args+=" --disable-neon --enable-threads";;
- armv7*) configure_args+=" --disable-neon --enable-threads";;
- arm*) configure_args+=" --disable-neon";;
+ if [ "$build_option_neon" ]; then
+ CFLAGS+=" -mfpu=neon"
+ fi
+ ;;
+ arm*)
+ configure_args+=" --disable-neon"
+ ;;
esac
- ./configure ${configure_args}
-}
+
+if [ "$CROSS_BUILD" ]; then
+ configure_args+=" --host=${XBPS_CROSS_TRIPLET}"
+fi
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PR PATCH] [Closed]: retroarch: add support for Neon SIMD on armv7l
2021-01-08 21:07 [PR PATCH] retroarch: add support for Neon SIMD on armv7l ahesford
@ 2021-01-11 14:51 ` ahesford
0 siblings, 0 replies; 2+ messages in thread
From: ahesford @ 2021-01-11 14:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 795 bytes --]
There's a closed pull request on the void-packages repository
retroarch: add support for Neon SIMD on armv7l
https://github.com/void-linux/void-packages/pull/27769
Description:
`retroarch` is useless without "core" modules that provide emulation capabilities. For Linux on ARM, libretro provides precompiled modules for `armhf` and `armv7-neon-hf`. The `armhf` modules generally work in our `armv7l` build, but the `armv7-neon-hf` modules may offer better performance and---at least in the case of the `picodrive` Sega module---better functionality (I couldn't get the `armhf` version to run without crashing on a Raspberry Pi 3B+).
Since not every ARMv7 implementation supports Neon, this is a build option. However, because I believe Neon is commonly supported, it is enabled by default.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-11 14:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-08 21:07 [PR PATCH] retroarch: add support for Neon SIMD on armv7l ahesford
2021-01-11 14:51 ` [PR PATCH] [Closed]: " ahesford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).