diff options
| author | Lexi Winter <ivy@FreeBSD.org> | 2025-12-01 03:19:41 +0000 |
|---|---|---|
| committer | Lexi Winter <ivy@FreeBSD.org> | 2025-12-01 03:19:41 +0000 |
| commit | 2e80774d0b20d167bc0a9e2b63dafbfb171c0d22 (patch) | |
| tree | 25f0138e1af8902b92dacc8cce09b267447c17db /multimedia/aom/files/patch-aom__ports_riscv__cpudetect.c | |
| parent | f85f2b2d6e5b7ed869376eb4b180c3a74a5c5da9 (diff) | |
| parent | 1a30da80670973368b399f2b01fe9c04b91a1273 (diff) | |
Merge remote-tracking branch 'freebsd/main' into lf/mainlf/main
Diffstat (limited to 'multimedia/aom/files/patch-aom__ports_riscv__cpudetect.c')
| -rw-r--r-- | multimedia/aom/files/patch-aom__ports_riscv__cpudetect.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/multimedia/aom/files/patch-aom__ports_riscv__cpudetect.c b/multimedia/aom/files/patch-aom__ports_riscv__cpudetect.c new file mode 100644 index 000000000000..620b4948ebf7 --- /dev/null +++ b/multimedia/aom/files/patch-aom__ports_riscv__cpudetect.c @@ -0,0 +1,25 @@ +- Implement runtime detection on FreeBSD + +--- aom_ports/riscv_cpudetect.c.orig 2025-09-05 22:10:37 UTC ++++ aom_ports/riscv_cpudetect.c +@@ -23,6 +23,20 @@ + + #define HWCAP_RVV (1 << ('v' - 'a')) + ++#if defined(__FreeBSD__) ++static unsigned long getauxval(unsigned long type) ++{ ++ /* Only AT_HWCAP* return unsigned long */ ++ if (type != AT_HWCAP && type != AT_HWCAP2) { ++ return 0; ++ } ++ ++ unsigned long ret = 0; ++ elf_aux_info(type, &ret, sizeof(ret)); ++ return ret; ++} ++#endif ++ + int riscv_simd_caps(void) { + int flags = 0; + #if HAVE_RVV |
