git: d06276deb159 - main - devel/electron11: fix build on aarch64
Hiroki Tagato
tagattie at FreeBSD.org
Sun Apr 18 06:41:23 UTC 2021
The branch main has been updated by tagattie:
URL: https://cgit.FreeBSD.org/ports/commit/?id=d06276deb159addfcf61a1ee598ae088d772e110
commit d06276deb159addfcf61a1ee598ae088d772e110
Author: Hiroki Tagato <tagattie at FreeBSD.org>
AuthorDate: 2021-04-18 06:37:03 +0000
Commit: Hiroki Tagato <tagattie at FreeBSD.org>
CommitDate: 2021-04-18 06:37:03 +0000
devel/electron11: fix build on aarch64
Submitted by: mikael (via GitHub)
---
devel/electron11/files/patch-third__party_zlib_BUILD.gn | 11 +++++++++++
.../electron11/files/patch-third__party_zlib_cpu__features.c | 9 +++++++++
2 files changed, 20 insertions(+)
diff --git a/devel/electron11/files/patch-third__party_zlib_BUILD.gn b/devel/electron11/files/patch-third__party_zlib_BUILD.gn
new file mode 100644
index 000000000000..822486e2ff69
--- /dev/null
+++ b/devel/electron11/files/patch-third__party_zlib_BUILD.gn
@@ -0,0 +1,11 @@
+--- third_party/zlib/BUILD.gn.orig 2021-04-13 08:26:04 UTC
++++ third_party/zlib/BUILD.gn
+@@ -108,6 +108,8 @@ if (use_arm_neon_optimizations) {
+ defines = [ "CRC32_ARMV8_CRC32" ]
+ if (is_android) {
+ defines += [ "ARMV8_OS_ANDROID" ]
++ } else if (is_bsd) {
++ defines += [ "ARMV8_OS_FREEBSD" ]
+ } else if (is_linux || is_chromeos) {
+ defines += [ "ARMV8_OS_LINUX" ]
+ } else if (is_mac) {
diff --git a/devel/electron11/files/patch-third__party_zlib_cpu__features.c b/devel/electron11/files/patch-third__party_zlib_cpu__features.c
index 27db96d8cbfb..511ce4c485ef 100644
--- a/devel/electron11/files/patch-third__party_zlib_cpu__features.c
+++ b/devel/electron11/files/patch-third__party_zlib_cpu__features.c
@@ -23,6 +23,15 @@
#include <cpu-features.h>
#elif defined(ARMV8_OS_LINUX)
#include <asm/hwcap.h>
+@@ -65,7 +65,7 @@ int ZLIB_INTERNAL x86_cpu_enable_simd = 0;
+ static void _cpu_check_features(void);
+ #endif
+
+-#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_MACOS) || defined(ARMV8_OS_FUCHSIA) || defined(X86_NOT_WINDOWS)
++#if defined(ARMV8_OS_ANDROID) || defined(ARMV8_OS_FREEBSD) || defined(ARMV8_OS_LINUX) || defined(ARMV8_OS_MACOS) || defined(ARMV8_OS_FUCHSIA) || defined(X86_NOT_WINDOWS)
+ #if !defined(ARMV8_OS_MACOS)
+ // _cpu_check_features() doesn't need to do anything on mac/arm since all
+ // features are known at build time, so don't call it.
@@ -123,6 +132,13 @@ static void _cpu_check_features(void)
#elif defined(ARMV8_OS_WINDOWS)
arm_cpu_enable_crc32 = IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE);
More information about the dev-commits-ports-all
mailing list