git: d52b25cffa1b - main - devel/electron17: fix build on arm64
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 27 Jun 2022 13:50:36 UTC
The branch main has been updated by tagattie:
URL: https://cgit.FreeBSD.org/ports/commit/?id=d52b25cffa1be6d7730b595c392bf9bcdedf5f1b
commit d52b25cffa1be6d7730b595c392bf9bcdedf5f1b
Author: Hiroki Tagato <tagattie@FreeBSD.org>
AuthorDate: 2022-06-27 13:47:58 +0000
Commit: Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2022-06-27 13:50:29 +0000
devel/electron17: fix build on arm64
Obtained from: https://cgit.freebsd.org/ports/diff/www/chromium/files/patch-third__party_skia_src_core_SkCpu.cpp?id=229eae94451f1213d3fc5d2198728d0a909d43f6
---
.../patch-third__party_skia_src_core_SkCpu.cpp | 26 ++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/devel/electron17/files/patch-third__party_skia_src_core_SkCpu.cpp b/devel/electron17/files/patch-third__party_skia_src_core_SkCpu.cpp
new file mode 100644
index 000000000000..cff64790931c
--- /dev/null
+++ b/devel/electron17/files/patch-third__party_skia_src_core_SkCpu.cpp
@@ -0,0 +1,26 @@
+--- third_party/skia/src/core/SkCpu.cpp.orig 2022-05-11 07:06:58 UTC
++++ third_party/skia/src/core/SkCpu.cpp
+@@ -73,6 +73,23 @@
+ return features;
+ }
+
++#elif defined(SK_CPU_ARM64) && defined(__FreeBSD__)
++ #include <machine/armreg.h>
++ #ifndef ID_AA64ISAR0_CRC32_VAL
++ #define ID_AA64ISAR0_CRC32_VAL ID_AA64ISAR0_CRC32
++ #endif
++
++ static uint32_t read_cpu_features() {
++ uint32_t features = 0;
++ uint64_t id_aa64isar0;
++
++ id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1);
++ if (ID_AA64ISAR0_CRC32_VAL(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) {
++ features |= SkCpu::CRC32;
++ }
++ return features;
++ }
++
+ #elif defined(SK_CPU_ARM64) && __has_include(<sys/auxv.h>)
+ #include <sys/auxv.h>
+