Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/multimedia/aom/files/patch-aom__ports_riscv__cpudetect.c
17747 views
1
- Implement runtime detection on FreeBSD
2
3
--- aom_ports/riscv_cpudetect.c.orig 2025-09-05 22:10:37 UTC
4
+++ aom_ports/riscv_cpudetect.c
5
@@ -23,6 +23,20 @@
6
7
#define HWCAP_RVV (1 << ('v' - 'a'))
8
9
+#if defined(__FreeBSD__)
10
+static unsigned long getauxval(unsigned long type)
11
+{
12
+ /* Only AT_HWCAP* return unsigned long */
13
+ if (type != AT_HWCAP && type != AT_HWCAP2) {
14
+ return 0;
15
+ }
16
+
17
+ unsigned long ret = 0;
18
+ elf_aux_info(type, &ret, sizeof(ret));
19
+ return ret;
20
+}
21
+#endif
22
+
23
int riscv_simd_caps(void) {
24
int flags = 0;
25
#if HAVE_RVV
26
27