git: 14fa25ab60a1 - 2025Q3 - audio/mac: fix build on armv7
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 10 Aug 2025 19:19:35 UTC
The branch 2025Q3 has been updated by fuz:
URL: https://cgit.FreeBSD.org/ports/commit/?id=14fa25ab60a17a8944c33cace4071622ae5bc67a
commit 14fa25ab60a17a8944c33cace4071622ae5bc67a
Author: Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2025-08-04 20:55:53 +0000
Commit: Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2025-08-10 19:18:34 +0000
audio/mac: fix build on armv7
Classic getauxval() issue.
Approved by: portmgr (build fix blanket)
MFH: 2025Q3
(cherry picked from commit 137bc912c8d92a6dbd7b5911c60c2f146b18a6f6)
---
.../mac/files/patch-Source_Shared_CPUFeatures.cpp | 26 ++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/audio/mac/files/patch-Source_Shared_CPUFeatures.cpp b/audio/mac/files/patch-Source_Shared_CPUFeatures.cpp
new file mode 100644
index 000000000000..3713b9bb9152
--- /dev/null
+++ b/audio/mac/files/patch-Source_Shared_CPUFeatures.cpp
@@ -0,0 +1,26 @@
+--- Source/Shared/CPUFeatures.cpp.orig 2025-08-04 20:52:19 UTC
++++ Source/Shared/CPUFeatures.cpp
+@@ -4,7 +4,7 @@
+ #if defined(PLATFORM_LINUX)
+ #include <sys/auxv.h>
+
+- #if defined(__arm__)
++ #if defined(__arm__) && defined(__linux__)
+ #include <asm/hwcap.h>
+
+ #ifndef HWCAP_NEON
+@@ -187,7 +187,14 @@ bool GetNeonSupported()
+ #if defined(__ARM_NEON) || defined(__ARM_NEON__) || defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC)
+ return true;
+ #elif defined(__arm__) && defined(PLATFORM_LINUX)
++#ifdef __linux__
+ return getauxval(AT_HWCAP) & HWCAP_NEON;
++#elif defined(__FreeBSD__)
++ long hwcap = 0;
++
++ elf_aux_info(AT_HWCAP, &hwcap, sizeof hwcap);
++ return (hwcap & HWCAP_NEON);
++#endif
+ #else
+ return false;
+ #endif