Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
www/*chromium: unbreak arm64 by implementing the missing cpudetect code
(cherry picked from commit 5d97e86)
- Loading branch information
Robert Nagy
authored and
Robert Nagy
committed
Jan 8, 2024
1 parent
056d16e
commit 17f1fa1
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
www/chromium/files/patch-third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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." |
20 changes: 20 additions & 0 deletions
20
...ed-chromium/files/patch-third__party_libvpx_source_libvpx_vpx__ports_aarch64__cpudetect.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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." |