Skip to content

Commit

Permalink
www/*chromium: unbreak arm64 by implementing the missing cpudetect code
Browse files Browse the repository at this point in the history
(cherry picked from commit 5d97e86)
  • Loading branch information
Robert Nagy authored and Robert Nagy committed Jan 8, 2024
1 parent 056d16e commit 17f1fa1
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
@@ -0,0 +1,20 @@
--- third_party/libvpx/source/libvpx/vpx_ports/aarch64_cpudetect.c.orig 2024-01-08 12:52:53 UTC
+++ third_party/libvpx/source/libvpx/vpx_ports/aarch64_cpudetect.c
@@ -153,7 +153,16 @@ static int arm_get_cpu_caps(void) {
return flags;
}

-#else // end __Fuchsia__
+#elif defined(__FreeBSD__) // end __Fuchsia__
+
+int arm_get_cpu_caps(void) {
+ int flags = 0;
+#if HAVE_NEON
+ flags |= HAS_NEON; // Neon is mandatory in Armv8.0-A.
+#endif // HAVE_NEON
+ return flags;
+}
+#else // end __FreeBSD__
#error \
"Runtime CPU detection selected, but no CPU detection method available" \
"for your platform. Rerun configure with --disable-runtime-cpu-detect."
@@ -0,0 +1,20 @@
--- third_party/libvpx/source/libvpx/vpx_ports/aarch64_cpudetect.c.orig 2024-01-08 12:52:53 UTC
+++ third_party/libvpx/source/libvpx/vpx_ports/aarch64_cpudetect.c
@@ -153,7 +153,16 @@ static int arm_get_cpu_caps(void) {
return flags;
}

-#else // end __Fuchsia__
+#elif defined(__FreeBSD__) // end __Fuchsia__
+
+int arm_get_cpu_caps(void) {
+ int flags = 0;
+#if HAVE_NEON
+ flags |= HAS_NEON; // Neon is mandatory in Armv8.0-A.
+#endif // HAVE_NEON
+ return flags;
+}
+#else // end __FreeBSD__
#error \
"Runtime CPU detection selected, but no CPU detection method available" \
"for your platform. Rerun configure with --disable-runtime-cpu-detect."

0 comments on commit 17f1fa1

Please sign in to comment.