Github messages for voidlinux
 help / color / mirror / Atom feed
From: ahesford <ahesford@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] retroarch: add support for Neon SIMD on armv7l
Date: Fri, 08 Jan 2021 22:07:20 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-27769@inbox.vuxu.org> (raw)

[-- 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

             reply	other threads:[~2021-01-08 21:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-08 21:07 ahesford [this message]
2021-01-11 14:51 ` [PR PATCH] [Closed]: " ahesford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-27769@inbox.vuxu.org \
    --to=ahesford@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).