diff options
Diffstat (limited to 'multimedia/aom/files')
| -rw-r--r-- | multimedia/aom/files/patch-aom__ports_ppc__cpudetect.c | 23 | ||||
| -rw-r--r-- | multimedia/aom/files/patch-aom__ports_riscv__cpudetect.c | 25 |
2 files changed, 40 insertions, 8 deletions
diff --git a/multimedia/aom/files/patch-aom__ports_ppc__cpudetect.c b/multimedia/aom/files/patch-aom__ports_ppc__cpudetect.c index 271e41579143..91461196c7ba 100644 --- a/multimedia/aom/files/patch-aom__ports_ppc__cpudetect.c +++ b/multimedia/aom/files/patch-aom__ports_ppc__cpudetect.c @@ -1,21 +1,27 @@ - Implement VSX detection on FreeBSD ---- aom_ports/ppc_cpudetect.c.orig 2021-07-20 22:23:15 UTC +--- aom_ports/ppc_cpudetect.c.orig 2025-09-02 20:59:58 UTC +++ aom_ports/ppc_cpudetect.c -@@ -9,12 +9,6 @@ +@@ -9,18 +9,11 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#include <fcntl.h> -#include <unistd.h> -#include <stdint.h> --#include <asm/cputable.h> --#include <linux/auxvec.h> - #include "config/aom_config.h" #include "aom_ports/ppc.h" -@@ -37,6 +31,13 @@ static int cpu_env_mask(void) { + + #if CONFIG_RUNTIME_CPU_DETECT +-#include <asm/cputable.h> +-#include <linux/auxvec.h> +- + static int cpu_env_flags(int *flags) { + char *env; + env = getenv("AOM_SIMD_CAPS"); +@@ -38,6 +31,13 @@ static int cpu_env_mask(void) { return env && *env ? (int)strtol(env, NULL, 0) : ~0; } @@ -29,7 +35,7 @@ int ppc_simd_caps(void) { int flags; int mask; -@@ -75,6 +76,34 @@ out_close: +@@ -76,7 +76,35 @@ out_close: close(fd); return flags & mask; } @@ -56,11 +62,12 @@ + + return flags & mask; +} -+#else + #else +#error \ + "--enable-runtime-cpu-detect selected, but no CPU detection method " \ +"available for your platform. Reconfigure with --disable-runtime-cpu-detect." +#endif /* end __FreeBSD__ */ - #else ++#else // If there is no RTCD the function pointers are not used and can not be // changed. + int ppc_simd_caps(void) { return 0; } 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 |
