summaryrefslogtreecommitdiffstats
path: root/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium')
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0001-chromium-Force-host-toolchain-configuration.patch33
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0001-chromium-workaround-for-too-long-.rps-file-name.patch (renamed from external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-workaround-for-too-long-.rps-file-name.patch)16
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-stack-pointer-clobber.patch49
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-Fix-build-with-gcc8.patch50
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-fix-build-with-clang.patch91
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Exclude-CRC32-for-32bit-arm.patch33
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch38
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-aarch64-skia-build-fix.patch64
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-fix-build-after-y2038-changes-in-glibc.patch28
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch68
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Include-cstddef-for-size_t-definition.patch48
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-Move-CharAllocator-definition-to-a-header-f.patch554
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.patch50
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch (renamed from external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch)6
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch32
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch (renamed from external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch)35
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-include-fcntl.h-for-loff_t.patch (renamed from external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-musl-include-fcntl.h-for-loff_t.patch)6
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-include-asm-generic-ioctl.h-for-TCGETS.patch22
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-use-off64_t-instead-of-the-internal-__.patch (renamed from external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-use-off64_t-instead-of-the-internal-__.patch)16
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-linux-glibc-make-the-distinction.patch (renamed from external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-linux-glibc-make-the-distinction.patch)4
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-tcmalloc-Use-off64_t-insread-of-__off6.patch23
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch (renamed from external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch)6
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Use-correct-member-name-__si_fields-fr.patch (renamed from external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-Use-correct-member-name-__si_fields-fr.patch)2
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch (renamed from external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch)10
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-Do-not-define-__sbrk-on-musl.patch (renamed from external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Do-not-define-__sbrk-on-musl.patch)14
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-Adjust-default-pthread-stack-size.patch (renamed from external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Adjust-default-pthread-stack-size.patch)22
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch (renamed from external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch)4
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch (renamed from external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch)4
-rw-r--r--external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0023-chromium-musl-pread-pwrite.patch31
29 files changed, 1151 insertions, 208 deletions
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0001-chromium-Force-host-toolchain-configuration.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0001-chromium-Force-host-toolchain-configuration.patch
deleted file mode 100644
index 8bf2140b..00000000
--- a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0001-chromium-Force-host-toolchain-configuration.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From a80fc13086a493cc543e29c5d10e976ac7f680d4 Mon Sep 17 00:00:00 2001
-From: Samuli Piippo <samuli.piippo@qt.io>
-Date: Wed, 15 Mar 2017 13:53:28 +0200
-Subject: [PATCH] chromium: Force host toolchain configuration
-
-Force gcc/g++ to be used for parts using host toolchain, since
-the option(host_build) does not work in yocto builds.
-
-Upstream-Status: Inappropriate [OE specific]
-Signed-off-by: Samuli Piippo <samuli.piippo@qt.io>
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
----
- chromium/tools/gn/bootstrap/bootstrap.py | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/chromium/tools/gn/bootstrap/bootstrap.py b/chromium/tools/gn/bootstrap/bootstrap.py
-index 93c6446f28c..0fe7e6737d2 100755
---- a/chromium/tools/gn/bootstrap/bootstrap.py
-+++ b/chromium/tools/gn/bootstrap/bootstrap.py
-@@ -352,10 +352,10 @@ def write_gn_ninja(path, root_gen_dir, options):
- ld = os.environ.get('LD', cxx)
- ar = os.environ.get('AR', 'ar -X64')
- else:
-- cc = os.environ.get('CC', 'cc')
-- cxx = os.environ.get('CXX', 'c++')
-+ cc = os.environ.get('CC_host', 'gcc')
-+ cxx = os.environ.get('CXX_host', 'g++')
- ld = cxx
-- ar = os.environ.get('AR', 'ar')
-+ ar = os.environ.get('AR_host', 'ar')
-
- # QTBUG-64759
- # cflags = os.environ.get('CFLAGS', '').split()
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-workaround-for-too-long-.rps-file-name.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0001-chromium-workaround-for-too-long-.rps-file-name.patch
index f80f7b0a..ff2cf2ed 100644
--- a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-workaround-for-too-long-.rps-file-name.patch
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0001-chromium-workaround-for-too-long-.rps-file-name.patch
@@ -1,4 +1,4 @@
-From 70c519aa0eb4da6565ad78914a8687b6f5bf1bb8 Mon Sep 17 00:00:00 2001
+From 8dc7d83d58f6f036d021ed27dd05322b654e21bf Mon Sep 17 00:00:00 2001
From: Samuli Piippo <samuli.piippo@qt.io>
Date: Thu, 30 Mar 2017 11:37:24 +0300
Subject: [PATCH] chromium: workaround for too long .rps file name
@@ -14,14 +14,14 @@ le.rsp): Unable to create file. File name too long
Task-number: QTBUG-59769
Change-Id: I73c5e64ae5174412be2a675e35b0b6047f2bf4c1
---
- chromium/tools/gn/ninja_action_target_writer.cc | 9 +++++++++
+ gn/tools/gn/ninja_action_target_writer.cc | 9 +++++++++
1 file changed, 9 insertions(+)
-diff --git a/chromium/tools/gn/ninja_action_target_writer.cc b/chromium/tools/gn/ninja_action_target_writer.cc
-index bab07c5d2bb..8f889aebc18 100644
---- a/chromium/tools/gn/ninja_action_target_writer.cc
-+++ b/chromium/tools/gn/ninja_action_target_writer.cc
-@@ -117,9 +117,18 @@ std::string NinjaActionTargetWriter::WriteRuleDefinition() {
+diff --git a/gn/tools/gn/ninja_action_target_writer.cc b/gn/tools/gn/ninja_action_target_writer.cc
+index 7e945c0de0e..3deb587668c 100644
+--- a/gn/tools/gn/ninja_action_target_writer.cc
++++ b/gn/tools/gn/ninja_action_target_writer.cc
+@@ -118,9 +118,18 @@ std::string NinjaActionTargetWriter::WriteRuleDefinition() {
// strictly necessary for regular one-shot actions, but it's easier to
// just always define unique_name.
std::string rspfile = custom_rule_name;
@@ -30,7 +30,7 @@ index bab07c5d2bb..8f889aebc18 100644
+ //please note ".$unique_name" is not used at the moment
+ int pos = 0;
+ std::string delimiter("_");
-+ while (rspfile.length() > 251 && (pos = rspfile.find_last_of(delimiter)) != std::string::npos)
++ while (rspfile.length() > 250 && (pos = rspfile.find_last_of(delimiter)) != std::string::npos)
+ rspfile = rspfile.substr(0,pos);
+
if (!target_->sources().empty())
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-stack-pointer-clobber.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-stack-pointer-clobber.patch
new file mode 100644
index 00000000..e2e86212
--- /dev/null
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-stack-pointer-clobber.patch
@@ -0,0 +1,49 @@
+From dcc7962a9e9eb8fc10728df0b72e91794d1ee9d9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 23 Dec 2018 16:58:04 -0800
+Subject: [PATCH] chromium: stack pointer clobber
+
+Do not add stack pointer to clobber list
+
+it was being ignored until gcc 9.0 became capable
+of flagging this silent ignoring via [1]
+
+[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813<Paste>
+
+Upstream-Status: Submitted [https://chromium-review.googlesource.com/c/linux-syscall-support/+/1390160]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ chromium/third_party/lss/linux_syscall_support.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/chromium/third_party/lss/linux_syscall_support.h b/chromium/third_party/lss/linux_syscall_support.h
+index 9276f5627af..622cc1fbf7e 100644
+--- a/chromium/third_party/lss/linux_syscall_support.h
++++ b/chromium/third_party/lss/linux_syscall_support.h
+@@ -2012,7 +2012,7 @@ struct kernel_statfs {
+ : "i" (__NR_##name), "ri" ((long)(arg1)), \
+ "c" ((long)(arg2)), "d" ((long)(arg3)), \
+ "S" ((long)(arg4)), "D" ((long)(arg5)) \
+- : "esp", "memory"); \
++ : "memory"); \
+ LSS_RETURN(type,__res); \
+ }
+ #undef _syscall6
+@@ -2034,7 +2034,7 @@ struct kernel_statfs {
+ : "i" (__NR_##name), "0" ((long)(&__s)), \
+ "c" ((long)(arg2)), "d" ((long)(arg3)), \
+ "S" ((long)(arg4)), "D" ((long)(arg5)) \
+- : "esp", "memory"); \
++ : "memory"); \
+ LSS_RETURN(type,__res); \
+ }
+ LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack,
+@@ -2120,7 +2120,7 @@ struct kernel_statfs {
+ : "0"(-EINVAL), "i"(__NR_clone),
+ "m"(fn), "m"(child_stack), "m"(flags), "m"(arg),
+ "m"(parent_tidptr), "m"(newtls), "m"(child_tidptr)
+- : "esp", "memory", "ecx", "edx", "esi", "edi");
++ : "memory", "ecx", "edx", "esi", "edi");
+ LSS_RETURN(int, __res);
+ }
+
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-Fix-build-with-gcc8.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-Fix-build-with-gcc8.patch
deleted file mode 100644
index 5323a0f1..00000000
--- a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-Fix-build-with-gcc8.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From ad0dd667c3459538149de4479d18c1793af91d43 Mon Sep 17 00:00:00 2001
-From: Martin Jansa <Martin.Jansa@gmail.com>
-Date: Tue, 5 Jun 2018 13:58:16 +0000
-Subject: [PATCH] chromium: Fix build with gcc8
-
----
- chromium/mojo/public/c/system/buffer.h | 2 +-
- chromium/mojo/public/c/system/data_pipe.h | 2 +-
- chromium/mojo/public/c/system/message_pipe.h | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/chromium/mojo/public/c/system/buffer.h b/chromium/mojo/public/c/system/buffer.h
-index 09f6d285f3e..e516a09e498 100644
---- a/chromium/mojo/public/c/system/buffer.h
-+++ b/chromium/mojo/public/c/system/buffer.h
-@@ -35,7 +35,7 @@ const MojoCreateSharedBufferOptionsFlags
- ((MojoCreateSharedBufferOptionsFlags)0)
- #endif
-
--MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment");
-+MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 4 || MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment");
- struct MOJO_ALIGNAS(8) MojoCreateSharedBufferOptions {
- uint32_t struct_size;
- MojoCreateSharedBufferOptionsFlags flags;
-diff --git a/chromium/mojo/public/c/system/data_pipe.h b/chromium/mojo/public/c/system/data_pipe.h
-index 62adbea1ea6..76225858ba8 100644
---- a/chromium/mojo/public/c/system/data_pipe.h
-+++ b/chromium/mojo/public/c/system/data_pipe.h
-@@ -46,7 +46,7 @@ const MojoCreateDataPipeOptionsFlags MOJO_CREATE_DATA_PIPE_OPTIONS_FLAG_NONE =
- ((MojoCreateDataPipeOptionsFlags)0)
- #endif
-
--MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment");
-+MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 4 || MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment");
- struct MOJO_ALIGNAS(8) MojoCreateDataPipeOptions {
- MOJO_ALIGNAS(4) uint32_t struct_size;
- MOJO_ALIGNAS(4) MojoCreateDataPipeOptionsFlags flags;
-diff --git a/chromium/mojo/public/c/system/message_pipe.h b/chromium/mojo/public/c/system/message_pipe.h
-index f0f69d1025f..364a02971e2 100644
---- a/chromium/mojo/public/c/system/message_pipe.h
-+++ b/chromium/mojo/public/c/system/message_pipe.h
-@@ -44,7 +44,7 @@ const MojoCreateMessagePipeOptionsFlags
- ((MojoCreateMessagePipeOptionsFlags)0)
- #endif
-
--MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment");
-+MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 4 || MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment");
- struct MOJO_ALIGNAS(8) MojoCreateMessagePipeOptions {
- uint32_t struct_size;
- MojoCreateMessagePipeOptionsFlags flags;
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-fix-build-with-clang.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-fix-build-with-clang.patch
new file mode 100644
index 00000000..55f61d03
--- /dev/null
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-fix-build-with-clang.patch
@@ -0,0 +1,91 @@
+From e44d59aff5c23049ed765d872b167c27f9d2be23 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 2 Feb 2019 19:28:59 -0800
+Subject: [PATCH] chromium: fix build with clang
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ chromium/build/config/compiler/BUILD.gn | 27 ++-----------------------
+ 1 file changed, 2 insertions(+), 25 deletions(-)
+
+diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn
+index be485fd89b9..7179df05451 100644
+--- a/chromium/build/config/compiler/BUILD.gn
++++ b/chromium/build/config/compiler/BUILD.gn
+@@ -773,8 +773,6 @@ config("compiler_cpu_abi") {
+ }
+ } else if (current_cpu == "arm") {
+ if (is_clang && !is_android && !is_nacl) {
+- cflags += [ "--target=arm-linux-gnueabihf" ]
+- ldflags += [ "--target=arm-linux-gnueabihf" ]
+ }
+ if (!is_nacl) {
+ cflags += [
+@@ -787,8 +785,6 @@ config("compiler_cpu_abi") {
+ }
+ } else if (current_cpu == "arm64") {
+ if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
+- cflags += [ "--target=aarch64-linux-gnu" ]
+- ldflags += [ "--target=aarch64-linux-gnu" ]
+ }
+ } else if (current_cpu == "mipsel" && !is_nacl) {
+ ldflags += [ "-Wl,--hash-style=sysv" ]
+@@ -797,9 +793,6 @@ config("compiler_cpu_abi") {
+ if (is_android) {
+ cflags += [ "--target=mipsel-linux-android" ]
+ ldflags += [ "--target=mipsel-linux-android" ]
+- } else {
+- cflags += [ "--target=mipsel-linux-gnu" ]
+- ldflags += [ "--target=mipsel-linux-gnu" ]
+ }
+ } else {
+ cflags += [ "-EL" ]
+@@ -878,10 +871,7 @@ config("compiler_cpu_abi") {
+ } else if (current_cpu == "mips" && !is_nacl) {
+ ldflags += [ "-Wl,--hash-style=sysv" ]
+ if (custom_toolchain == "") {
+- if (is_clang) {
+- cflags += [ "--target=mips-linux-gnu" ]
+- ldflags += [ "--target=mips-linux-gnu" ]
+- } else {
++ if (!is_clang) {
+ cflags += [ "-EB" ]
+ ldflags += [ "-EB" ]
+ }
+@@ -928,9 +918,6 @@ config("compiler_cpu_abi") {
+ if (is_android) {
+ cflags += [ "--target=mips64el-linux-android" ]
+ ldflags += [ "--target=mips64el-linux-android" ]
+- } else {
+- cflags += [ "--target=mips64el-linux-gnuabi64" ]
+- ldflags += [ "--target=mips64el-linux-gnuabi64" ]
+ }
+ } else {
+ cflags += [
+@@ -987,10 +974,7 @@ config("compiler_cpu_abi") {
+ } else if (current_cpu == "mips64") {
+ ldflags += [ "-Wl,--hash-style=sysv" ]
+ if (custom_toolchain == "") {
+- if (is_clang) {
+- cflags += [ "--target=mips64-linux-gnuabi64" ]
+- ldflags += [ "--target=mips64-linux-gnuabi64" ]
+- } else {
++ if (!is_clang) {
+ cflags += [
+ "-EB",
+ "-mabi=64",
+@@ -1169,13 +1153,6 @@ config("compiler_deterministic") {
+ }
+ }
+ }
+-
+- # Tells the compiler not to use absolute paths when passing the default
+- # paths to the tools it invokes. We don't want this because we don't
+- # really need it and it can mess up the goma cache entries.
+- if (is_clang && !is_nacl) {
+- cflags += [ "-no-canonical-prefixes" ]
+- }
+ }
+
+ config("clang_revision") {
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Exclude-CRC32-for-32bit-arm.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Exclude-CRC32-for-32bit-arm.patch
new file mode 100644
index 00000000..e5c1dcbd
--- /dev/null
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Exclude-CRC32-for-32bit-arm.patch
@@ -0,0 +1,33 @@
+From fc3765e4f2f8cff17a13736085a402425696e6e7 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 5 Feb 2019 14:32:20 -0800
+Subject: [PATCH] chromium: Exclude CRC32 for 32bit arm
+
+This fixes build issues during cross compiling for linux using clang
+
+Fixes
+src/3rdparty/chromium/third_party/zlib/crc32_simd.c:184: undefined reference to `__crc32d'
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ chromium/third_party/zlib/BUILD.gn | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/chromium/third_party/zlib/BUILD.gn b/chromium/third_party/zlib/BUILD.gn
+index 29dda54ac20..6870dbb9f08 100644
+--- a/chromium/third_party/zlib/BUILD.gn
++++ b/chromium/third_party/zlib/BUILD.gn
+@@ -78,8 +78,11 @@ if (use_arm_neon_optimizations) {
+ # Disabled for iPhone, as described in DDI0487C_a_armv8_arm:
+ # "All implementations of the ARMv8.1 architecture are required to
+ # implement the CRC32* instructions. These are optional in ARMv8.0."
++ defines = []
+ if (!is_ios) {
+- defines = [ "CRC32_ARMV8_CRC32" ]
++ if (current_cpu == "arm64") {
++ defines += [ "CRC32_ARMV8_CRC32" ]
++ }
+ if (is_android) {
+ defines += [ "ARMV8_OS_ANDROID" ]
+ } else if (is_linux || is_chromeos) {
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch
new file mode 100644
index 00000000..c9df775d
--- /dev/null
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch
@@ -0,0 +1,38 @@
+From 998a4037e9c057c9735d8b0df57c2eca5b452d0b Mon Sep 17 00:00:00 2001
+From: Johannes Pointner <johannes.pointner@br-automation.com>
+Date: Fri, 3 May 2019 09:12:38 +0200
+Subject: [PATCH] chromium: Do not try to set the guessed values for
+ march/mtune/float-abi OE config machinary has computed these values already
+ and fed it via compiler cmdline to chromium build
+
+I think upstream should check for the values on compiler cmdline
+before overriding these
+
+Upstream-Status: Inappropriate [OE-Specific]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Johannes Pointner <johannes.pointner@br-automation.com>
+---
+ chromium/build/config/compiler/BUILD.gn | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn
+index 7179df05451..884c9714bbb 100644
+--- a/chromium/build/config/compiler/BUILD.gn
++++ b/chromium/build/config/compiler/BUILD.gn
+@@ -774,15 +774,6 @@ config("compiler_cpu_abi") {
+ } else if (current_cpu == "arm") {
+ if (is_clang && !is_android && !is_nacl) {
+ }
+- if (!is_nacl) {
+- cflags += [
+- "-march=$arm_arch",
+- "-mfloat-abi=$arm_float_abi",
+- ]
+- }
+- if (arm_tune != "") {
+- cflags += [ "-mtune=$arm_tune" ]
+- }
+ } else if (current_cpu == "arm64") {
+ if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
+ }
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-aarch64-skia-build-fix.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-aarch64-skia-build-fix.patch
new file mode 100644
index 00000000..6a659ae9
--- /dev/null
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-aarch64-skia-build-fix.patch
@@ -0,0 +1,64 @@
+From 2ce7742c9dfde9ccbf2ede0db6359beb18c49189 Mon Sep 17 00:00:00 2001
+From: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+Date: Thu, 8 Mar 2018 15:39:55 +0100
+Subject: [PATCH] chromium: aarch64 skia build fix
+
+Upstream-Status: Inappropriate
+
+GCC (tested rocko's 7.3.0) cannot find these intrinsics and the build fails:
+
+../../third_party/skia/src/opts/SkRasterPipeline_opts.h: In function 'neon::F neon::from_half(neon::U16)':
+../../third_party/skia/src/opts/SkRasterPipeline_opts.h:657:26: error: cannot convert 'neon::U16 {aka short unsigned int}' to 'float16x4_ t {aka __vector(4) __ fp16}' for argument '1' to '
+float32x4_t vcvt_f32_f16(float16x4_t)'
+ return vcvt_f32_f16(h);
+ ^
+../../third_party/skia/src/opts/SkRasterPipeline_opts.h: In function 'neon::U16 neon::to_half(neon::F)':
+../../third_party/skia/src/opts/SkRasterPipeline_opts.h:677:26: error: cannot convert 'neon::F {aka float}' to 'float32x4_t {aka __vector (4) float}' for argum ent '1' to 'float16x4_t vcvt
+_f16_f32(float32x4_t)'
+ return vcvt_f16_f32(f);
+ ^
+
+Upstream seems to have had similar issues according to
+https://skia-review.googlesource.com/c/skia/+/84222, but there is no fix at the
+moment.
+
+Signed-off-by: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
+---
+ .../skia/src/opts/SkRasterPipeline_opts.h | 17 ++---------------
+ 1 file changed, 2 insertions(+), 15 deletions(-)
+
+diff --git a/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h b/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h
+index b59506dcd6d..b8f22c948c0 100644
+--- a/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h
++++ b/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h
+@@ -972,13 +972,7 @@ SI F approx_powf(F x, F y) {
+ }
+
+ SI F from_half(U16 h) {
+-#if defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) \
+- && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds.
+- __fp16 fp16;
+- memcpy(&fp16, &h, sizeof(U16));
+- return float(fp16);
+-
+-#elif defined(JUMPER_IS_HSW) || defined(JUMPER_IS_AVX512)
++#if defined(JUMPER_IS_HSW) || defined(JUMPER_IS_AVX512)
+ return _mm256_cvtph_ps(h);
+
+ #else
+@@ -995,14 +989,7 @@ SI F from_half(U16 h) {
+ }
+
+ SI U16 to_half(F f) {
+-#if defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) \
+- && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds.
+- __fp16 fp16 = __fp16(f);
+- U16 u16;
+- memcpy(&u16, &fp16, sizeof(U16));
+- return u16;
+-
+-#elif defined(JUMPER_IS_HSW) || defined(JUMPER_IS_AVX512)
++#if defined(JUMPER_IS_HSW) || defined(JUMPER_IS_AVX512)
+ return _mm256_cvtps_ph(f, _MM_FROUND_CUR_DIRECTION);
+
+ #else
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-fix-build-after-y2038-changes-in-glibc.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-fix-build-after-y2038-changes-in-glibc.patch
new file mode 100644
index 00000000..aeb496bd
--- /dev/null
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-fix-build-after-y2038-changes-in-glibc.patch
@@ -0,0 +1,28 @@
+From a0bd9300aa9c405216f504d602c7dd8d5b35eb21 Mon Sep 17 00:00:00 2001
+From: Jiri Slaby <jslaby@suse.cz>
+Date: Thu, 11 Jul 2019 09:35:13 +0200
+Subject: [PATCH] chromium: fix build after y2038 changes in glibc
+
+SIOCGSTAMP is defined in linux/sockios.h since kernel 5.2. Include that
+file wherever needed.
+
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+
+Upstream-Status: Pending
+---
+ chromium/third_party/webrtc/rtc_base/physical_socket_server.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc b/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc
+index c1d6d26acc6..6de81b751dd 100644
+--- a/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc
++++ b/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc
+@@ -71,6 +71,7 @@ typedef void* SockOptArg;
+ #endif // WEBRTC_POSIX
+
+ #if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__)
++#include <linux/sockios.h>
+
+ int64_t GetSocketRecvTimestamp(int socket) {
+ struct timeval tv_ioctl;
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch
new file mode 100644
index 00000000..0bd4a451
--- /dev/null
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch
@@ -0,0 +1,68 @@
+From b0d3cfec7837dcf818c08454a16eb44d78337a9f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 30 Nov 2019 10:07:43 -0800
+Subject: [PATCH] chromium: Fix build on 32bit arches with 64bit time_t
+
+time element is deprecated on new input_event structure in kernel's
+input.h [1]
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=152194fe9c3f
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+---
+ chromium/ui/events/ozone/evdev/event_converter_evdev.cc | 4 ++--
+ chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc | 6 +++---
+ chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h | 5 +++++
+ 3 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/chromium/ui/events/ozone/evdev/event_converter_evdev.cc b/chromium/ui/events/ozone/evdev/event_converter_evdev.cc
+index 5684f4121be..10f6357e6b5 100644
+--- a/chromium/ui/events/ozone/evdev/event_converter_evdev.cc
++++ b/chromium/ui/events/ozone/evdev/event_converter_evdev.cc
+@@ -176,8 +176,8 @@ void EventConverterEvdev::SetPalmSuppressionCallback(
+ base::TimeTicks EventConverterEvdev::TimeTicksFromInputEvent(
+ const input_event& event) {
+ base::TimeTicks timestamp =
+- ui::EventTimeStampFromSeconds(event.time.tv_sec) +
+- base::TimeDelta::FromMicroseconds(event.time.tv_usec);
++ ui::EventTimeStampFromSeconds(event.input_event_sec) +
++ base::TimeDelta::FromMicroseconds(event.input_event_usec);
+ ValidateEventTimeClock(&timestamp);
+ return timestamp;
+ }
+diff --git a/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc b/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc
+index 363c3183e05..4fccfd62f84 100644
+--- a/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc
++++ b/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc
+@@ -59,11 +59,11 @@ void TouchEventLogEvdev::DumpLog(const char* filename) {
+ for (int i = 0; i < kDebugBufferSize; ++i) {
+ struct TouchEvent* te =
+ &logged_events_[(debug_buffer_tail_ + i) % kDebugBufferSize];
+- if (te->ev.time.tv_sec == 0 && te->ev.time.tv_usec == 0)
++ if (te->ev.input_event_sec == 0 && te->ev.input_event_usec == 0)
+ continue;
+ std::string event_string = base::StringPrintf(
+- "E: %ld.%06ld %04x %04x %d %d\n", te->ev.time.tv_sec,
+- te->ev.time.tv_usec, te->ev.type, te->ev.code, te->ev.value, te->slot);
++ "E: %ld.%06ld %04x %04x %d %d\n", te->ev.input_event_sec,
++ te->ev.input_event_usec, te->ev.type, te->ev.code, te->ev.value, te->slot);
+ report_content += event_string;
+ }
+ file.Write(0, report_content.c_str(), report_content.length());
+diff --git a/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h b/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h
+index ccd3a499a38..5a2da89d09a 100644
+--- a/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h
++++ b/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.h
+@@ -14,6 +14,11 @@
+
+ #include "ui/events/ozone/evdev/events_ozone_evdev_export.h"
+
++#ifndef input_event_sec
++#define input_event_sec time.tv_sec
++#define input_event_usec time.tv_usec
++#endif
++
+ namespace ui {
+
+ class EventDeviceInfo;
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Include-cstddef-for-size_t-definition.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Include-cstddef-for-size_t-definition.patch
new file mode 100644
index 00000000..1f4a7c14
--- /dev/null
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Include-cstddef-for-size_t-definition.patch
@@ -0,0 +1,48 @@
+From ef41260060293cf53c279b675c470341fd635a4e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 25 Dec 2019 15:41:16 -0800
+Subject: [PATCH] chromium: Include cstddef for size_t definition
+
+Include ctsdint for uintXX_t
+
+Fixes
+In file included from ../../../../git/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.cc:10:
+../../../../git/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h:34:3: error: 'size_t' does not name a type
+ 34 | size_t stability_counter_;
+ | ^~~~~~
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+ccc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ .../webrtc/modules/audio_processing/aec3/clockdrift_detector.h | 1 +
+ .../third_party/webrtc/modules/video_coding/decoding_state.h | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h b/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
+index 22528c94892..69e624e8b19 100644
+--- a/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
++++ b/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
+@@ -12,6 +12,7 @@
+ #define MODULES_AUDIO_PROCESSING_AEC3_CLOCKDRIFT_DETECTOR_H_
+
+ #include <array>
++#include <cstddef>
+
+ namespace webrtc {
+
+diff --git a/chromium/third_party/webrtc/modules/video_coding/decoding_state.h b/chromium/third_party/webrtc/modules/video_coding/decoding_state.h
+index b87fb2d0345..b3faffcfc79 100644
+--- a/chromium/third_party/webrtc/modules/video_coding/decoding_state.h
++++ b/chromium/third_party/webrtc/modules/video_coding/decoding_state.h
+@@ -14,6 +14,7 @@
+ #include <map>
+ #include <set>
+ #include <vector>
++#include <cstdint>
+
+ namespace webrtc {
+
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-Move-CharAllocator-definition-to-a-header-f.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-Move-CharAllocator-definition-to-a-header-f.patch
new file mode 100644
index 00000000..352e553b
--- /dev/null
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-Move-CharAllocator-definition-to-a-header-f.patch
@@ -0,0 +1,554 @@
+From d47414a793f9c1bf1eb01fd3a723b2bc871037de Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 2 Jan 2020 17:13:55 -0800
+Subject: [PATCH] chromium: Move CharAllocator definition to a header file
+
+Fixes
+error: invalid application of 'sizeof' to an incomplete type 'cc::ListContainerHelper::CharAllocator'
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ chromium/cc/base/list_container_helper.cc | 251 ---------------------
+ chromium/cc/base/list_container_helper.h | 255 ++++++++++++++++++++++
+ 2 files changed, 255 insertions(+), 251 deletions(-)
+
+diff --git a/chromium/cc/base/list_container_helper.cc b/chromium/cc/base/list_container_helper.cc
+index 3a4c0b6a2f9..89df57a7b8e 100644
+--- a/chromium/cc/base/list_container_helper.cc
++++ b/chromium/cc/base/list_container_helper.cc
+@@ -12,259 +12,8 @@
+ #include "base/logging.h"
+ #include "base/memory/aligned_memory.h"
+
+-namespace {
+-const size_t kDefaultNumElementTypesToReserve = 32;
+-} // namespace
+-
+ namespace cc {
+
+-// CharAllocator
+-////////////////////////////////////////////////////
+-// This class deals only with char* and void*. It does allocation and passing
+-// out raw pointers, as well as memory deallocation when being destroyed.
+-class ListContainerHelper::CharAllocator {
+- public:
+- // CharAllocator::InnerList
+- /////////////////////////////////////////////
+- // This class holds the raw memory chunk, as well as information about its
+- // size and availability.
+- struct InnerList {
+- InnerList(const InnerList&) = delete;
+- InnerList& operator=(const InnerList&) = delete;
+-
+- std::unique_ptr<char[], base::AlignedFreeDeleter> data;
+- // The number of elements in total the memory can hold. The difference
+- // between capacity and size is the how many more elements this list can
+- // hold.
+- size_t capacity;
+- // The number of elements have been put into this list.
+- size_t size;
+- // The size of each element is in bytes. This is used to move from between
+- // elements' memory locations.
+- size_t step;
+-
+- InnerList() : capacity(0), size(0), step(0) {}
+-
+- void Erase(char* position) {
+- // Confident that destructor is called by caller of this function. Since
+- // CharAllocator does not handle construction after
+- // allocation, it doesn't handle desctrution before deallocation.
+- DCHECK_LE(position, LastElement());
+- DCHECK_GE(position, Begin());
+- char* start = position + step;
+- std::copy(start, End(), position);
+-
+- --size;
+- // Decrease capacity to avoid creating not full not last InnerList.
+- --capacity;
+- }
+-
+- void InsertBefore(size_t alignment, char** position, size_t count) {
+- DCHECK_LE(*position, LastElement() + step);
+- DCHECK_GE(*position, Begin());
+-
+- // Adjust the size and capacity
+- size_t old_size = size;
+- size += count;
+- capacity = size;
+-
+- // Allocate the new data and update the iterator's pointer.
+- std::unique_ptr<char[], base::AlignedFreeDeleter> new_data(
+- static_cast<char*>(base::AlignedAlloc(size * step, alignment)));
+- size_t position_offset = *position - Begin();
+- *position = new_data.get() + position_offset;
+-
+- // Copy the data before the inserted segment
+- memcpy(new_data.get(), data.get(), position_offset);
+- // Copy the data after the inserted segment.
+- memcpy(new_data.get() + position_offset + count * step,
+- data.get() + position_offset, old_size * step - position_offset);
+- data = std::move(new_data);
+- }
+-
+- bool IsEmpty() const { return !size; }
+- bool IsFull() { return capacity == size; }
+- size_t NumElementsAvailable() const { return capacity - size; }
+-
+- void* AddElement() {
+- DCHECK_LT(size, capacity);
+- ++size;
+- return LastElement();
+- }
+-
+- void RemoveLast() {
+- DCHECK(!IsEmpty());
+- --size;
+- }
+-
+- char* Begin() const { return data.get(); }
+- char* End() const { return data.get() + size * step; }
+- char* LastElement() const { return data.get() + (size - 1) * step; }
+- char* ElementAt(size_t index) const { return data.get() + index * step; }
+- };
+-
+- CharAllocator(size_t alignment, size_t element_size, size_t element_count)
+- // base::AlignedAlloc does not accept alignment less than sizeof(void*).
+- : alignment_(std::max(sizeof(void*), alignment)),
+- element_size_(element_size),
+- size_(0),
+- last_list_index_(0),
+- last_list_(nullptr) {
+- // If this fails, then alignment of elements after the first could be wrong,
+- // and we need to pad sizes to fix that.
+- DCHECK_EQ(element_size % alignment, 0u);
+- AllocateNewList(element_count > 0 ? element_count
+- : kDefaultNumElementTypesToReserve);
+- last_list_ = storage_[last_list_index_].get();
+- }
+-
+- CharAllocator(const CharAllocator&) = delete;
+- ~CharAllocator() = default;
+-
+- CharAllocator& operator=(const CharAllocator&) = delete;
+-
+- void* Allocate() {
+- if (last_list_->IsFull()) {
+- // Only allocate a new list if there isn't a spare one still there from
+- // previous usage.
+- if (last_list_index_ + 1 >= storage_.size())
+- AllocateNewList(last_list_->capacity * 2);
+-
+- ++last_list_index_;
+- last_list_ = storage_[last_list_index_].get();
+- }
+-
+- ++size_;
+- return last_list_->AddElement();
+- }
+-
+- size_t alignment() const { return alignment_; }
+- size_t element_size() const { return element_size_; }
+- size_t list_count() const { return storage_.size(); }
+- size_t size() const { return size_; }
+- bool IsEmpty() const { return size() == 0; }
+-
+- size_t Capacity() const {
+- size_t capacity_sum = 0;
+- for (const auto& inner_list : storage_)
+- capacity_sum += inner_list->capacity;
+- return capacity_sum;
+- }
+-
+- void Clear() {
+- // Remove all except for the first InnerList.
+- DCHECK(!storage_.empty());
+- storage_.erase(storage_.begin() + 1, storage_.end());
+- last_list_index_ = 0;
+- last_list_ = storage_[0].get();
+- last_list_->size = 0;
+- size_ = 0;
+- }
+-
+- void RemoveLast() {
+- DCHECK(!IsEmpty());
+- last_list_->RemoveLast();
+- if (last_list_->IsEmpty() && last_list_index_ > 0) {
+- --last_list_index_;
+- last_list_ = storage_[last_list_index_].get();
+-
+- // If there are now two empty inner lists, free one of them.
+- if (last_list_index_ + 2 < storage_.size())
+- storage_.pop_back();
+- }
+- --size_;
+- }
+-
+- void Erase(PositionInCharAllocator* position) {
+- DCHECK_EQ(this, position->ptr_to_container);
+-
+- // Update |position| to point to the element after the erased element.
+- InnerList* list = storage_[position->vector_index].get();
+- char* item_iterator = position->item_iterator;
+- if (item_iterator == list->LastElement())
+- position->Increment();
+-
+- list->Erase(item_iterator);
+- // TODO(weiliangc): Free the InnerList if it is empty.
+- --size_;
+- }
+-
+- void InsertBefore(ListContainerHelper::Iterator* position, size_t count) {
+- if (!count)
+- return;
+-
+- // If |position| is End(), then append |count| elements at the end. This
+- // will happen to not invalidate any iterators or memory.
+- if (!position->item_iterator) {
+- // Set |position| to be the first inserted element.
+- Allocate();
+- position->vector_index = storage_.size() - 1;
+- position->item_iterator = storage_[position->vector_index]->LastElement();
+- // Allocate the rest.
+- for (size_t i = 1; i < count; ++i)
+- Allocate();
+- } else {
+- storage_[position->vector_index]->InsertBefore(
+- alignment_, &position->item_iterator, count);
+- size_ += count;
+- }
+- }
+-
+- InnerList* InnerListById(size_t id) const {
+- DCHECK_LT(id, storage_.size());
+- return storage_[id].get();
+- }
+-
+- size_t FirstInnerListId() const {
+- // |size_| > 0 means that at least one vector in |storage_| will be
+- // non-empty.
+- DCHECK_GT(size_, 0u);
+- size_t id = 0;
+- while (storage_[id]->size == 0)
+- ++id;
+- return id;
+- }
+-
+- size_t LastInnerListId() const {
+- // |size_| > 0 means that at least one vector in |storage_| will be
+- // non-empty.
+- DCHECK_GT(size_, 0u);
+- size_t id = storage_.size() - 1;
+- while (storage_[id]->size == 0)
+- --id;
+- return id;
+- }
+-
+- size_t NumAvailableElementsInLastList() const {
+- return last_list_->NumElementsAvailable();
+- }
+-
+- private:
+- void AllocateNewList(size_t list_size) {
+- std::unique_ptr<InnerList> new_list(new InnerList);
+- new_list->capacity = list_size;
+- new_list->size = 0;
+- new_list->step = element_size_;
+- new_list->data.reset(static_cast<char*>(
+- base::AlignedAlloc(list_size * element_size_, alignment_)));
+- storage_.push_back(std::move(new_list));
+- }
+-
+- std::vector<std::unique_ptr<InnerList>> storage_;
+- const size_t alignment_;
+- const size_t element_size_;
+-
+- // The number of elements in the list.
+- size_t size_;
+-
+- // The index of the last list to have had elements added to it, or the only
+- // list if the container has not had elements added since being cleared.
+- size_t last_list_index_;
+-
+- // This is equivalent to |storage_[last_list_index_]|.
+- InnerList* last_list_;
+-};
+-
+ // PositionInCharAllocator
+ //////////////////////////////////////////////////////
+ ListContainerHelper::PositionInCharAllocator::PositionInCharAllocator(
+diff --git a/chromium/cc/base/list_container_helper.h b/chromium/cc/base/list_container_helper.h
+index 31658bc8486..9e65013cbdb 100644
+--- a/chromium/cc/base/list_container_helper.h
++++ b/chromium/cc/base/list_container_helper.h
+@@ -8,9 +8,17 @@
+ #include <stddef.h>
+
+ #include <memory>
++#include <algorithm>
++#include <vector>
+
++#include "base/logging.h"
++#include "base/memory/aligned_memory.h"
+ #include "cc/base/base_export.h"
+
++namespace {
++const size_t kDefaultNumElementTypesToReserve = 32;
++} // namespace
++
+ namespace cc {
+
+ // Helper class for ListContainer non-templated logic. All methods are private,
+@@ -174,6 +182,253 @@ class CC_BASE_EXPORT ListContainerHelper final {
+ std::unique_ptr<CharAllocator> data_;
+ };
+
++// CharAllocator
++////////////////////////////////////////////////////
++// This class deals only with char* and void*. It does allocation and passing
++// out raw pointers, as well as memory deallocation when being destroyed.
++class ListContainerHelper::CharAllocator {
++ public:
++ // CharAllocator::InnerList
++ /////////////////////////////////////////////
++ // This class holds the raw memory chunk, as well as information about its
++ // size and availability.
++ struct InnerList {
++ InnerList(const InnerList&) = delete;
++ InnerList& operator=(const InnerList&) = delete;
++
++ std::unique_ptr<char[], base::AlignedFreeDeleter> data;
++ // The number of elements in total the memory can hold. The difference
++ // between capacity and size is the how many more elements this list can
++ // hold.
++ size_t capacity;
++ // The number of elements have been put into this list.
++ size_t size;
++ // The size of each element is in bytes. This is used to move from between
++ // elements' memory locations.
++ size_t step;
++
++ InnerList() : capacity(0), size(0), step(0) {}
++
++ void Erase(char* position) {
++ // Confident that destructor is called by caller of this function. Since
++ // CharAllocator does not handle construction after
++ // allocation, it doesn't handle desctrution before deallocation.
++ DCHECK_LE(position, LastElement());
++ DCHECK_GE(position, Begin());
++ char* start = position + step;
++ std::copy(start, End(), position);
++
++ --size;
++ // Decrease capacity to avoid creating not full not last InnerList.
++ --capacity;
++ }
++
++ void InsertBefore(size_t alignment, char** position, size_t count) {
++ DCHECK_LE(*position, LastElement() + step);
++ DCHECK_GE(*position, Begin());
++
++ // Adjust the size and capacity
++ size_t old_size = size;
++ size += count;
++ capacity = size;
++
++ // Allocate the new data and update the iterator's pointer.
++ std::unique_ptr<char[], base::AlignedFreeDeleter> new_data(
++ static_cast<char*>(base::AlignedAlloc(size * step, alignment)));
++ size_t position_offset = *position - Begin();
++ *position = new_data.get() + position_offset;
++
++ // Copy the data before the inserted segment
++ memcpy(new_data.get(), data.get(), position_offset);
++ // Copy the data after the inserted segment.
++ memcpy(new_data.get() + position_offset + count * step,
++ data.get() + position_offset, old_size * step - position_offset);
++ data = std::move(new_data);
++ }
++
++ bool IsEmpty() const { return !size; }
++ bool IsFull() { return capacity == size; }
++ size_t NumElementsAvailable() const { return capacity - size; }
++
++ void* AddElement() {
++ DCHECK_LT(size, capacity);
++ ++size;
++ return LastElement();
++ }
++
++ void RemoveLast() {
++ DCHECK(!IsEmpty());
++ --size;
++ }
++
++ char* Begin() const { return data.get(); }
++ char* End() const { return data.get() + size * step; }
++ char* LastElement() const { return data.get() + (size - 1) * step; }
++ char* ElementAt(size_t index) const { return data.get() + index * step; }
++ };
++
++ CharAllocator(size_t alignment, size_t element_size, size_t element_count)
++ // base::AlignedAlloc does not accept alignment less than sizeof(void*).
++ : alignment_(std::max(sizeof(void*), alignment)),
++ element_size_(element_size),
++ size_(0),
++ last_list_index_(0),
++ last_list_(nullptr) {
++ // If this fails, then alignment of elements after the first could be wrong,
++ // and we need to pad sizes to fix that.
++ DCHECK_EQ(element_size % alignment, 0u);
++ AllocateNewList(element_count > 0 ? element_count
++ : kDefaultNumElementTypesToReserve);
++ last_list_ = storage_[last_list_index_].get();
++ }
++
++ CharAllocator(const CharAllocator&) = delete;
++ ~CharAllocator() = default;
++
++ CharAllocator& operator=(const CharAllocator&) = delete;
++
++ void* Allocate() {
++ if (last_list_->IsFull()) {
++ // Only allocate a new list if there isn't a spare one still there from
++ // previous usage.
++ if (last_list_index_ + 1 >= storage_.size())
++ AllocateNewList(last_list_->capacity * 2);
++
++ ++last_list_index_;
++ last_list_ = storage_[last_list_index_].get();
++ }
++
++ ++size_;
++ return last_list_->AddElement();
++ }
++
++ size_t alignment() const { return alignment_; }
++ size_t element_size() const { return element_size_; }
++ size_t list_count() const { return storage_.size(); }
++ size_t size() const { return size_; }
++ bool IsEmpty() const { return size() == 0; }
++
++ size_t Capacity() const {
++ size_t capacity_sum = 0;
++ for (const auto& inner_list : storage_)
++ capacity_sum += inner_list->capacity;
++ return capacity_sum;
++ }
++
++ void Clear() {
++ // Remove all except for the first InnerList.
++ DCHECK(!storage_.empty());
++ storage_.erase(storage_.begin() + 1, storage_.end());
++ last_list_index_ = 0;
++ last_list_ = storage_[0].get();
++ last_list_->size = 0;
++ size_ = 0;
++ }
++
++ void RemoveLast() {
++ DCHECK(!IsEmpty());
++ last_list_->RemoveLast();
++ if (last_list_->IsEmpty() && last_list_index_ > 0) {
++ --last_list_index_;
++ last_list_ = storage_[last_list_index_].get();
++
++ // If there are now two empty inner lists, free one of them.
++ if (last_list_index_ + 2 < storage_.size())
++ storage_.pop_back();
++ }
++ --size_;
++ }
++
++ void Erase(PositionInCharAllocator* position) {
++ DCHECK_EQ(this, position->ptr_to_container);
++
++ // Update |position| to point to the element after the erased element.
++ InnerList* list = storage_[position->vector_index].get();
++ char* item_iterator = position->item_iterator;
++ if (item_iterator == list->LastElement())
++ position->Increment();
++
++ list->Erase(item_iterator);
++ // TODO(weiliangc): Free the InnerList if it is empty.
++ --size_;
++ }
++
++ void InsertBefore(ListContainerHelper::Iterator* position, size_t count) {
++ if (!count)
++ return;
++
++ // If |position| is End(), then append |count| elements at the end. This
++ // will happen to not invalidate any iterators or memory.
++ if (!position->item_iterator) {
++ // Set |position| to be the first inserted element.
++ Allocate();
++ position->vector_index = storage_.size() - 1;
++ position->item_iterator = storage_[position->vector_index]->LastElement();
++ // Allocate the rest.
++ for (size_t i = 1; i < count; ++i)
++ Allocate();
++ } else {
++ storage_[position->vector_index]->InsertBefore(
++ alignment_, &position->item_iterator, count);
++ size_ += count;
++ }
++ }
++
++ InnerList* InnerListById(size_t id) const {
++ DCHECK_LT(id, storage_.size());
++ return storage_[id].get();
++ }
++
++ size_t FirstInnerListId() const {
++ // |size_| > 0 means that at least one vector in |storage_| will be
++ // non-empty.
++ DCHECK_GT(size_, 0u);
++ size_t id = 0;
++ while (storage_[id]->size == 0)
++ ++id;
++ return id;
++ }
++
++ size_t LastInnerListId() const {
++ // |size_| > 0 means that at least one vector in |storage_| will be
++ // non-empty.
++ DCHECK_GT(size_, 0u);
++ size_t id = storage_.size() - 1;
++ while (storage_[id]->size == 0)
++ --id;
++ return id;
++ }
++
++ size_t NumAvailableElementsInLastList() const {
++ return last_list_->NumElementsAvailable();
++ }
++
++ private:
++ void AllocateNewList(size_t list_size) {
++ std::unique_ptr<InnerList> new_list(new InnerList);
++ new_list->capacity = list_size;
++ new_list->size = 0;
++ new_list->step = element_size_;
++ new_list->data.reset(static_cast<char*>(
++ base::AlignedAlloc(list_size * element_size_, alignment_)));
++ storage_.push_back(std::move(new_list));
++ }
++
++ std::vector<std::unique_ptr<InnerList>> storage_;
++ const size_t alignment_;
++ const size_t element_size_;
++
++ // The number of elements in the list.
++ size_t size_;
++
++ // The index of the last list to have had elements added to it, or the only
++ // list if the container has not had elements added since being cleared.
++ size_t last_list_index_;
++
++ // This is equivalent to |storage_[last_list_index_]|.
++ InnerList* last_list_;
++};
++
+ } // namespace cc
+
+ #endif // CC_BASE_LIST_CONTAINER_HELPER_H_
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.patch
new file mode 100644
index 00000000..32dde335
--- /dev/null
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.patch
@@ -0,0 +1,50 @@
+From c2ca4923d5e534789b205968eb01779a90ec1299 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 15 Jan 2020 16:53:46 -0800
+Subject: [PATCH] chromium: Include <cstddef> and <cstdint>
+
+These headers are needed for uintXX_t and size_t definitions
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ chromium/media/cdm/supported_cdm_versions.h | 1 +
+ .../third_party/perfetto/include/perfetto/base/task_runner.h | 1 +
+ chromium/third_party/webrtc/call/rtx_receive_stream.h | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/chromium/media/cdm/supported_cdm_versions.h b/chromium/media/cdm/supported_cdm_versions.h
+index 3f220da8c71..c54e3bb7d30 100644
+--- a/chromium/media/cdm/supported_cdm_versions.h
++++ b/chromium/media/cdm/supported_cdm_versions.h
+@@ -6,6 +6,7 @@
+ #define MEDIA_CDM_SUPPORTED_CDM_VERSIONS_H_
+
+ #include <array>
++#include <cstddef>
+
+ #include "media/base/media_export.h"
+ #include "media/cdm/api/content_decryption_module.h"
+diff --git a/chromium/third_party/perfetto/include/perfetto/base/task_runner.h b/chromium/third_party/perfetto/include/perfetto/base/task_runner.h
+index cf60401238f..02658e7139b 100644
+--- a/chromium/third_party/perfetto/include/perfetto/base/task_runner.h
++++ b/chromium/third_party/perfetto/include/perfetto/base/task_runner.h
+@@ -18,6 +18,7 @@
+ #define INCLUDE_PERFETTO_BASE_TASK_RUNNER_H_
+
+ #include <functional>
++#include <cstdint>
+
+ #include "perfetto/base/export.h"
+
+diff --git a/chromium/third_party/webrtc/call/rtx_receive_stream.h b/chromium/third_party/webrtc/call/rtx_receive_stream.h
+index 8ffa4400a9c..a389fc2a574 100644
+--- a/chromium/third_party/webrtc/call/rtx_receive_stream.h
++++ b/chromium/third_party/webrtc/call/rtx_receive_stream.h
+@@ -11,6 +11,7 @@
+ #ifndef CALL_RTX_RECEIVE_STREAM_H_
+ #define CALL_RTX_RECEIVE_STREAM_H_
+
++#include <cstdint>
+ #include <map>
+
+ #include "call/rtp_packet_sink_interface.h"
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch
index 7879e99a..3e595591 100644
--- a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch
@@ -1,4 +1,4 @@
-From 3931af98b42c87ea474e0e6d0d27753e53d101ca Mon Sep 17 00:00:00 2001
+From d38a63908f5c49705abd85bd9c2aee0ec334221d Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 14:01:12 -0700
Subject: [PATCH] chromium: musl: sandbox: Define TEMP_FAILURE_RETRY if not
@@ -12,10 +12,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 9 insertions(+)
diff --git a/chromium/sandbox/linux/suid/sandbox.c b/chromium/sandbox/linux/suid/sandbox.c
-index 66f68ef1387..9284d0d4fc5 100644
+index 854819bfbb4..a99d32741d0 100644
--- a/chromium/sandbox/linux/suid/sandbox.c
+++ b/chromium/sandbox/linux/suid/sandbox.c
-@@ -44,6 +44,15 @@ static bool DropRoot();
+@@ -46,6 +46,15 @@ static bool DropRoot();
#define HANDLE_EINTR(x) TEMP_FAILURE_RETRY(x)
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch
new file mode 100644
index 00000000..3bf0c5eb
--- /dev/null
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch
@@ -0,0 +1,32 @@
+From 5b4b896c1c6c79cc7c870a398acf1baf4b6bec7b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 1 Feb 2020 12:17:23 -0800
+Subject: [PATCH] chromium: Link v8 with libatomic on x86
+
+Fixes
+| v8_base_without_compiler_jumbo_47.cc:(.text._ZN2v88internal4wasm12_GLOBAL__N_123ExecuteCompilationUnitsERKSt10shared_ptrINS2_22BackgroundCompileTokenEEPNS0_8CountersEiNS2_19CompileBaselineOnlyE+0x29a): undefined reference to `__atomic_l
+oad'
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ chromium/v8/BUILD.gn | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/chromium/v8/BUILD.gn b/chromium/v8/BUILD.gn
+index e21400265dd..7e56609b9da 100644
+--- a/chromium/v8/BUILD.gn
++++ b/chromium/v8/BUILD.gn
+@@ -3310,7 +3310,8 @@ v8_source_set("v8_base_without_compiler") {
+ if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel" ||
+ v8_current_cpu == "mips64" || v8_current_cpu == "mips64el" ||
+ v8_current_cpu == "ppc" || v8_current_cpu == "ppc64" ||
+- v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
++ v8_current_cpu == "s390" || v8_current_cpu == "s390x" ||
++ v8_current_cpu == "x86") {
+ libs = [ "atomic" ]
+ }
+
+--
+2.25.0
+
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch
index 68eaf23e..2fdb0d82 100644
--- a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch
@@ -1,4 +1,4 @@
-From 5532d00e7dcec5529b7510386530cc44bf0b094c Mon Sep 17 00:00:00 2001
+From 4b16ad982ff10945a37a7dd90735a5a1be3d6a8b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 14:09:06 -0700
Subject: [PATCH] chromium: musl: Avoid mallinfo() APIs on non-glibc/linux
@@ -6,15 +6,14 @@ Subject: [PATCH] chromium: musl: Avoid mallinfo() APIs on non-glibc/linux
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
chromium/base/process/process_metrics_posix.cc | 4 ++--
- chromium/base/trace_event/malloc_dump_provider.cc | 3 ++-
- chromium/content/child/content_child_helpers.cc | 2 +-
- 3 files changed, 5 insertions(+), 4 deletions(-)
+ chromium/base/trace_event/malloc_dump_provider.cc | 2 ++
+ 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/chromium/base/process/process_metrics_posix.cc b/chromium/base/process/process_metrics_posix.cc
-index 73a52d6210d..4867198a503 100644
+index 5763432aa4f..ff00b7307c0 100644
--- a/chromium/base/process/process_metrics_posix.cc
+++ b/chromium/base/process/process_metrics_posix.cc
-@@ -94,14 +94,14 @@ size_t ProcessMetrics::GetMallocUsage() {
+@@ -109,14 +109,14 @@ size_t ProcessMetrics::GetMallocUsage() {
malloc_statistics_t stats = {0};
malloc_zone_statistics(nullptr, &stats);
return stats.size_in_use;
@@ -32,10 +31,10 @@ index 73a52d6210d..4867198a503 100644
return 0;
#endif
diff --git a/chromium/base/trace_event/malloc_dump_provider.cc b/chromium/base/trace_event/malloc_dump_provider.cc
-index ffd519133c2..0c9131e98e4 100644
+index 0077d8b0aec..c69f893f4e9 100644
--- a/chromium/base/trace_event/malloc_dump_provider.cc
+++ b/chromium/base/trace_event/malloc_dump_provider.cc
-@@ -197,6 +197,7 @@ MallocDumpProvider::~MallocDumpProvider() = default;
+@@ -77,6 +77,7 @@ MallocDumpProvider::~MallocDumpProvider() = default;
// the current process.
bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
ProcessMemoryDump* pmd) {
@@ -43,25 +42,11 @@ index ffd519133c2..0c9131e98e4 100644
{
base::AutoLock auto_lock(emit_metrics_on_memory_dump_lock_);
if (!emit_metrics_on_memory_dump_)
-@@ -322,7 +323,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
- pmd->DumpHeapUsage(metrics_by_context, overhead, "malloc");
+@@ -172,6 +173,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args,
+ MemoryAllocatorDump::kUnitsBytes,
+ resident_size - allocated_objects_size);
}
- tid_dumping_heap_ = kInvalidThreadId;
--
+#endif // __GLIBC__
return true;
}
-diff --git a/chromium/content/child/content_child_helpers.cc b/chromium/content/child/content_child_helpers.cc
-index 7ddeb4d16a9..b8c73b09c5a 100644
---- a/chromium/content/child/content_child_helpers.cc
-+++ b/chromium/content/child/content_child_helpers.cc
-@@ -25,7 +25,7 @@ namespace content {
- // though, this provides only a partial and misleading value.
- // Unfortunately some telemetry benchmark rely on it and these need to
- // be refactored before getting rid of this. See crbug.com/581365 .
--#if defined(OS_LINUX) || defined(OS_ANDROID)
-+#if defined(__GLIBC__) || defined(OS_ANDROID)
- size_t GetMemoryUsageKB() {
- struct mallinfo minfo = mallinfo();
- uint64_t mem_usage =
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-musl-include-fcntl.h-for-loff_t.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-include-fcntl.h-for-loff_t.patch
index 1f9af27e..05576b02 100644
--- a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-musl-include-fcntl.h-for-loff_t.patch
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-include-fcntl.h-for-loff_t.patch
@@ -1,4 +1,4 @@
-From 87d8eeb36da32940a57ecf9a94c61f7d749e1058 Mon Sep 17 00:00:00 2001
+From e087d26af9bdd2f045f8a81fdd2688c50b77e938 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 14:37:49 -0700
Subject: [PATCH] chromium: musl: include fcntl.h for loff_t
@@ -9,10 +9,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+)
diff --git a/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h b/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h
-index b29ec2d29a7..91f77dd88d4 100644
+index ca5936d6e63..5484dbadfbd 100644
--- a/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h
+++ b/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h
-@@ -150,6 +150,7 @@ extern "C" {
+@@ -154,6 +154,7 @@ extern "C" {
#include <stddef.h>
#include <stdint.h>
#include <string.h>
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-include-asm-generic-ioctl.h-for-TCGETS.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-include-asm-generic-ioctl.h-for-TCGETS.patch
deleted file mode 100644
index c11a7ce8..00000000
--- a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-include-asm-generic-ioctl.h-for-TCGETS.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From b9a0991d31f2c88525022690640b5f30a42821b3 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Fri, 7 Jul 2017 17:15:34 -0700
-Subject: [PATCH] chromium: musl: include asm-generic/ioctl.h for TCGETS2
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- chromium/device/serial/serial_io_handler_posix.cc | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/chromium/device/serial/serial_io_handler_posix.cc b/chromium/device/serial/serial_io_handler_posix.cc
-index d6ed5e1f889..b550f895ef5 100644
---- a/chromium/device/serial/serial_io_handler_posix.cc
-+++ b/chromium/device/serial/serial_io_handler_posix.cc
-@@ -6,6 +6,7 @@
-
- #include <sys/ioctl.h>
- #include <termios.h>
-+#include <asm-generic/ioctls.h>
-
- #include "base/files/file_util.h"
- #include "base/posix/eintr_wrapper.h"
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-use-off64_t-instead-of-the-internal-__.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-use-off64_t-instead-of-the-internal-__.patch
index e7dba73b..ad7a085f 100644
--- a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-use-off64_t-instead-of-the-internal-__.patch
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-use-off64_t-instead-of-the-internal-__.patch
@@ -1,4 +1,4 @@
-From 081561227fb55b9a419632b1f6187d9d7bedd8f9 Mon Sep 17 00:00:00 2001
+From 5cde4d2fb5affc6e739dba412453b4bf076f19e9 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 14:38:37 -0700
Subject: [PATCH] chromium: musl: use off64_t instead of the internal __off64_t
@@ -12,10 +12,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h b/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h
-index 715c045f66c..edc8cf2db70 100644
+index 17415aaf538..59c1b6fb5f6 100644
--- a/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h
+++ b/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h
-@@ -77,7 +77,7 @@ typedef off64_t __off64_t;
+@@ -60,7 +60,7 @@
static inline void* do_mmap64(void *start, size_t length,
int prot, int flags,
@@ -23,8 +23,8 @@ index 715c045f66c..edc8cf2db70 100644
+ int fd, off64_t offset) __THROW {
// The original gperftools uses sys_mmap() here. But, it is not allowed by
// Chromium's sandbox.
- return (void *)syscall(SYS_mmap, start, length, prot, flags, fd, offset);
-@@ -90,7 +90,7 @@ static inline void* do_mmap64(void *start, size_t length,
+ return (void*)syscall(SYS_mmap, start, length, prot, flags, fd, offset);
+@@ -73,7 +73,7 @@ static inline void* do_mmap64(void *start, size_t length,
static inline void* do_mmap64(void *start, size_t length,
int prot, int flags,
@@ -33,7 +33,7 @@ index 715c045f66c..edc8cf2db70 100644
void *result;
// Try mmap2() unless it's not supported
-@@ -161,7 +161,7 @@ static inline void* do_mmap64(void *start, size_t length,
+@@ -144,7 +144,7 @@ static inline void* do_mmap64(void *start, size_t length,
extern "C" {
void* mmap64(void *start, size_t length, int prot, int flags,
@@ -42,7 +42,7 @@ index 715c045f66c..edc8cf2db70 100644
ATTRIBUTE_SECTION(malloc_hook);
void* mmap(void *start, size_t length,int prot, int flags,
int fd, off_t offset) __THROW
-@@ -178,7 +178,7 @@ extern "C" {
+@@ -159,7 +159,7 @@ extern "C" {
}
extern "C" void* mmap64(void *start, size_t length, int prot, int flags,
@@ -51,7 +51,7 @@ index 715c045f66c..edc8cf2db70 100644
MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset);
void *result;
if (!MallocHook::InvokeMmapReplacement(
-@@ -189,7 +189,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags,
+@@ -170,7 +170,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags,
return result;
}
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-linux-glibc-make-the-distinction.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-linux-glibc-make-the-distinction.patch
index c3069593..2fdc4944 100644
--- a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-linux-glibc-make-the-distinction.patch
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-linux-glibc-make-the-distinction.patch
@@ -1,4 +1,4 @@
-From 0bba2d9a7bbcc97126b1440db71364ff5aa8c5f8 Mon Sep 17 00:00:00 2001
+From 04a11fa6f38987091b6b65244950d3d83579c9a8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 14:54:38 -0700
Subject: [PATCH] chromium: musl: linux != glibc, make the distinction
@@ -9,7 +9,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chromium/base/allocator/allocator_check.cc b/chromium/base/allocator/allocator_check.cc
-index 9cd5d2207de..1e700956483 100644
+index 5fb86467dde..9864858eb67 100644
--- a/chromium/base/allocator/allocator_check.cc
+++ b/chromium/base/allocator/allocator_check.cc
@@ -27,7 +27,7 @@ bool IsAllocatorInitialized() {
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-tcmalloc-Use-off64_t-insread-of-__off6.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-tcmalloc-Use-off64_t-insread-of-__off6.patch
deleted file mode 100644
index 1ec4dd2b..00000000
--- a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-tcmalloc-Use-off64_t-insread-of-__off6.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From db18f880b833041e3151a3dc8541f7d35d43a4b5 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Sat, 8 Jul 2017 09:08:23 -0700
-Subject: [PATCH] chromium: musl: tcmalloc: Use off64_t insread of __off64_t
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- .../tcmalloc/chromium/src/base/linux_syscall_support.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h b/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h
-index 91f77dd88d4..bb84a0b3058 100644
---- a/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h
-+++ b/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h
-@@ -1929,7 +1929,7 @@ typedef unsigned long int ulong;
- #if defined(__x86_64__)
- /* Need to make sure __off64_t isn't truncated to 32-bits under x32. */
- LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d,
-- __off64_t o) {
-+ off64_t o) {
- LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l),
- LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f),
- LSS_SYSCALL_ARG(d), (uint64_t)(o));
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch
index 009e41fd..81d555f9 100644
--- a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch
@@ -1,4 +1,4 @@
-From 922a3f82d7810d23b4f735f5af4574993bde2974 Mon Sep 17 00:00:00 2001
+From 59ab7f11b90bd2114ff8cc16d6502e0ad6bb6538 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 15:09:02 -0700
Subject: [PATCH] chromium: musl: allocator: Do not include glibc_weak_symbols
@@ -10,10 +10,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chromium/base/allocator/allocator_shim.cc b/chromium/base/allocator/allocator_shim.cc
-index 4b7de5e1a32..fe565223f2b 100644
+index e6838ebda84..7296cc9ed81 100644
--- a/chromium/base/allocator/allocator_shim.cc
+++ b/chromium/base/allocator/allocator_shim.cc
-@@ -302,7 +302,7 @@ ALWAYS_INLINE void ShimFreeDefiniteSize(void* ptr, size_t size, void* context) {
+@@ -351,7 +351,7 @@ ALWAYS_INLINE void ShimAlignedFree(void* address, void* context) {
// In the case of tcmalloc we also want to plumb into the glibc hooks
// to avoid that allocations made in glibc itself (e.g., strdup()) get
// accidentally performed on the glibc heap instead of the tcmalloc one.
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-Use-correct-member-name-__si_fields-fr.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Use-correct-member-name-__si_fields-fr.patch
index 65bf1965..b611781b 100644
--- a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-Use-correct-member-name-__si_fields-fr.patch
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Use-correct-member-name-__si_fields-fr.patch
@@ -1,4 +1,4 @@
-From c3dddfccc66fdceb730674838e1676febc66587c Mon Sep 17 00:00:00 2001
+From b8735496287b7c2a15224f7d837dc74a09434bdb Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 15:12:39 -0700
Subject: [PATCH] chromium: musl: Use correct member name __si_fields from
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch
index 8582607c..4b531624 100644
--- a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch
@@ -1,4 +1,4 @@
-From 7638d64991e35b688aa9e1385925bc45f8589246 Mon Sep 17 00:00:00 2001
+From 09c0c63a65770465ef2ec0a3b028e22a9a0164f6 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 15:27:50 -0700
Subject: [PATCH] chromium: musl: Define res_ninit and res_nclose for non-glibc
@@ -13,11 +13,11 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
create mode 100644 chromium/net/dns/resolv_compat.h
diff --git a/chromium/net/dns/dns_config_service_posix.cc b/chromium/net/dns/dns_config_service_posix.cc
-index f2e66331e33..6fe84dd66af 100644
+index ee2d5721425..bcb83b07f6e 100644
--- a/chromium/net/dns/dns_config_service_posix.cc
+++ b/chromium/net/dns/dns_config_service_posix.cc
-@@ -27,6 +27,10 @@
- #include "net/dns/notify_watcher_mac.h"
+@@ -29,6 +29,10 @@
+ #include "net/dns/public/dns_protocol.h"
#include "net/dns/serial_worker.h"
+#if defined(OS_LINUX) && !defined(__GLIBC__)
@@ -28,7 +28,7 @@ index f2e66331e33..6fe84dd66af 100644
#include "net/dns/dns_config_watcher_mac.h"
#endif
diff --git a/chromium/net/dns/dns_reloader.cc b/chromium/net/dns/dns_reloader.cc
-index 322c8a5f0f7..72ff40dbe15 100644
+index 03e248c9878..9ccda82c7e9 100644
--- a/chromium/net/dns/dns_reloader.cc
+++ b/chromium/net/dns/dns_reloader.cc
@@ -9,6 +9,10 @@
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Do-not-define-__sbrk-on-musl.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-Do-not-define-__sbrk-on-musl.patch
index 5db4834b..b20456b0 100644
--- a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Do-not-define-__sbrk-on-musl.patch
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-Do-not-define-__sbrk-on-musl.patch
@@ -1,4 +1,4 @@
-From 2a49b947ad8e586229411bdd2a00bd496c9e3d0e Mon Sep 17 00:00:00 2001
+From 57ebdf59c45c70ab13b724a2293fdd78241a8a37 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 15:39:57 -0700
Subject: [PATCH] chromium: musl: Do not define __sbrk on musl
@@ -12,15 +12,15 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h b/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h
-index edc8cf2db70..a868b50d30f 100644
+index 59c1b6fb5f6..10f0786d829 100644
--- a/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h
+++ b/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h
-@@ -233,7 +233,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size,
+@@ -213,7 +213,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size,
+ return result;
}
- // Don't hook sbrk() in Android, since it doesn't expose __sbrk.
--#if !defined(__ANDROID__)
-+#if !defined(__ANDROID__) && defined(__GLIBC__)
+-#ifndef __UCLIBC__
++#if !defined(__UCLIBC__) && defined(__GLIBC__)
// libc's version:
- extern "C" void* __sbrk(ptrdiff_t increment);
+ extern "C" void* __sbrk(intptr_t increment);
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Adjust-default-pthread-stack-size.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-Adjust-default-pthread-stack-size.patch
index c0750a31..62b9531b 100644
--- a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Adjust-default-pthread-stack-size.patch
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-Adjust-default-pthread-stack-size.patch
@@ -1,4 +1,4 @@
-From 98af1531d71359612bbaa2a8619520ca4b6814bc Mon Sep 17 00:00:00 2001
+From 50d5b6fa29696c873830af7632b51cb4836c2210 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 7 Jul 2017 16:41:23 -0700
Subject: [PATCH] chromium: musl: Adjust default pthread stack size
@@ -6,14 +6,14 @@ Subject: [PATCH] chromium: musl: Adjust default pthread stack size
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
chromium/base/threading/platform_thread_linux.cc | 3 ++-
- chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp | 4 ++--
+ .../third_party/blink/renderer/platform/wtf/stack_util.cc | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/chromium/base/threading/platform_thread_linux.cc b/chromium/base/threading/platform_thread_linux.cc
-index 9917a7b1fd6..cb406659b90 100644
+index 095c49b8dc0..d1479b54d48 100644
--- a/chromium/base/threading/platform_thread_linux.cc
+++ b/chromium/base/threading/platform_thread_linux.cc
-@@ -173,7 +173,8 @@ void TerminateOnThread() {}
+@@ -186,7 +186,8 @@ void TerminateOnThread() {}
size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) {
#if !defined(THREAD_SANITIZER)
@@ -23,11 +23,11 @@ index 9917a7b1fd6..cb406659b90 100644
#else
// ThreadSanitizer bloats the stack heavily. Evidence has been that the
// default stack size isn't enough for some browser tests.
-diff --git a/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp b/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp
-index 13c3f907f8e..07308e08351 100644
---- a/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp
-+++ b/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp
-@@ -28,7 +28,7 @@ size_t GetUnderestimatedStackSize() {
+diff --git a/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc b/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc
+index b2421649ff3..a31b96e90e6 100644
+--- a/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc
++++ b/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc
+@@ -29,7 +29,7 @@ size_t GetUnderestimatedStackSize() {
// FIXME: On Mac OSX and Linux, this method cannot estimate stack size
// correctly for the main thread.
@@ -35,8 +35,8 @@ index 13c3f907f8e..07308e08351 100644
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
defined(OS_FUCHSIA)
// pthread_getattr_np() can fail if the thread is not invoked by
- // pthread_create() (e.g., the main thread of webkit_unit_tests).
-@@ -96,7 +96,7 @@ size_t GetUnderestimatedStackSize() {
+ // pthread_create() (e.g., the main thread of blink_unittests).
+@@ -97,7 +97,7 @@ return Threading::ThreadStackSize();
}
void* GetStackStart() {
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch
index 12bea67f..7ed278b0 100644
--- a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch
@@ -1,4 +1,4 @@
-From 3b87874627418a66bb082ba7825849c073b2c19d Mon Sep 17 00:00:00 2001
+From 1f839bf6ac48d81a8acbf3def4f57a555a05fa18 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 25 Sep 2018 12:35:07 -0700
Subject: [PATCH] chromium: musl: Use _fpstate instead of _libc_fpstate on
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc b/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
-index 052ce37cb44..95b0fb44e12 100644
+index 6ee6cc1e4cd..a8f9ccc72ac 100644
--- a/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
+++ b/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
@@ -49,7 +49,7 @@ uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch
index 0ff26e51..34761950 100644
--- a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch
@@ -1,4 +1,4 @@
-From c1a7511a323997411728689078946122d176551b Mon Sep 17 00:00:00 2001
+From 8f16cec0583c9de1ceb2c34a3bea527096f34075 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 25 Sep 2018 12:59:05 -0700
Subject: [PATCH] chromium: musl: elf_reader.cc: include <sys/reg.h> to get
@@ -13,7 +13,7 @@ Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/chromium/third_party/breakpad/breakpad/configure.ac b/chromium/third_party/breakpad/breakpad/configure.ac
-index ec194ddd203..767c2af11ee 100644
+index 492d09038f9..a6403ed8c3c 100644
--- a/chromium/third_party/breakpad/breakpad/configure.ac
+++ b/chromium/third_party/breakpad/breakpad/configure.ac
@@ -72,7 +72,7 @@ AC_ARG_ENABLE(m32,
diff --git a/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0023-chromium-musl-pread-pwrite.patch b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0023-chromium-musl-pread-pwrite.patch
new file mode 100644
index 00000000..631ae8a0
--- /dev/null
+++ b/external/meta-qt5/recipes-qt/qt5/qtwebengine/chromium/0023-chromium-musl-pread-pwrite.patch
@@ -0,0 +1,31 @@
+From 725941687b118b90904fbc7e6b25a288b9d3c52b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 23 Dec 2018 16:58:04 -0800
+Subject: [PATCH] chromium: musl: pread pwrite
+
+Redefine pread/pwrite in terms of 64bit variants on musl
+since 32bit variants don't exist and aliases are not defined in
+libc either
+
+Upstream-Status: Submitted [https://codereview.chromium.org/1743093002/]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ chromium/third_party/lss/linux_syscall_support.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/chromium/third_party/lss/linux_syscall_support.h b/chromium/third_party/lss/linux_syscall_support.h
+index 622cc1fbf7e..cd561b80c05 100644
+--- a/chromium/third_party/lss/linux_syscall_support.h
++++ b/chromium/third_party/lss/linux_syscall_support.h
+@@ -1239,6 +1239,11 @@ struct kernel_statfs {
+ #ifndef __NR_fallocate
+ #define __NR_fallocate 285
+ #endif
++#undef __NR_pread
++#define __NR_pread __NR_pread64
++#undef __NR_pwrite
++#define __NR_pwrite __NR_pwrite64
++
+ /* End of x86-64 definitions */
+ #elif defined(__mips__)
+ #if _MIPS_SIM == _MIPS_SIM_ABI32