commit:     33720ad184e7df3c820577cdad834e5a318d62ce
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 30 20:02:38 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 30 20:02:46 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33720ad1

media-libs/sbc: fix build on arm w/ c23

Closes: https://bugs.gentoo.org/968161
Signed-off-by: Sam James <sam <AT> gentoo.org>

 media-libs/sbc/files/sbc-2.1-arm-c23.patch | 45 ++++++++++++++++++++++++++++++
 media-libs/sbc/sbc-2.1.ebuild              |  5 +++-
 2 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/media-libs/sbc/files/sbc-2.1-arm-c23.patch 
b/media-libs/sbc/files/sbc-2.1-arm-c23.patch
new file mode 100644
index 000000000000..2b8bc12efc6a
--- /dev/null
+++ b/media-libs/sbc/files/sbc-2.1-arm-c23.patch
@@ -0,0 +1,45 @@
+From d34138bc63f0eb18cda841778c75436cdf34adbd Mon Sep 17 00:00:00 2001
+Message-ID: 
<d34138bc63f0eb18cda841778c75436cdf34adbd.1767124892.git....@gentoo.org>
+From: Sam James <[email protected]>
+Date: Tue, 30 Dec 2025 20:00:31 +0000
+Subject: [PATCH] sbc: fix armv6 build w/ C23
+
+C23 makes () mean 'no arguments', not 'unspecified'.
+
+Even though the function is naked and doesn't use the args as explicit inputs
+to the inline asm block, we can't get away with none, and ... would be wrong as
+it's not variadic. So just fill them in.
+
+Bug: https://bugs.gentoo.org/968161
+Signed-off-by: Sam James <[email protected]>
+---
+ sbc/sbc_primitives_armv6.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/sbc/sbc_primitives_armv6.c b/sbc/sbc_primitives_armv6.c
+index bf97610..871f942 100644
+--- a/sbc/sbc_primitives_armv6.c
++++ b/sbc/sbc_primitives_armv6.c
+@@ -22,7 +22,8 @@
+ 
+ #ifdef SBC_BUILD_WITH_ARMV6_SUPPORT
+ 
+-static void __attribute__((naked)) sbc_analyze_four_armv6()
++static void __attribute__((naked)) sbc_analyze_four_armv6(int16_t *in, 
int32_t *out,
++                                                              const FIXED_T 
*consts)
+ {
+       /* r0 = in, r1 = out, r2 = consts */
+       __asm__ volatile (
+@@ -93,7 +94,8 @@ static void __attribute__((naked)) sbc_analyze_four_armv6()
+       ((void (*)(int16_t *, int32_t *, const FIXED_T*)) \
+               sbc_analyze_four_armv6)((in), (out), (consts))
+ 
+-static void __attribute__((naked)) sbc_analyze_eight_armv6()
++static void __attribute__((naked)) sbc_analyze_eight_armv6(int16_t *in, 
int32_t *out,
++                                                      const FIXED_T *consts)
+ {
+       /* r0 = in, r1 = out, r2 = consts */
+       __asm__ volatile (
+-- 
+2.52.0
+

diff --git a/media-libs/sbc/sbc-2.1.ebuild b/media-libs/sbc/sbc-2.1.ebuild
index 0f0ad38b5fd7..20fa04acb8de 100644
--- a/media-libs/sbc/sbc-2.1.ebuild
+++ b/media-libs/sbc/sbc-2.1.ebuild
@@ -20,7 +20,10 @@ RESTRICT="test"
 
 BDEPEND="virtual/pkgconfig"
 
-PATCHES=( "${FILESDIR}/${PN}-1.5-ifdef-builtin.patch" )
+PATCHES=(
+       "${FILESDIR}/${PN}-1.5-ifdef-builtin.patch"
+       "${FILESDIR}/${PN}-2.1-arm-c23.patch"
+)
 
 multilib_src_configure() {
        ECONF_SOURCE=${S} \

Reply via email to