summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c
new file mode 100644
index 000000000000..c6211e39fbdd
--- /dev/null
+++ b/www/qt6-webengine/files/patch-src_3rdparty_chromium_third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c
@@ -0,0 +1,27 @@
+--- src/3rdparty/chromium/third_party/libvpx/source/libvpx/vpx_ports/aarch64_cpudetect.c.orig 2024-01-30 07:53:34 UTC
++++ src/3rdparty/chromium/third_party/libvpx/source/libvpx/vpx_ports/aarch64_cpudetect.c
+@@ -91,9 +91,23 @@ static int arm_get_cpu_caps(void) {
+ return flags;
+ }
+
+-#elif defined(__linux__) // end defined(VPX_USE_ANDROID_CPU_FEATURES)
++#elif defined(__linux__) || defined(__FreeBSD__) // end defined(VPX_USE_ANDROID_CPU_FEATURES)
+
+ #include <sys/auxv.h>
++
++#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
+
+ // Define hwcap values ourselves: building with an old auxv header where these
+ // hwcap values are not defined should not prevent features from being enabled.