Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Apr 2019 20:46:31 +0000 (UTC)
From:      "Carlos J. Puga Medina" <cpm@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r499210 - in head/www/chromium: . files
Message-ID:  <201904172046.x3HKkVUx004074@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cpm
Date: Wed Apr 17 20:46:31 2019
New Revision: 499210
URL: https://svnweb.freebsd.org/changeset/ports/499210

Log:
  www/chromium: Unbreak on arm64
  
  PR:		236441
  Submitted by:	Mikael Urankar <mikael.urankar@gmail.com>
  MFH:		2019Q2

Added:
  head/www/chromium/files/patch-build_detect__host__arch.py   (contents, props changed)
  head/www/chromium/files/patch-third__party_swiftshader_third__party_llvm-7.0_configs_linux_include_llvm_Config_config.h   (contents, props changed)
  head/www/chromium/files/patch-third__party_swiftshader_third__party_llvm-7.0_configs_linux_include_llvm_Config_llvm-config.h   (contents, props changed)
  head/www/chromium/files/patch-tools_gn_util_sys__info.cc   (contents, props changed)
Modified:
  head/www/chromium/Makefile
  head/www/chromium/files/patch-third__party_boringssl_src_crypto_cpu-aarch64-linux.c
  head/www/chromium/files/patch-third__party_crc32c_src_src_crc32c__arm64__linux__check.h
  head/www/chromium/files/patch-third__party_zlib_arm__features.c

Modified: head/www/chromium/Makefile
==============================================================================
--- head/www/chromium/Makefile	Wed Apr 17 20:39:38 2019	(r499209)
+++ head/www/chromium/Makefile	Wed Apr 17 20:46:31 2019	(r499210)
@@ -3,7 +3,7 @@
 
 PORTNAME=	chromium
 PORTVERSION=	73.0.3683.103
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES?=	www
 MASTER_SITES=	https://commondatastorage.googleapis.com/chromium-browser-official/ \
 		LOCAL/cpm/chromium/:fonts
@@ -216,7 +216,7 @@ PLIST_SUB+=	NOT_AARCH64=""
 .endif
 
 # Make better javascript with java
-.if (${ARCH} == amd64 || ${ARCH} == i386) && !defined(GN_ONLY)
+.if !defined(GN_ONLY)
 JAVA_BUILD=	yes
 JAVA_VERSION=	1.8
 USE_JAVA=	yes

Added: head/www/chromium/files/patch-build_detect__host__arch.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/chromium/files/patch-build_detect__host__arch.py	Wed Apr 17 20:46:31 2019	(r499210)
@@ -0,0 +1,11 @@
+--- build/detect_host_arch.py.orig	2019-04-04 10:22:51.354518000 +0200
++++ build/detect_host_arch.py	2019-04-04 10:23:07.641855000 +0200
+@@ -19,6 +19,8 @@ def HostArch():
+     host_arch = 'ia32'
+   elif host_arch in ['x86_64', 'amd64']:
+     host_arch = 'x64'
++  elif host_arch.startswith('arm64'):
++    host_arch = 'arm64'
+   elif host_arch.startswith('arm'):
+     host_arch = 'arm'
+   elif host_arch.startswith('aarch64'):

Modified: head/www/chromium/files/patch-third__party_boringssl_src_crypto_cpu-aarch64-linux.c
==============================================================================
--- head/www/chromium/files/patch-third__party_boringssl_src_crypto_cpu-aarch64-linux.c	Wed Apr 17 20:39:38 2019	(r499209)
+++ head/www/chromium/files/patch-third__party_boringssl_src_crypto_cpu-aarch64-linux.c	Wed Apr 17 20:46:31 2019	(r499210)
@@ -1,25 +1,29 @@
---- third_party/boringssl/src/crypto/cpu-aarch64-linux.c.orig	2019-03-11 22:07:58 UTC
-+++ third_party/boringssl/src/crypto/cpu-aarch64-linux.c
-@@ -14,49 +14,7 @@
+--- third_party/boringssl/src/crypto/cpu-aarch64-linux.c.orig	2019-04-05 02:55:11.000000000 +0200
++++ third_party/boringssl/src/crypto/cpu-aarch64-linux.c	2019-04-15 08:45:47.936052000 +0200
+@@ -14,49 +14,35 @@
  
  #include <openssl/cpu.h>
  
 -#if defined(OPENSSL_AARCH64) && defined(OPENSSL_LINUX) && \
 -    !defined(OPENSSL_STATIC_ARMCAP)
