Skip to contentSkip to conversation

package/opus: Use vcvtaq_s32_f32 with clang only

PATCH In review Bernd Kuhls 2 participants 2 messages Nov 21 – Nov 22

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/opus: Use vcvtaq_s32_f32 with clang only

See upstream discussion
https://gitlab.xiph.org/xiph/opus/-/work_items/2397
and first version of buildroot patch for discussion:
https://patchwork.buildroot.org/project/buildroot/patch/[email protected]/

Fixes:
https://autobuild.buildroot.org/results/e7396609cb47827bef2a220cbe1f46167dbf7ec3/

The build error was introduced by upstream commit
https://gitlab.xiph.org/xiph/opus/-/commit/d4494e6ed7d564cbee3cfdfe41d0c0989c4345ff
which was first released in version 1.6 and bumped in buildroot by commit 9e779d6e57add2e1a78addb02ab45fbdd6a457e0.

---
 ...1-Use-vcvtaq_s32_f32-with-clang-only.patch | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 package/opus/0001-Use-vcvtaq_s32_f32-with-clang-only.patch
package/opus/0001-Use-vcvtaq_s32_f32-with-clang-only.patch new file +33 -0
new file mode 100644
index 0000000000..a8faeafe7a
@@ -0,0 +1,33 @@
+From 8b2a9c07506fdfed0eb5f66e60ace653e30540ca Mon Sep 17 00:00:00 2001
+From: Michele Comignano <[email protected]>
+Date: Tue, 16 Jun 2026 00:37:05 +0200
+Subject: [PATCH] Use vcvtaq_s32_f32 with clang only
+
+While intrinsics vcvtaq_s32_f32 is present according to ARM docs,
+gcc doesn't make it available.
+The fix, ensure its only used when compiling with clang which is
+known to propertly make it available.
+
+Upstream: https://gitlab.xiph.org/xiph/opus/-/merge_requests/193
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ celt/arm/mathops_arm.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/celt/arm/mathops_arm.h b/celt/arm/mathops_arm.h
+index b1f91699..3be61b23 100644
+--- a/celt/arm/mathops_arm.h
++++ b/celt/arm/mathops_arm.h
+@@ -37,7 +37,7 @@
+ 
+ static inline int32x4_t vroundf(float32x4_t x)
+ {
+-#  if defined(__aarch64__) || (defined(__ARM_ARCH) && __ARM_ARCH >= 8)
++#  if defined(__aarch64__) || (defined(__ARM_ARCH) && __ARM_ARCH >= 8 && defined(__clang__))
+     return vcvtaq_s32_f32(x);
+ #  else
+     uint32x4_t sign = vandq_u32(vreinterpretq_u32_f32(x), vdupq_n_u32(0x80000000));
+-- 
+2.47.3
+
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 8 lines · Bernd Kuhls

See upstream discussion
https://gitlab.xiph.org/xiph/opus/-/work_items/2397
and first version of buildroot patch for discussion:
https://patchwork.buildroot.org/project/buildroot/patch/[email protected]/

Fixes:
https://autobuild.buildroot.org/results/e7396609cb47827bef2a220cbe1f46167dbf7ec3/

Quoted 6 lines

The build error was introduced by upstream commit
https://gitlab.xiph.org/xiph/opus/-/commit/d4494e6ed7d564cbee3cfdfe41d0c0989c4345ff
which was first released in version 1.6 and bumped in buildroot by commit 9e779d6e57add2e1a78addb02ab45fbdd6a457e0.

Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot