Index: branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn =================================================================== --- branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn (revision 497979) +++ branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_build_config_compiler_BUILD.gn (revision 497980) @@ -1,65 +1,79 @@ --- src/3rdparty/chromium/build/config/compiler/BUILD.gn.orig 2018-11-13 18:25:11 UTC +++ src/3rdparty/chromium/build/config/compiler/BUILD.gn @@ -55,7 +55,7 @@ declare_args() { # only two architectures that are currently checked in). Turn this off when # you are using a custom toolchain and need to control -B in cflags. linux_use_bundled_binutils = - linux_use_bundled_binutils_override && is_linux && + linux_use_bundled_binutils_override && (is_linux && !is_bsd) && (current_cpu == "x64" || current_cpu == "x86") binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", root_build_dir) @@ -269,7 +269,7 @@ config("compiler") { # Linker warnings. if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") && !(is_android && use_order_profiling) && !is_mac && !is_ios && - current_os != "aix") { + current_os != "aix" && !is_bsd) { # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1 # crbug.com/485542 @@ -507,7 +507,7 @@ config("compiler") { } if (is_clang && !is_nacl && current_toolchain == host_toolchain && - target_os != "chromeos" && !use_qt) { + target_os != "chromeos" && !is_bsd && !use_qt) { cflags += [ # TODO(hans): Remove this once Clang generates better optimized debug info # by default. https://crbug.com/765793 +@@ -747,11 +747,11 @@ config("compiler_cpu_abi") { + ] + } + } else if (current_cpu == "arm") { +- if (is_clang && !is_android && !is_nacl) { ++ if (is_clang && !is_android && !is_nacl && !is_bsd) { + cflags += [ "--target=arm-linux-gnueabihf" ] + ldflags += [ "--target=arm-linux-gnueabihf" ] + } +- if (!is_nacl) { ++ if (!is_nacl && !is_bsd) { + cflags += [ + "-march=$arm_arch", + "-mfloat-abi=$arm_float_abi", @@ -761,7 +761,7 @@ config("compiler_cpu_abi") { cflags += [ "-mtune=$arm_tune" ] } } else if (current_cpu == "arm64") { - if (is_clang && !is_android && !is_nacl && !is_fuchsia) { + if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) { cflags += [ "--target=aarch64-linux-gnu" ] ldflags += [ "--target=aarch64-linux-gnu" ] } @@ -1681,7 +1681,7 @@ config("thin_archive") { # Mac and iOS use the mac-specific "libtool" command, not ar, which doesn't # have a "thin archive" mode (it does accept -T, but it means truncating # archive names to 16 characters, which is not what we want). - if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) { + if ((is_posix && !is_nacl && !is_mac && !is_ios && !is_bsd) || is_fuchsia) { arflags = [ "-T" ] } } @@ -2216,7 +2216,7 @@ config("symbols") { # [1] crrev.com/a81d5ade0b043208e06ad71a38bcf9c348a1a52f cflags += [ "-gdwarf-3" ] } - cflags += [ "-g2" ] + cflags += [ "-g0" ] } if (use_debug_fission && !is_nacl && !is_android) { # NOTE: Some Chrome OS builds globally set |use_debug_fission| to true, @@ -2236,7 +2236,7 @@ config("symbols") { # DWARF info may be corrupt; offsets in a range list entry are in different # sections" there. Maybe just a bug in nacl_switch_32.S. if (!is_mac && !is_ios && !is_nacl && target_cpu != "x86" && - (use_gold || use_lld)) { + (use_gold || use_lld) && !is_bsd) { if (is_clang) { # This flag enables the GNU-format pubnames and pubtypes sections, # which lld needs in order to generate a correct GDB index. Index: branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crc32c_src_src_crc32c__arm64__linux__check.h =================================================================== --- branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crc32c_src_src_crc32c__arm64__linux__check.h (revision 497979) +++ branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_crc32c_src_src_crc32c__arm64__linux__check.h (revision 497980) @@ -1,19 +1,35 @@ ---- src/3rdparty/chromium/third_party/crc32c/src/src/crc32c_arm64_linux_check.h.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/third_party/crc32c/src/src/crc32c_arm64_linux_check.h.orig 2019-01-16 11:59:47 UTC +++ src/3rdparty/chromium/third_party/crc32c/src/src/crc32c_arm64_linux_check.h -@@ -29,6 +29,8 @@ extern "C" unsigned long getauxval(unsigned long type) - namespace crc32c { +@@ -16,6 +16,24 @@ - 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 - } + #if HAVE_ARM64_CRC32C ++#if defined(__FreeBSD__) ++#include ++#include ++namespace crc32c { ++ ++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 ++ ++#elif defined(__linux__) + #if HAVE_STRONG_GETAUXVAL + #include + #elif HAVE_WEAK_GETAUXVAL +@@ -43,6 +61,7 @@ inline bool CanUseArm64Linux() { + } // namespace crc32c + ++#endif + #endif // HAVE_ARM64_CRC32C + + #endif // CRC32C_CRC32C_ARM_LINUX_CHECK_H_ Index: branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_core_SkCpu.cpp =================================================================== --- branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_core_SkCpu.cpp (revision 497979) +++ branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_core_SkCpu.cpp (revision 497980) @@ -1,19 +1,36 @@ ---- src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp.orig 2019-01-16 10:59:47 UTC +++ src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp -@@ -74,6 +74,8 @@ +@@ -70,6 +70,20 @@ + return features; + } + ++#elif defined(SK_CPU_ARM64) && defined(__FreeBSD__) ++ #include ++ ++ 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(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) { ++ features |= SkCpu::CRC32; ++ } ++ return features; ++ } ++ + #elif defined(SK_CPU_ARM64) && __has_include() #include - static uint32_t read_cpu_features() { -+return 0; -+#if 0 - const uint32_t kHWCAP_CRC32 = (1<< 7), - kHWCAP_ASIMDHP = (1<<10); +@@ -95,7 +109,12 @@ + const uint32_t kHWCAP_VFPv4 = (1<<16); -@@ -82,6 +84,7 @@ - if (hwcaps & kHWCAP_CRC32 ) { features |= SkCpu::CRC32; } - if (hwcaps & kHWCAP_ASIMDHP) { features |= SkCpu::ASIMDHP; } - return features; + uint32_t features = 0; ++#if defined(__FreeBSD__) ++ uint32_t hwcaps = 0; ++ elf_aux_info(AT_HWCAP, &hwcaps, sizeof(hwcaps)); ++#else + uint32_t hwcaps = getauxval(AT_HWCAP); +#endif - } - - #elif defined(SK_CPU_ARM32) && __has_include() && \ + if (hwcaps & kHWCAP_NEON ) { + features |= SkCpu::NEON; + if (hwcaps & kHWCAP_VFPv4) { features |= SkCpu::NEON_FMA|SkCpu::VFP_FP16; } Index: branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_opts_SkRasterPipeline__opts.h =================================================================== --- branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_opts_SkRasterPipeline__opts.h (nonexistent) +++ branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_opts_SkRasterPipeline__opts.h (revision 497980) @@ -0,0 +1,26 @@ +--- src/3rdparty/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h.orig 2019-01-16 10:59:47 UTC ++++ src/3rdparty/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h +@@ -657,7 +657,10 @@ SI F approx_powf(F x, F y) { + } + + SI F from_half(U16 h) { +-#if defined(__ARM_FP16_FORMAT_IEEE) ++#if defined(__ARM_FP16_FORMAT_IEEE) && defined(__aarch64__) ++ return vcvt_f32_f16(h); ++ ++#elif defined(__ARM_FP16_FORMAT_IEEE) + __fp16 fp16; + memcpy(&fp16, &h, sizeof(U16)); + return float(fp16); +@@ -679,7 +682,10 @@ SI F from_half(U16 h) { + } + + SI U16 to_half(F f) { +-#if defined(__ARM_FP16_FORMAT_IEEE) ++#if defined(__ARM_FP16_FORMAT_IEEE) && defined(__aarch64__) ++ return vcvt_f16_f32(f); ++ ++#elif defined(__ARM_FP16_FORMAT_IEEE) + __fp16 fp16 = __fp16(f); + U16 u16; + memcpy(&u16, &fp16, sizeof(U16)); Property changes on: branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_skia_src_opts_SkRasterPipeline__opts.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_zlib_arm__features.c =================================================================== --- branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_zlib_arm__features.c (revision 497979) +++ branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_zlib_arm__features.c (revision 497980) @@ -1,29 +1,54 @@ ---- src/3rdparty/chromium/third_party/zlib/arm_features.c.orig 2018-11-13 18:25:11 UTC +--- src/3rdparty/chromium/third_party/zlib/arm_features.c.orig 2019-01-16 11:59:47 UTC +++ src/3rdparty/chromium/third_party/zlib/arm_features.c -@@ -16,12 +16,13 @@ +@@ -10,20 +10,33 @@ + #include + #include + +-#if defined(ARMV8_OS_ANDROID) ++int ZLIB_INTERNAL arm_cpu_enable_crc32 = 0; ++int ZLIB_INTERNAL arm_cpu_enable_pmull = 0; ++ ++static pthread_once_t cpu_check_inited_once = PTHREAD_ONCE_INIT; ++ ++#if defined (__FreeBSD__) ++#include ++#include ++static void init_arm_features(void) ++{ ++#if defined (__aarch64__) ++ uint64_t id_aa64isar0; ++ ++ 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 ++} ++#elif defined(ARMV8_OS_ANDROID) + #include + #elif defined(ARMV8_OS_LINUX) #include #include - #else +-#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; +-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 pthread_once_t cpu_check_inited_once = PTHREAD_ONCE_INIT; +- static void init_arm_features(void) -@@ -53,8 +54,11 @@ static void init_arm_features(void) + { + uint64_t flag_crc32 = 0, flag_pmull = 0, capabilities = 0; +@@ -53,6 +66,9 @@ static void init_arm_features(void) if (capabilities & flag_pmull) arm_cpu_enable_pmull = 1; } ++#else ++#error ### No ARM CPU features detection in your platform/OS +#endif void ZLIB_INTERNAL arm_check_features(void) { -+#ifdef ARMV8_OS_LINUX - pthread_once(&cpu_check_inited_once, init_arm_features); -+#endif - } Index: branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_arm_cpu-arm.cc =================================================================== --- branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_arm_cpu-arm.cc (nonexistent) +++ branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_arm_cpu-arm.cc (revision 497980) @@ -0,0 +1,22 @@ +--- src/3rdparty/chromium/v8/src/arm/cpu-arm.cc.orig 2019-01-16 10:59:47 UTC ++++ src/3rdparty/chromium/v8/src/arm/cpu-arm.cc +@@ -7,6 +7,9 @@ + #ifdef __QNXNTO__ + #include // for cache flushing. + #undef MAP_TYPE ++#elif defined(__FreeBSD__) ++#include ++#include // for cache flushing. + #else + #include // for cache flushing. + #endif +@@ -24,6 +27,9 @@ void CpuFeatures::FlushICache(void* start, size_t size + #if !defined(USE_SIMULATOR) + #if V8_OS_QNX + msync(start, size, MS_SYNC | MS_INVALIDATE_ICACHE); ++#elif defined(__FreeBSD__) ++ struct arm_sync_icache_args args = { .addr = (uintptr_t)start, .len = size }; ++ sysarch(ARM_SYNC_ICACHE, (void *)&args); + #else + register uint32_t beg asm("r0") = reinterpret_cast(start); + register uint32_t end asm("r1") = beg + size; Property changes on: branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_arm_cpu-arm.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-freebsd.cc =================================================================== --- branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-freebsd.cc (nonexistent) +++ branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-freebsd.cc (revision 497980) @@ -0,0 +1,50 @@ +--- src/3rdparty/chromium/v8/src/base/platform/platform-freebsd.cc.orig 2019-01-16 10:59:47 UTC ++++ src/3rdparty/chromium/v8/src/base/platform/platform-freebsd.cc +@@ -86,5 +86,47 @@ std::vector OS::GetSharedLib + + void OS::SignalCodeMovingGC() {} + ++#ifdef __arm__ ++ ++bool OS::ArmUsingHardFloat() { ++// GCC versions 4.6 and above define __ARM_PCS or __ARM_PCS_VFP to specify ++// the Floating Point ABI used (PCS stands for Procedure Call Standard). ++// We use these as well as a couple of other defines to statically determine ++// what FP ABI used. ++// GCC versions 4.4 and below don't support hard-fp. ++// GCC versions 4.5 may support hard-fp without defining __ARM_PCS or ++// __ARM_PCS_VFP. ++ ++#define GCC_VERSION \ ++ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) ++#if GCC_VERSION >= 40600 && !defined(__clang__) ++#if defined(__ARM_PCS_VFP) ++ return true; ++#else ++ return false; ++#endif ++ ++#elif GCC_VERSION < 40500 && !defined(__clang__) ++ return false; ++ ++#else ++#if defined(__ARM_PCS_VFP) ++ return true; ++#elif defined(__ARM_PCS) || defined(__SOFTFP__) || defined(__SOFTFP) || \ ++ !defined(__VFP_FP__) ++ return false; ++#else ++#error \ ++ "Your version of compiler does not report the FP ABI compiled for." \ ++ "Please report it on this issue" \ ++ "http://code.google.com/p/v8/issues/detail?id=2140" ++ ++#endif ++#endif ++#undef GCC_VERSION ++} ++ ++#endif // def __arm__ ++ + } // namespace base + } // namespace v8 Property changes on: branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_base_platform_platform-freebsd.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_libsampler_sampler.cc =================================================================== --- branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_libsampler_sampler.cc (nonexistent) +++ branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_libsampler_sampler.cc (revision 497980) @@ -0,0 +1,15 @@ +--- src/3rdparty/chromium/v8/src/libsampler/sampler.cc.orig 2019-01-16 10:59:47 UTC ++++ src/3rdparty/chromium/v8/src/libsampler/sampler.cc +@@ -550,9 +550,9 @@ void SignalHandler::FillRegisterState(void* context, R + state->sp = reinterpret_cast(mcontext.mc_rsp); + state->fp = reinterpret_cast(mcontext.mc_rbp); + #elif V8_HOST_ARCH_ARM +- state->pc = reinterpret_cast(mcontext.mc_r15); +- state->sp = reinterpret_cast(mcontext.mc_r13); +- state->fp = reinterpret_cast(mcontext.mc_r11); ++ state->pc = reinterpret_cast(mcontext.__gregs[_REG_PC]); ++ state->sp = reinterpret_cast(mcontext.__gregs[_REG_SP]); ++ state->fp = reinterpret_cast(mcontext.__gregs[_REG_FP]); + #endif // V8_HOST_ARCH_* + #elif V8_OS_NETBSD + #if V8_HOST_ARCH_IA32 Property changes on: branches/2019Q2/www/qt5-webengine/files/patch-src_3rdparty_chromium_v8_src_libsampler_sampler.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2019Q2 =================================================================== --- branches/2019Q2 (revision 497979) +++ branches/2019Q2 (revision 497980) Property changes on: branches/2019Q2 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r497877