--
++#if defined(OPENSSL_AARCH64)
+ 
 -#include <sys/auxv.h>
 -
--#include <openssl/arm_arch.h>
+ #include <openssl/arm_arch.h>
+ 
+ #include "internal.h"
+ 
 -
--#include "internal.h"
--
--
--extern uint32_t OPENSSL_armcap_P;
--
-+#ifdef __FreeBSD__
+ extern uint32_t OPENSSL_armcap_P;
+ 
++#include <sys/types.h>
++#include <machine/armreg.h>
++
  void OPENSSL_cpuid_setup(void) {
 -  unsigned long hwcap = getauxval(AT_HWCAP);
--
++  uint64_t id_aa64isar0;
+ 
 -  // See /usr/include/asm/hwcap.h on an aarch64 installation for the source of
 -  // these values.
 -  static const unsigned long kNEON = 1 << 1;
@@ -27,28 +31,33 @@
 -  static const unsigned long kPMULL = 1 << 4;
 -  static const unsigned long kSHA1 = 1 << 5;
 -  static const unsigned long kSHA256 = 1 << 6;
--
++  id_aa64isar0 = READ_SPECIALREG(ID_AA64ISAR0_EL1);
+ 
 -  if ((hwcap & kNEON) == 0) {
 -    // Matching OpenSSL, if NEON is missing, don't report other features
 -    // either.
 -    return;
 -  }
 -
--  OPENSSL_armcap_P |= ARMV7_NEON;
--
+   OPENSSL_armcap_P |= ARMV7_NEON;
+ 
 -  if (hwcap & kAES) {
--    OPENSSL_armcap_P |= ARMV8_AES;
--  }
++  if (ID_AA64ISAR0_AES(id_aa64isar0) == ID_AA64ISAR0_AES_BASE) {
+     OPENSSL_armcap_P |= ARMV8_AES;
+   }
 -  if (hwcap & kPMULL) {
--    OPENSSL_armcap_P |= ARMV8_PMULL;
--  }
++  if (ID_AA64ISAR0_AES(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) {
+     OPENSSL_armcap_P |= ARMV8_PMULL;
+   }
 -  if (hwcap & kSHA1) {
--    OPENSSL_armcap_P |= ARMV8_SHA1;
--  }
++  if (ID_AA64ISAR0_SHA1(id_aa64isar0) == ID_AA64ISAR0_SHA1_BASE) {
+     OPENSSL_armcap_P |= ARMV8_SHA1;
+   }
 -  if (hwcap & kSHA256) {
--    OPENSSL_armcap_P |= ARMV8_SHA256;
--  }
++  if(ID_AA64ISAR0_SHA2(id_aa64isar0) == ID_AA64ISAR0_SHA2_BASE) {
+     OPENSSL_armcap_P |= ARMV8_SHA256;
+   }
  }
 -
 -#endif  // OPENSSL_AARCH64 && !OPENSSL_STATIC_ARMCAP
-+#endif
++#endif  // OPENSSL_AARCH64

Modified: head/www/chromium/files/patch-third__party_crc32c_src_src_crc32c__arm64__linux__check.h
==============================================================================
--- head/www/chromium/files/patch-third__party_crc32c_src_src_crc32c__arm64__linux__check.h	Wed Apr 17 20:39:38 2019	(r499209)
+++ head/www/chromium/files/patch-third__party_crc32c_src_src_crc32c__arm64__linux__check.h	Wed Apr 17 20:46:31 2019	(r499210)
@@ -1,19 +1,53 @@
---- third_party/crc32c/src/src/crc32c_arm64_linux_check.h.orig	2019-03-11 22:07:59 UTC
-+++ third_party/crc32c/src/src/crc32c_arm64_linux_check.h
-@@ -29,6 +29,8 @@ extern "C" unsigned long getauxval(unsigned long type)
+--- third_party/crc32c/src/src/crc32c_arm64_linux_check.h.orig	2019-04-05 02:55:11.000000000 +0200
++++ third_party/crc32c/src/src/crc32c_arm64_linux_check.h	2019-04-15 08:43:01.276910000 +0200
+@@ -7,8 +7,6 @@
+ #ifndef CRC32C_CRC32C_ARM_LINUX_CHECK_H_
+ #define CRC32C_CRC32C_ARM_LINUX_CHECK_H_
+ 
+-// X86-specific code checking for the availability of SSE4.2 instructions.
+-
+ #include <cstddef>
+ #include <cstdint>
+ 
+@@ -16,30 +14,19 @@
+ 
+ #if HAVE_ARM64_CRC32C
+ 
+-#if HAVE_STRONG_GETAUXVAL
+-#include <sys/auxv.h>
+-#elif HAVE_WEAK_GETAUXVAL
+-// getauxval() is not available on Android until API level 20. Link it as a weak
+-// symbol.
+-extern "C" unsigned long getauxval(unsigned long type) __attribute__((weak));
+-
+-#define AT_HWCAP 16
+-#endif  // HAVE_STRONG_GETAUXVAL || HAVE_WEAK_GETAUXVAL
+-
++#include <machine/armreg.h>
++#include <sys/types.h>
  namespace crc32c {
  
- inline bool CanUseArm64Linux() {
-+return false;
-+#if 0
- #if HAVE_STRONG_GETAUXVAL || HAVE_WEAK_GETAUXVAL
-   // From 'arch/arm64/include/uapi/asm/hwcap.h' in Linux kernel source code.
-   constexpr unsigned long kHWCAP_PMULL = 1 << 4;
-@@ -39,6 +41,7 @@ inline bool CanUseArm64Linux() {
- #else
-   return false;
- #endif  // HAVE_STRONG_GETAUXVAL || HAVE_WEAK_GETAUXVAL
-+#endif
- }
+-inline bool CanUseArm64Linux() {
+-#if HAVE_STRONG_GETAUXVAL || HAVE_WEAK_GETAUXVAL
+-  // From 'arch/arm64/include/uapi/asm/hwcap.h' in Linux kernel source code.
+-  constexpr unsigned long kHWCAP_PMULL = 1 << 4;
+-  constexpr unsigned long kHWCAP_CRC32 = 1 << 7;
+-  unsigned long hwcap = (&getauxval != nullptr) ? getauxval(AT_HWCAP) : 0;
+-  return (hwcap & (kHWCAP_PMULL | kHWCAP_CRC32)) ==
+-         (kHWCAP_PMULL | kHWCAP_CRC32);
+-#else
+-  return false;
+-#endif  // HAVE_STRONG_GETAUXVAL || HAVE_WEAK_GETAUXVAL
+-}
++  inline bool CanUseArm64Linux() {
++    uint64_t id_aa64isar0;
++  
++    id_aa64isar0 = READ_SPECIALREG(ID_AA64ISAR0_EL1);
++    if ((ID_AA64ISAR0_AES(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL) && \
++       (ID_AA64ISAR0_CRC32(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE))
++      return true;
++    return false;
++  }
  
  }  // namespace crc32c
+ 

Added: head/www/chromium/files/patch-third__party_swiftshader_third__party_llvm-7.0_configs_linux_include_llvm_Config_config.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/chromium/files/patch-third__party_swiftshader_third__party_llvm-7.0_configs_linux_include_llvm_Config_config.h	Wed Apr 17 20:46:31 2019	(r499210)
@@ -0,0 +1,152 @@
+--- third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h.orig	2019-04-05 02:55:18.000000000 +0200
++++ third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/config.h	2019-04-17 10:09:09.339341000 +0200
+@@ -8,15 +8,15 @@
+ #define BUG_REPORT_URL "https://bugs.llvm.org/"
+ 
+ /* Define to 1 to enable backtraces, and to 0 otherwise. */
+-/* #undef ENABLE_BACKTRACES */
++#define ENABLE_BACKTRACES 1
+ 
+ /* Define to 1 to enable crash overrides, and to 0 otherwise. */
+-/* #undef ENABLE_CRASH_OVERRIDES */
++#define ENABLE_CRASH_OVERRIDES 1
+ 
+ /* Define to 1 if you have the `backtrace' function. */
+-/* #undef HAVE_BACKTRACE */
++#define HAVE_BACKTRACE TRUE
+ 
+-/* #undef BACKTRACE_HEADER */
++#define BACKTRACE_HEADER <execinfo.h>
+ 
+ /* Define to 1 if you have the <CrashReporterClient.h> header file. */
+ /* #undef HAVE_CRASHREPORTERCLIENT_H */
+@@ -26,7 +26,7 @@
+ 
+ /* Define to 1 if you have the declaration of `arc4random', and to 0 if you
+    don't. */
+-#define HAVE_DECL_ARC4RANDOM 0
++#define HAVE_DECL_ARC4RANDOM 1
+ 
+ /* Define to 1 if you have the declaration of `FE_ALL_EXCEPT', and to 0 if you
+    don't. */
+@@ -50,7 +50,7 @@
+ #define HAVE_DLOPEN 1
+ 
+ /* Define if dladdr() is available on this platform. */
+-/* #undef HAVE_DLADDR */
++#define HAVE_DLADDR 1
+ 
+ /* Define to 1 if you have the <errno.h> header file. */
+ #define HAVE_ERRNO_H 1
+@@ -89,7 +89,7 @@
+ #define HAVE_ISATTY 1
+ 
+ /* Define to 1 if you have the `edit' library (-ledit). */
+-/* #undef HAVE_LIBEDIT */
++#define HAVE_LIBEDIT 1
+ 
+ /* Define to 1 if you have the `pfm' library (-lpfm). */
+ /* #undef HAVE_LIBPFM */
+@@ -107,25 +107,25 @@
+ /* #undef HAVE_PTHREAD_SETNAME_NP */
+ 
+ /* Define to 1 if you have the `z' library (-lz). */
+-/* #undef HAVE_LIBZ */
++#define HAVE_LIBZ 1
+ 
+ /* Define to 1 if you have the <link.h> header file. */
+ #define HAVE_LINK_H 1
+ 
+ /* Define to 1 if you have the `lseek64' function. */
+-#define HAVE_LSEEK64 1
++/* #undef HAVE_LSEEK64 */
+ 
+ /* Define to 1 if you have the <mach/mach.h> header file. */
+ /* #undef HAVE_MACH_MACH_H */
+ 
+ /* Define to 1 if you have the `mallctl' function. */
+-/* #undef HAVE_MALLCTL */
++#define HAVE_MALLCTL 1
+ 
+ /* Define to 1 if you have the `mallinfo' function. */
+-#define HAVE_MALLINFO 1
++/* #undef HAVE_MALLINFO */
+ 
+ /* Define to 1 if you have the <malloc.h> header file. */
+-#define HAVE_MALLOC_H 1
++/* #undef HAVE_MALLOC_H */
+ 
+ /* Define to 1 if you have the <malloc/malloc.h> header file. */
+ /* #undef HAVE_MALLOC_MALLOC_H */
+@@ -137,7 +137,7 @@
+ #define HAVE_POSIX_FALLOCATE 1
+ 
+ /* Define to 1 if you have the `posix_spawn' function. */
+-/* #undef HAVE_POSIX_SPAWN */
++#define HAVE_POSIX_SPAWN 1
+ 
+ /* Define to 1 if you have the `pread' function. */
+ #define HAVE_PREAD 1
+@@ -158,16 +158,16 @@
+ #define HAVE_REALPATH 1
+ 
+ /* Define to 1 if you have the `sbrk' function. */
+-#define HAVE_SBRK 1
++/* #undef HAVE_SBRK */
+ 
+ /* Define to 1 if you have the `setenv' function. */
+ #define HAVE_SETENV 1
+ 
+ /* Define to 1 if you have the `sched_getaffinity' function. */
+-#define HAVE_SCHED_GETAFFINITY 1
++/* #undef HAVE_SCHED_GETAFFINITY */
+ 
+ /* Define to 1 if you have the `CPU_COUNT' macro. */
+-#define HAVE_CPU_COUNT 1
++/* #undef HAVE_CPU_COUNT */
+ 
+ /* Define to 1 if you have the `setrlimit' function. */
+ #define HAVE_SETRLIMIT 1
+@@ -209,13 +209,13 @@
+ #define HAVE_SYS_TYPES_H 1
+ 
+ /* Define if the setupterm() function is supported this platform. */
+-/* #undef HAVE_TERMINFO */
++#define HAVE_TERMINFO 1
+ 
+ /* Define if the xar_open() function is supported this platform. */
+ /* #undef HAVE_LIBXAR */
+ 
+ /* Define to 1 if you have the <termios.h> header file. */
+-/* #undef HAVE_TERMIOS_H */
++#define HAVE_TERMIOS_H 1
+ 
+ /* Define to 1 if you have the <unistd.h> header file. */
+ #define HAVE_UNISTD_H 1
+@@ -224,7 +224,7 @@
+ /* #undef HAVE_VALGRIND_VALGRIND_H */
+ 
+ /* Define to 1 if you have the <zlib.h> header file. */
+-/* #undef HAVE_ZLIB_H */
++#define HAVE_ZLIB_H 1
+ 
+ /* Have host's _alloca */
+ /* #undef HAVE__ALLOCA */
+@@ -298,7 +298,7 @@
+ #elif defined(__arm__)
+ #define LLVM_DEFAULT_TARGET_TRIPLE "armv7-linux-gnueabihf"
+ #elif defined(__aarch64__)
+-#define LLVM_DEFAULT_TARGET_TRIPLE "aarch64-linux-gnu"
++#define LLVM_DEFAULT_TARGET_TRIPLE "aarch64-portbld-freebsd"
+ #elif defined(__mips__)
+ #define LLVM_DEFAULT_TARGET_TRIPLE "mipsel-linux-gnu"
+ #elif defined(__mips64)
+@@ -308,7 +308,7 @@
+ #endif
+ 
+ /* Define if zlib compression is available */
+-#define LLVM_ENABLE_ZLIB 0
++#define LLVM_ENABLE_ZLIB 1
+ 
+ /* Define if overriding target triple is enabled */
+ /* #undef LLVM_TARGET_TRIPLE_ENV */

Added: head/www/chromium/files/patch-third__party_swiftshader_third__party_llvm-7.0_configs_linux_include_llvm_Config_llvm-config.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/chromium/files/patch-third__party_swiftshader_third__party_llvm-7.0_configs_linux_include_llvm_Config_llvm-config.h	Wed Apr 17 20:46:31 2019	(r499210)
@@ -0,0 +1,20 @@
+--- third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/llvm-config.h.orig	2019-04-05 02:55:18.000000000 +0200
++++ third_party/swiftshader/third_party/llvm-7.0/configs/linux/include/llvm/Config/llvm-config.h	2019-04-17 10:09:09.340636000 +0200
+@@ -28,7 +28,7 @@
+ #elif defined(__arm__)
+ #define LLVM_DEFAULT_TARGET_TRIPLE "armv7-linux-gnueabihf"
+ #elif defined(__aarch64__)
+-#define LLVM_DEFAULT_TARGET_TRIPLE "aarch64-linux-gnu"
++#define LLVM_DEFAULT_TARGET_TRIPLE "aarch64-portbld-freebsd"
+ #elif defined(__mips__)
+ #define LLVM_DEFAULT_TARGET_TRIPLE "mipsel-linux-gnu"
+ #elif defined(__mips64)
+@@ -51,7 +51,7 @@
+ #elif defined(__arm__)
+ #define LLVM_HOST_TRIPLE "armv7-linux-gnueabihf"
+ #elif defined(__aarch64__)
+-#define LLVM_HOST_TRIPLE "aarch64-linux-gnu"
++#define LLVM_HOST_TRIPLE "aarch64-portbld-freebsd"
+ #elif defined(__mips__)
+ #define LLVM_HOST_TRIPLE "mipsel-linux-gnu"
+ #elif defined(__mips64)

Modified: head/www/chromium/files/patch-third__party_zlib_arm__features.c
==============================================================================
--- head/www/chromium/files/patch-third__party_zlib_arm__features.c	Wed Apr 17 20:39:38 2019	(r499209)
+++ head/www/chromium/files/patch-third__party_zlib_arm__features.c	Wed Apr 17 20:46:31 2019	(r499210)
@@ -1,28 +1,97 @@
---- third_party/zlib/arm_features.c.orig	2019-03-11 22:01:18 UTC
-+++ third_party/zlib/arm_features.c
-@@ -21,9 +21,10 @@ int ZLIB_INTERNAL arm_cpu_enable_pmull = 0;
- #include <asm/hwcap.h>
- #include <sys/auxv.h>
- #else
+--- third_party/zlib/arm_features.c.orig	2019-04-05 02:50:06.000000000 +0200
++++ third_party/zlib/arm_features.c	2019-04-15 14:59:36.552326000 +0200
+@@ -8,83 +8,30 @@
+ 
+ #include "zutil.h"
+ 
+-int ZLIB_INTERNAL arm_cpu_enable_crc32 = 0;
+-int ZLIB_INTERNAL arm_cpu_enable_pmull = 0;
+-
+-#if !defined(_MSC_VER)
+ #include <pthread.h>
+ #include <stdint.h>
++#include <machine/armreg.h>
++#include <sys/types.h>
+ 
+-#if defined(ARMV8_OS_ANDROID)
+-#include <cpu-features.h>
+-#elif defined(ARMV8_OS_LINUX)
+-#include <asm/hwcap.h>
+-#include <sys/auxv.h>
+-#else
 -#error ### No ARM CPU features detection in your platform/OS
-+/* #error ### No ARM CPU features detection in your platform/OS */
- #endif
+-#endif
++int ZLIB_INTERNAL arm_cpu_enable_crc32 = 0;
++int ZLIB_INTERNAL arm_cpu_enable_pmull = 0;
  
-+#ifdef ARMV8_OS_LINUX
  static pthread_once_t cpu_check_inited_once = PTHREAD_ONCE_INIT;
  
  static void init_arm_features(void)
-@@ -55,10 +56,13 @@ static void init_arm_features(void)
-     if (capabilities & flag_pmull)
+ {
+-    uint64_t flag_crc32 = 0, flag_pmull = 0, capabilities = 0;
++#if defined (__aarch64__)
++    uint64_t id_aa64isar0;
+ 
+-#if defined(ARMV8_OS_ANDROID)
+-    flag_crc32 = ANDROID_CPU_ARM_FEATURE_CRC32;
+-    flag_pmull = ANDROID_CPU_ARM_FEATURE_PMULL;
+-    capabilities = android_getCpuFeatures();
+-#elif defined(ARMV8_OS_LINUX)
+-    #if defined(__aarch64__)
+-        flag_crc32 = HWCAP_CRC32;
+-        flag_pmull = HWCAP_PMULL;
+-        capabilities = getauxval(AT_HWCAP);
+-    #elif defined(__ARM_NEON) || defined(__ARM_NEON__)
+-        /* The use of HWCAP2 is for getting features of newer ARMv8-A SoCs
+-         * while running in 32bits mode (i.e. aarch32).
+-         */
+-        flag_crc32 = HWCAP2_CRC32;
+-        flag_pmull = HWCAP2_PMULL;
+-        capabilities = getauxval(AT_HWCAP2);
+-    #endif
+-#endif
+-
+-    if (capabilities & flag_crc32)
+-        arm_cpu_enable_crc32 = 1;
+-
+-    if (capabilities & flag_pmull)
++    id_aa64isar0 = READ_SPECIALREG(ID_AA64ISAR0_EL1);
++    if (ID_AA64ISAR0_AES(id_aa64isar0) == ID_AA64ISAR0_AES_PMULL)
          arm_cpu_enable_pmull = 1;
- }
++    if (ID_AA64ISAR0_CRC32(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE)
++        arm_cpu_enable_crc32 = 1;
 +#endif
+ }
  
  void ZLIB_INTERNAL arm_check_features(void)
  {
-+#ifdef ARMV8_OS_LINUX
      pthread_once(&cpu_check_inited_once, init_arm_features);
-+#endif
  }
- #else
- #include <windows.h>
+-#else
+-#include <windows.h>
+-
+-static BOOL CALLBACK _arm_check_features(PINIT_ONCE once,
+-                                         PVOID param,
+-                                         PVOID *context);
+-static INIT_ONCE cpu_check_inited_once = INIT_ONCE_STATIC_INIT;
+-
+-
+-void ZLIB_INTERNAL arm_check_features(void)
+-{
+-    InitOnceExecuteOnce(&cpu_check_inited_once, _arm_check_features,
+-                        NULL, NULL);
+-}
+-
+-static BOOL CALLBACK _arm_check_features(PINIT_ONCE once,
+-                                         PVOID param,
+-                                         PVOID *context)
+-{
+-    if (IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE))
+-        arm_cpu_enable_crc32 = 1;
+-
+-    if (IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE))
+-        arm_cpu_enable_pmull = 1;
+-
+-    return TRUE;
+-}
+-#endif /* _MSC_VER */

Added: head/www/chromium/files/patch-tools_gn_util_sys__info.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/www/chromium/files/patch-tools_gn_util_sys__info.cc	Wed Apr 17 20:46:31 2019	(r499210)
@@ -0,0 +1,11 @@
+--- tools/gn/util/sys_info.cc.orig	2019-04-04 13:16:59.443413000 +0200
++++ tools/gn/util/sys_info.cc	2019-04-04 13:17:14.281724000 +0200
+@@ -28,6 +28,8 @@ std::string OperatingSystemArchitecture() {
+     arch = "x86";
+   } else if (arch == "amd64") {
+     arch = "x86_64";
++  } else if (arch == "arm64") {
++    arch = "aarch64";
+   } else if (std::string(info.sysname) == "AIX") {
+     arch = "ppc64";
+   }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904172046.x3HKkVUx004074>