From ca649e3f6f03c5351a090852ff93a23e7382c86a Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Wed, 8 Jan 2020 14:10:13 +0200 Subject: qt5: Update to Qt 5.14.0 Signed-off-by: Samuli Piippo --- .../0002-chromium-stack-pointer-clobber.patch | 24 +++------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'recipes-qt/qt5/qtwebengine/chromium/0002-chromium-stack-pointer-clobber.patch') diff --git a/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-stack-pointer-clobber.patch b/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-stack-pointer-clobber.patch index 1c975aed..ed7f78f6 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-stack-pointer-clobber.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-stack-pointer-clobber.patch @@ -13,22 +13,13 @@ of flagging this silent ignoring via [1] Upstream-Status: Submitted [https://chromium-review.googlesource.com/c/linux-syscall-support/+/1390160] Signed-off-by: Khem Raj --- - chromium/third_party/lss/linux_syscall_support.h | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) + 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 5d9c2e8582f..e19e51dd304 100644 +index 9276f56..622cc1f 100644 --- a/chromium/third_party/lss/linux_syscall_support.h +++ b/chromium/third_party/lss/linux_syscall_support.h -@@ -1964,7 +1964,7 @@ struct kernel_statfs { - __asm__ volatile(LSS_ENTRYPOINT \ - : "=a" (__res) \ - : "0" (__NR_##name) \ -- : "esp", "memory"); \ -+ : "memory"); \ - LSS_RETURN(type,__res); \ - } - #undef _syscall1 @@ -2012,7 +2012,7 @@ struct kernel_statfs { : "i" (__NR_##name), "ri" ((long)(arg1)), \ "c" ((long)(arg2)), "d" ((long)(arg3)), \ @@ -56,12 +47,3 @@ index 5d9c2e8582f..e19e51dd304 100644 LSS_RETURN(int, __res); } -@@ -2405,7 +2405,7 @@ struct kernel_statfs { - "d"(LSS_SYSCALL_ARG(parent_tidptr)), - "r"(LSS_SYSCALL_ARG(newtls)), - "r"(LSS_SYSCALL_ARG(child_tidptr)) -- : "rsp", "memory", "r8", "r10", "r11", "rcx"); -+ : "memory", "r8", "r10", "r11", "rcx"); - } - LSS_RETURN(int, __res); - } -- cgit v1.2.3-54-g00ecf From b814111ed28cab46d9d896919b2b5fe308614e1d Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Sat, 11 Jan 2020 14:55:56 +0100 Subject: qtwebengine: refresh the patches and upload them to meta-qt5 forks on github for maintenance * fixes 0004-mkspecs-Allow-builds-with-libc-glibc.patch which didn't apply at all, because the modified mkspecs/features/configure.prf was dropped completely in: commit 047d61f188aae3fe3ebc689900b8a5c9fb6e901d Author: Michal Klocek michal.klocek@qt.io Date: Fri Aug 9 17:40:29 2019 +0200 Add webengine-core feature The same chunk can be found in src/buildtools/config/support.pri, so I've updated the .patch accordingly, but haven't tried the build with musl yet. * fixes 0023-chromium-Move-CharAllocator-definition-to-a-header-f.patch to apply ERROR: qtwebengine-5.14.0+gitAUTOINC+d366f1d5d3_939daf833f-r0 do_patch: Command Error: 'quilt --quiltrc /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/qtwebengine/5.14.0+gitAUTOINC+d366f1d5d3_939daf833f-r0/recipe-sysroot-native/etc/quiltrc push' exited with 0 Output: Applying patch 0023-chromium-Move-CharAllocator-definition-to-a-header-f.patch patching file chromium/cc/base/list_container_helper.cc Hunk #1 FAILED at 13. 1 out of 1 hunk FAILED -- rejects in file chromium/cc/base/list_container_helper.cc patching file chromium/cc/base/list_container_helper.h Hunk #1 FAILED at 8. Hunk #2 succeeded at 174 with fuzz 1. 1 out of 2 hunks FAILED -- rejects in file chromium/cc/base/list_container_helper.h Patch 0023-chromium-Move-CharAllocator-definition-to-a-header-f.patch does not apply (enforce with -f) ERROR: Logfile of failure stored in: /OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/qtwebengine/5.14.0+gitAUTOINC+d366f1d5d3_939daf833f-r0/temp/log.do_patch.21067 NOTE: recipe qtwebengine-5.14.0+gitAUTOINC+d366f1d5d3_939daf833f-r0: task do_patch: Failed ERROR: Task (/OE/build/oe-core/meta-qt5/recipes-qt/qt5/qtwebengine_git.bb:do_patch) failed with exit code '1' * build is still going (it will be a while on my slow builder) Signed-off-by: Martin Jansa --- .../0001-Force-host-toolchain-configuration.patch | 8 +- ...use-pvalloc-as-it-s-not-available-on-musl.patch | 2 +- .../0003-musl-link-against-libexecinfo.patch | 4 +- ...0004-mkspecs-Allow-builds-with-libc-glibc.patch | 35 +- ...um-workaround-for-too-long-.rps-file-name.patch | 2 +- .../0002-chromium-stack-pointer-clobber.patch | 4 +- .../0003-chromium-fix-build-with-clang.patch | 4 +- ...0004-chromium-Exclude-CRC32-for-32bit-arm.patch | 4 +- ...-not-try-to-set-the-guessed-values-for-ma.patch | 4 +- .../0006-chromium-aarch64-skia-build-fix.patch | 6 +- ...um-fix-build-after-y2038-changes-in-glibc.patch | 4 +- ...x-build-on-32bit-arches-with-64bit-time_t.patch | 68 +++ ...sl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch | 33 -- ...ium-Include-cstddef-for-size_t-definition.patch | 48 ++ ...sl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch | 52 -- ...ve-CharAllocator-definition-to-a-header-f.patch | 554 +++++++++++++++++++++ ...-chromium-musl-include-fcntl.h-for-loff_t.patch | 22 - ...sl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch | 33 ++ ...sl-use-off64_t-instead-of-the-internal-__.patch | 62 --- ...sl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch | 52 ++ ...ium-musl-linux-glibc-make-the-distinction.patch | 23 - ...sl-allocator-Do-not-include-glibc_weak_sy.patch | 24 - ...-chromium-musl-include-fcntl.h-for-loff_t.patch | 22 + ...sl-Use-correct-member-name-__si_fields-fr.patch | 24 - ...sl-use-off64_t-instead-of-the-internal-__.patch | 62 +++ ...sl-Define-res_ninit-and-res_nclose-for-no.patch | 79 --- ...ium-musl-linux-glibc-make-the-distinction.patch | 23 + ...hromium-musl-Do-not-define-__sbrk-on-musl.patch | 26 - ...sl-allocator-Do-not-include-glibc_weak_sy.patch | 24 + ...um-musl-Adjust-default-pthread-stack-size.patch | 47 -- ...sl-Use-correct-member-name-__si_fields-fr.patch | 24 + ...sl-Define-res_ninit-and-res_nclose-for-no.patch | 79 +++ ...sl-Use-_fpstate-instead-of-_libc_fpstate-.patch | 63 --- ...hromium-musl-Do-not-define-__sbrk-on-musl.patch | 26 + ...sl-elf_reader.cc-include-sys-reg.h-to-get.patch | 56 --- ...um-musl-Adjust-default-pthread-stack-size.patch | 47 ++ .../chromium/0020-chromium-musl-pread-pwrite.patch | 31 -- ...x-build-on-32bit-arches-with-64bit-time_t.patch | 70 --- ...sl-Use-_fpstate-instead-of-_libc_fpstate-.patch | 63 +++ ...ium-Include-cstddef-for-size_t-definition.patch | 43 -- ...sl-elf_reader.cc-include-sys-reg.h-to-get.patch | 56 +++ ...ve-CharAllocator-definition-to-a-header-f.patch | 551 -------------------- .../chromium/0023-chromium-musl-pread-pwrite.patch | 31 ++ recipes-qt/qt5/qtwebengine_git.bb | 40 +- 44 files changed, 1269 insertions(+), 1266 deletions(-) create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0008-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Include-cstddef-for-size_t-definition.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0010-chromium-Move-CharAllocator-definition-to-a-header-f.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-include-fcntl.h-for-loff_t.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-use-off64_t-instead-of-the-internal-__.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-linux-glibc-make-the-distinction.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-include-fcntl.h-for-loff_t.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-Use-correct-member-name-__si_fields-fr.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-use-off64_t-instead-of-the-internal-__.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-linux-glibc-make-the-distinction.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Do-not-define-__sbrk-on-musl.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Adjust-default-pthread-stack-size.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Use-correct-member-name-__si_fields-fr.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-Do-not-define-__sbrk-on-musl.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-Adjust-default-pthread-stack-size.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-pread-pwrite.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0021-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0022-chromium-Include-cstddef-for-size_t-definition.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0023-chromium-Move-CharAllocator-definition-to-a-header-f.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0023-chromium-musl-pread-pwrite.patch (limited to 'recipes-qt/qt5/qtwebengine/chromium/0002-chromium-stack-pointer-clobber.patch') diff --git a/recipes-qt/qt5/qtwebengine/0001-Force-host-toolchain-configuration.patch b/recipes-qt/qt5/qtwebengine/0001-Force-host-toolchain-configuration.patch index 7bda76a2..6b3f6ba6 100644 --- a/recipes-qt/qt5/qtwebengine/0001-Force-host-toolchain-configuration.patch +++ b/recipes-qt/qt5/qtwebengine/0001-Force-host-toolchain-configuration.patch @@ -1,4 +1,4 @@ -From f3f2b6b42d546280a17169ea340d8bef82496516 Mon Sep 17 00:00:00 2001 +From cdadaf40267c81ff730e90798cf486b35bb20758 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Wed, 15 Mar 2017 13:53:28 +0200 Subject: [PATCH] Force host toolchain configuration @@ -19,7 +19,7 @@ Signed-off-by: Samuli Piippo 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/buildtools/config/linux.pri b/src/buildtools/config/linux.pri -index 998aedc..b04db36 100644 +index ee08f81b..297a6862 100644 --- a/src/buildtools/config/linux.pri +++ b/src/buildtools/config/linux.pri @@ -124,7 +124,7 @@ contains(QT_ARCH, "mips") { @@ -32,7 +32,7 @@ index 998aedc..b04db36 100644 # Don't bother trying to use system libraries in this case gn_args += use_glib=false diff --git a/src/buildtools/configure_host.pro b/src/buildtools/configure_host.pro -index dd0d3e3..6312c86 100644 +index dd0d3e32..6312c867 100644 --- a/src/buildtools/configure_host.pro +++ b/src/buildtools/configure_host.pro @@ -4,7 +4,7 @@ TEMPLATE = aux @@ -71,7 +71,7 @@ index dd0d3e3..6312c86 100644 " nm = \"$$which(nm)\" " \ " toolchain_args = { " \ diff --git a/src/buildtools/gn.pro b/src/buildtools/gn.pro -index 033202e..a8ca656 100644 +index 033202e6..a8ca6567 100644 --- a/src/buildtools/gn.pro +++ b/src/buildtools/gn.pro @@ -19,8 +19,8 @@ build_pass|!debug_and_release { diff --git a/recipes-qt/qt5/qtwebengine/0002-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch b/recipes-qt/qt5/qtwebengine/0002-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch index ffdf0d05..63a800e4 100644 --- a/recipes-qt/qt5/qtwebengine/0002-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch +++ b/recipes-qt/qt5/qtwebengine/0002-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch @@ -1,4 +1,4 @@ -From 0402c28580b96c8c8953ea85144f4874f8768622 Mon Sep 17 00:00:00 2001 +From 312f6955af1dc6ea61bbd48bece794c1257822fa Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Tue, 12 Dec 2017 16:06:14 +0200 Subject: [PATCH] musl: don't use pvalloc as it's not available on musl diff --git a/recipes-qt/qt5/qtwebengine/0003-musl-link-against-libexecinfo.patch b/recipes-qt/qt5/qtwebengine/0003-musl-link-against-libexecinfo.patch index c56c68f1..5c8e1052 100644 --- a/recipes-qt/qt5/qtwebengine/0003-musl-link-against-libexecinfo.patch +++ b/recipes-qt/qt5/qtwebengine/0003-musl-link-against-libexecinfo.patch @@ -1,4 +1,4 @@ -From 6b5a763cd223ab14bb840738b3871a79d1fb69ea Mon Sep 17 00:00:00 2001 +From 8c66e08c65963cd2eeabe84e89445dbe557c23ae Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 14 Dec 2017 11:28:10 +0200 Subject: [PATCH] musl: link against libexecinfo @@ -10,7 +10,7 @@ Signed-off-by: Samuli Piippo 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/core_module.pro b/src/core/core_module.pro -index b220af4a..ff54e5d7 100644 +index 4b9268e1..be04b160 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro @@ -58,7 +58,7 @@ linux { diff --git a/recipes-qt/qt5/qtwebengine/0004-mkspecs-Allow-builds-with-libc-glibc.patch b/recipes-qt/qt5/qtwebengine/0004-mkspecs-Allow-builds-with-libc-glibc.patch index 73ef469f..5c3eafb5 100644 --- a/recipes-qt/qt5/qtwebengine/0004-mkspecs-Allow-builds-with-libc-glibc.patch +++ b/recipes-qt/qt5/qtwebengine/0004-mkspecs-Allow-builds-with-libc-glibc.patch @@ -1,29 +1,26 @@ -From a5c8d833ffb8b54626b7b670b2782a6cf9a45075 Mon Sep 17 00:00:00 2001 +From 71d55292cdd72dcf1ed5eb4ba7299433a35a4bb0 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 12 Nov 2019 19:53:59 -0800 Subject: [PATCH] mkspecs: Allow builds with libc != glibc Signed-off-by: Khem Raj --- - mkspecs/features/configure.prf | 5 ----- + src/buildtools/config/support.pri | 5 ----- 1 file changed, 5 deletions(-) -diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf -index cc84182b..c278ffae 100644 ---- a/mkspecs/features/configure.prf -+++ b/mkspecs/features/configure.prf -@@ -75,11 +75,6 @@ defineTest(runConfigure) { - return(false) - } +diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri +index 5bdd808d..19540787 100644 +--- a/src/buildtools/config/support.pri ++++ b/src/buildtools/config/support.pri +@@ -89,11 +89,6 @@ defineTest(qtwebengine_checkErrorForLinux) { + return(false) + } -- !qtConfig(webengine-system-glibc) { -- skipBuild("A suitable version >= 2.27 of libc could not be found.") -- return(false) -- } +- !qtConfig(webengine-system-glibc) { +- qtwebengine_skipBuild("A suitable version >= 2.27 of libc required to build QtWebEngine could not be found.") +- return(false) +- } - - QT_FOR_CONFIG += gui-private - - !qtConfig(webengine-system-khr) { --- -2.24.0 - + !qtConfig(webengine-system-khr) { + qtwebengine_skipBuild("Khronos development headers required to build QtWebEngine are missing (see mesa/libegl1-mesa-dev)") + return(false) diff --git a/recipes-qt/qt5/qtwebengine/chromium/0001-chromium-workaround-for-too-long-.rps-file-name.patch b/recipes-qt/qt5/qtwebengine/chromium/0001-chromium-workaround-for-too-long-.rps-file-name.patch index 1bcea021..ff2cf2ed 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0001-chromium-workaround-for-too-long-.rps-file-name.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0001-chromium-workaround-for-too-long-.rps-file-name.patch @@ -1,4 +1,4 @@ -From 97bbc1219c360f3a27aa9b8bf21dd4b755c979b6 Mon Sep 17 00:00:00 2001 +From 8dc7d83d58f6f036d021ed27dd05322b654e21bf Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 30 Mar 2017 11:37:24 +0300 Subject: [PATCH] chromium: workaround for too long .rps file name diff --git a/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-stack-pointer-clobber.patch b/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-stack-pointer-clobber.patch index ed7f78f6..e2e86212 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-stack-pointer-clobber.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-stack-pointer-clobber.patch @@ -1,4 +1,4 @@ -From 90881e8b608658e766bcf96fc62d97b39e005f01 Mon Sep 17 00:00:00 2001 +From dcc7962a9e9eb8fc10728df0b72e91794d1ee9d9 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 23 Dec 2018 16:58:04 -0800 Subject: [PATCH] chromium: stack pointer clobber @@ -17,7 +17,7 @@ Signed-off-by: Khem Raj 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 9276f56..622cc1f 100644 +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 { diff --git a/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-fix-build-with-clang.patch b/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-fix-build-with-clang.patch index 278a9b0c..55f61d03 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-fix-build-with-clang.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-fix-build-with-clang.patch @@ -1,4 +1,4 @@ -From 156dd87c5579c355a8668c6b78c3853f2d288846 Mon Sep 17 00:00:00 2001 +From e44d59aff5c23049ed765d872b167c27f9d2be23 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 2 Feb 2019 19:28:59 -0800 Subject: [PATCH] chromium: fix build with clang @@ -10,7 +10,7 @@ Signed-off-by: Khem Raj 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn -index 17f486447fe..06c93e5b3cf 100644 +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") { diff --git a/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Exclude-CRC32-for-32bit-arm.patch b/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Exclude-CRC32-for-32bit-arm.patch index bb628fd2..e5c1dcbd 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Exclude-CRC32-for-32bit-arm.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Exclude-CRC32-for-32bit-arm.patch @@ -1,4 +1,4 @@ -From ed03bdbaaa07414a310414e9fa7624acf6241b19 Mon Sep 17 00:00:00 2001 +From fc3765e4f2f8cff17a13736085a402425696e6e7 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 5 Feb 2019 14:32:20 -0800 Subject: [PATCH] chromium: Exclude CRC32 for 32bit arm @@ -15,7 +15,7 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chromium/third_party/zlib/BUILD.gn b/chromium/third_party/zlib/BUILD.gn -index 29dda54..6870dbb 100644 +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) { diff --git a/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch b/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch index 12128d3c..c9df775d 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch @@ -1,4 +1,4 @@ -From 85a1cd44983263b59942d83bd7626ed4700b29fe Mon Sep 17 00:00:00 2001 +From 998a4037e9c057c9735d8b0df57c2eca5b452d0b Mon Sep 17 00:00:00 2001 From: Johannes Pointner Date: Fri, 3 May 2019 09:12:38 +0200 Subject: [PATCH] chromium: Do not try to set the guessed values for @@ -17,7 +17,7 @@ Signed-off-by: Johannes Pointner 1 file changed, 9 deletions(-) diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn -index 06c93e5b3cf..8ba0f8a3109 100644 +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") { diff --git a/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-aarch64-skia-build-fix.patch b/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-aarch64-skia-build-fix.patch index 4dafd779..6a659ae9 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-aarch64-skia-build-fix.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-aarch64-skia-build-fix.patch @@ -1,4 +1,4 @@ -From 89338139ee40ab93065a915dcde9af79ba52b381 Mon Sep 17 00:00:00 2001 +From 2ce7742c9dfde9ccbf2ede0db6359beb18c49189 Mon Sep 17 00:00:00 2001 From: Raphael Kubo da Costa Date: Thu, 8 Mar 2018 15:39:55 +0100 Subject: [PATCH] chromium: aarch64 skia build fix @@ -24,11 +24,11 @@ moment. Signed-off-by: Raphael Kubo da Costa --- - .../third_party/skia/src/opts/SkRasterPipeline_opts.h | 17 ++--------------- + .../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 b59506d..b8f22c9 100644 +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) { diff --git a/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-fix-build-after-y2038-changes-in-glibc.patch b/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-fix-build-after-y2038-changes-in-glibc.patch index 6d9f73e4..aeb496bd 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-fix-build-after-y2038-changes-in-glibc.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-fix-build-after-y2038-changes-in-glibc.patch @@ -1,4 +1,4 @@ -From 5408581e2ac5225ba2c6d6b0d88636751930577d Mon Sep 17 00:00:00 2001 +From a0bd9300aa9c405216f504d602c7dd8d5b35eb21 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Thu, 11 Jul 2019 09:35:13 +0200 Subject: [PATCH] chromium: fix build after y2038 changes in glibc @@ -15,7 +15,7 @@ Upstream-Status: Pending 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 c38d7fdfac9..575e0001ca1 100644 +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; diff --git a/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/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/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 +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 +Signed-off-by: Martin Jansa +--- + 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(×tamp); + 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/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch b/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch deleted file mode 100644 index e03df6f4..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch +++ /dev/null @@ -1,33 +0,0 @@ -From be5e6f573faedf13d6f327bd168a3d90e840a3ae Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 7 Jul 2017 14:01:12 -0700 -Subject: [PATCH] chromium: musl: sandbox: Define TEMP_FAILURE_RETRY if not - defined - -Musl does not define this Macro - -Signed-off-by: Khem Raj ---- - chromium/sandbox/linux/suid/sandbox.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/chromium/sandbox/linux/suid/sandbox.c b/chromium/sandbox/linux/suid/sandbox.c -index 854819bfbb4..a99d32741d0 100644 ---- a/chromium/sandbox/linux/suid/sandbox.c -+++ b/chromium/sandbox/linux/suid/sandbox.c -@@ -46,6 +46,15 @@ static bool DropRoot(); - - #define HANDLE_EINTR(x) TEMP_FAILURE_RETRY(x) - -+#ifndef TEMP_FAILURE_RETRY -+# define TEMP_FAILURE_RETRY(expression) \ -+ (__extension__ \ -+ ({ long int __result; \ -+ do __result = (long int) (expression); \ -+ while (__result == -1L && errno == EINTR); \ -+ __result; })) -+#endif -+ - static void FatalError(const char* msg, ...) - __attribute__((noreturn, format(printf, 1, 2))); - diff --git a/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Include-cstddef-for-size_t-definition.patch b/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Include-cstddef-for-size_t-definition.patch new file mode 100644 index 00000000..1f4a7c14 --- /dev/null +++ b/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 +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 + +ccc + +Signed-off-by: Khem Raj +--- + .../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 ++#include + + 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 + #include + #include ++#include + + namespace webrtc { + diff --git a/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch b/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch deleted file mode 100644 index 6df3ce0e..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 51795812310685d2a392e3592b238a6fb92b75d3 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 7 Jul 2017 14:09:06 -0700 -Subject: [PATCH] chromium: musl: Avoid mallinfo() APIs on non-glibc/linux - -Signed-off-by: Khem Raj ---- - chromium/base/process/process_metrics_posix.cc | 4 ++-- - 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 a09bbf2c56e..b309f6b694e 100644 ---- a/chromium/base/process/process_metrics_posix.cc -+++ b/chromium/base/process/process_metrics_posix.cc -@@ -100,14 +100,14 @@ size_t ProcessMetrics::GetMallocUsage() { - malloc_statistics_t stats = {0}; - malloc_zone_statistics(nullptr, &stats); - return stats.size_in_use; --#elif defined(OS_LINUX) || defined(OS_ANDROID) -+#elif defined(__GLIBC__) || defined(OS_ANDROID) - struct mallinfo minfo = mallinfo(); - #if defined(USE_TCMALLOC) - return minfo.uordblks; - #else - return minfo.hblkhd + minfo.arena; - #endif --#elif defined(OS_FUCHSIA) -+#else - // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. - return 0; - #endif -diff --git a/chromium/base/trace_event/malloc_dump_provider.cc b/chromium/base/trace_event/malloc_dump_provider.cc -index 0077d8b0aec..c69f893f4e9 100644 ---- a/chromium/base/trace_event/malloc_dump_provider.cc -+++ b/chromium/base/trace_event/malloc_dump_provider.cc -@@ -77,6 +77,7 @@ MallocDumpProvider::~MallocDumpProvider() = default; - // the current process. - bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, - ProcessMemoryDump* pmd) { -+#if defined(__GLIBC__) - { - base::AutoLock auto_lock(emit_metrics_on_memory_dump_lock_); - if (!emit_metrics_on_memory_dump_) -@@ -172,6 +173,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, - MemoryAllocatorDump::kUnitsBytes, - resident_size - allocated_objects_size); - } -+#endif // __GLIBC__ - return true; - } - diff --git a/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-Move-CharAllocator-definition-to-a-header-f.patch b/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/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 +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 +--- + 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 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 new_data( +- static_cast(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 new_list(new InnerList); +- new_list->capacity = list_size; +- new_list->size = 0; +- new_list->step = element_size_; +- new_list->data.reset(static_cast( +- base::AlignedAlloc(list_size * element_size_, alignment_))); +- storage_.push_back(std::move(new_list)); +- } +- +- std::vector> 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 + + #include ++#include ++#include + ++#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 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 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 new_data( ++ static_cast(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 new_list(new InnerList); ++ new_list->capacity = list_size; ++ new_list->size = 0; ++ new_list->step = element_size_; ++ new_list->data.reset(static_cast( ++ base::AlignedAlloc(list_size * element_size_, alignment_))); ++ storage_.push_back(std::move(new_list)); ++ } ++ ++ std::vector> 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/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-include-fcntl.h-for-loff_t.patch b/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-include-fcntl.h-for-loff_t.patch deleted file mode 100644 index a4cffc76..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-include-fcntl.h-for-loff_t.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 67c66a3af0a0268f1ab9a9af47d002cd75b57ca1 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 7 Jul 2017 14:37:49 -0700 -Subject: [PATCH] chromium: musl: include fcntl.h for loff_t - -Signed-off-by: Khem Raj ---- - .../tcmalloc/chromium/src/base/linux_syscall_support.h | 1 + - 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 13aa415e250..9d1309b836f 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 -@@ -154,6 +154,7 @@ extern "C" { - #include - #include - #include -+#include - #include - #include - #include diff --git a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch new file mode 100644 index 00000000..3e595591 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch @@ -0,0 +1,33 @@ +From d38a63908f5c49705abd85bd9c2aee0ec334221d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 14:01:12 -0700 +Subject: [PATCH] chromium: musl: sandbox: Define TEMP_FAILURE_RETRY if not + defined + +Musl does not define this Macro + +Signed-off-by: Khem Raj +--- + chromium/sandbox/linux/suid/sandbox.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/chromium/sandbox/linux/suid/sandbox.c b/chromium/sandbox/linux/suid/sandbox.c +index 854819bfbb4..a99d32741d0 100644 +--- a/chromium/sandbox/linux/suid/sandbox.c ++++ b/chromium/sandbox/linux/suid/sandbox.c +@@ -46,6 +46,15 @@ static bool DropRoot(); + + #define HANDLE_EINTR(x) TEMP_FAILURE_RETRY(x) + ++#ifndef TEMP_FAILURE_RETRY ++# define TEMP_FAILURE_RETRY(expression) \ ++ (__extension__ \ ++ ({ long int __result; \ ++ do __result = (long int) (expression); \ ++ while (__result == -1L && errno == EINTR); \ ++ __result; })) ++#endif ++ + static void FatalError(const char* msg, ...) + __attribute__((noreturn, format(printf, 1, 2))); + diff --git a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-use-off64_t-instead-of-the-internal-__.patch b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-use-off64_t-instead-of-the-internal-__.patch deleted file mode 100644 index c09d7ad0..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-use-off64_t-instead-of-the-internal-__.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 612a1903c096dc497ecf2324a97fdab000dc1ae3 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 7 Jul 2017 14:38:37 -0700 -Subject: [PATCH] chromium: musl: use off64_t instead of the internal __off64_t - -- only do the glibc 32-bit ABI check for mmap/mmap64 on gnu libc. musl - does not support the 32-bit ABI. - -Signed-off-by: Khem Raj ---- - .../tcmalloc/chromium/src/malloc_hook_mmap_linux.h | 10 +++++----- - 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 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 -@@ -60,7 +60,7 @@ - - static inline void* do_mmap64(void *start, size_t length, - int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ 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); -@@ -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, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - void *result; - - // Try mmap2() unless it's not supported -@@ -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, -- int fd, __off64_t offset ) __THROW -+ int fd, off64_t offset ) __THROW - ATTRIBUTE_SECTION(malloc_hook); - void* mmap(void *start, size_t length,int prot, int flags, - int fd, off_t offset) __THROW -@@ -159,7 +159,7 @@ extern "C" { - } - - extern "C" void* mmap64(void *start, size_t length, int prot, int flags, -- int fd, __off64_t offset) __THROW { -+ int fd, off64_t offset) __THROW { - MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset); - void *result; - if (!MallocHook::InvokeMmapReplacement( -@@ -170,7 +170,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, - return result; - } - --# if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) -+# if defined(__GLIBC__) && (!defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH)) - - extern "C" void* mmap(void *start, size_t length, int prot, int flags, - int fd, off_t offset) __THROW { diff --git a/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch new file mode 100644 index 00000000..2fdb0d82 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch @@ -0,0 +1,52 @@ +From 4b16ad982ff10945a37a7dd90735a5a1be3d6a8b Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 14:09:06 -0700 +Subject: [PATCH] chromium: musl: Avoid mallinfo() APIs on non-glibc/linux + +Signed-off-by: Khem Raj +--- + chromium/base/process/process_metrics_posix.cc | 4 ++-- + 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 5763432aa4f..ff00b7307c0 100644 +--- a/chromium/base/process/process_metrics_posix.cc ++++ b/chromium/base/process/process_metrics_posix.cc +@@ -109,14 +109,14 @@ size_t ProcessMetrics::GetMallocUsage() { + malloc_statistics_t stats = {0}; + malloc_zone_statistics(nullptr, &stats); + return stats.size_in_use; +-#elif defined(OS_LINUX) || defined(OS_ANDROID) ++#elif defined(__GLIBC__) || defined(OS_ANDROID) + struct mallinfo minfo = mallinfo(); + #if defined(USE_TCMALLOC) + return minfo.uordblks; + #else + return minfo.hblkhd + minfo.arena; + #endif +-#elif defined(OS_FUCHSIA) ++#else + // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. + return 0; + #endif +diff --git a/chromium/base/trace_event/malloc_dump_provider.cc b/chromium/base/trace_event/malloc_dump_provider.cc +index 0077d8b0aec..c69f893f4e9 100644 +--- a/chromium/base/trace_event/malloc_dump_provider.cc ++++ b/chromium/base/trace_event/malloc_dump_provider.cc +@@ -77,6 +77,7 @@ MallocDumpProvider::~MallocDumpProvider() = default; + // the current process. + bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, + ProcessMemoryDump* pmd) { ++#if defined(__GLIBC__) + { + base::AutoLock auto_lock(emit_metrics_on_memory_dump_lock_); + if (!emit_metrics_on_memory_dump_) +@@ -172,6 +173,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, + MemoryAllocatorDump::kUnitsBytes, + resident_size - allocated_objects_size); + } ++#endif // __GLIBC__ + return true; + } + diff --git a/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-linux-glibc-make-the-distinction.patch b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-linux-glibc-make-the-distinction.patch deleted file mode 100644 index e2c738ae..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-linux-glibc-make-the-distinction.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 4ba6b9ae21289cbaa04b531082e1089c06c845bc Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 7 Jul 2017 14:54:38 -0700 -Subject: [PATCH] chromium: musl: linux != glibc, make the distinction - -Signed-off-by: Khem Raj ---- - chromium/base/allocator/allocator_check.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/chromium/base/allocator/allocator_check.cc b/chromium/base/allocator/allocator_check.cc -index 5fb86467dde..9864858eb67 100644 ---- a/chromium/base/allocator/allocator_check.cc -+++ b/chromium/base/allocator/allocator_check.cc -@@ -27,7 +27,7 @@ bool IsAllocatorInitialized() { - // Set by allocator_shim_override_ucrt_symbols_win.h when the - // shimmed _set_new_mode() is called. - return g_is_win_shim_layer_initialized; --#elif defined(OS_LINUX) && defined(USE_TCMALLOC) && \ -+#elif defined(__GLIBC__) && defined(USE_TCMALLOC) && \ - !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) - // From third_party/tcmalloc/chromium/src/gperftools/tcmalloc.h. - // TODO(primiano): replace with an include once base can depend on allocator. diff --git a/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch deleted file mode 100644 index ec54908b..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 02c6554c372709fd8573d66e4f128ffe0d74f237 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 7 Jul 2017 15:09:02 -0700 -Subject: [PATCH] chromium: musl: allocator: Do not include glibc_weak_symbols - for musl - -Signed-off-by: Khem Raj ---- - chromium/base/allocator/allocator_shim.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/chromium/base/allocator/allocator_shim.cc b/chromium/base/allocator/allocator_shim.cc -index 1233ae2a8aa..6f1b3e87224 100644 ---- a/chromium/base/allocator/allocator_shim.cc -+++ b/chromium/base/allocator/allocator_shim.cc -@@ -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. --#if defined(USE_TCMALLOC) -+#if defined(USE_TCMALLOC) && defined(__GLIBC__) - #include "base/allocator/allocator_shim_override_glibc_weak_symbols.h" - #endif - diff --git a/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-include-fcntl.h-for-loff_t.patch b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-include-fcntl.h-for-loff_t.patch new file mode 100644 index 00000000..05576b02 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-include-fcntl.h-for-loff_t.patch @@ -0,0 +1,22 @@ +From e087d26af9bdd2f045f8a81fdd2688c50b77e938 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 14:37:49 -0700 +Subject: [PATCH] chromium: musl: include fcntl.h for loff_t + +Signed-off-by: Khem Raj +--- + .../tcmalloc/chromium/src/base/linux_syscall_support.h | 1 + + 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 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 +@@ -154,6 +154,7 @@ extern "C" { + #include + #include + #include ++#include + #include + #include + #include diff --git a/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-Use-correct-member-name-__si_fields-fr.patch b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-Use-correct-member-name-__si_fields-fr.patch deleted file mode 100644 index c9080a07..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-Use-correct-member-name-__si_fields-fr.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 1099551ba6ee52734d14c29232837720a7454669 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 7 Jul 2017 15:12:39 -0700 -Subject: [PATCH] chromium: musl: Use correct member name __si_fields from - LinuxSigInfo - -Signed-off-by: Khem Raj ---- - chromium/sandbox/linux/seccomp-bpf/trap.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/chromium/sandbox/linux/seccomp-bpf/trap.cc b/chromium/sandbox/linux/seccomp-bpf/trap.cc -index 003708d2c89..0fef3148f9d 100644 ---- a/chromium/sandbox/linux/seccomp-bpf/trap.cc -+++ b/chromium/sandbox/linux/seccomp-bpf/trap.cc -@@ -168,7 +168,7 @@ void Trap::SigSys(int nr, LinuxSigInfo* info, ucontext_t* ctx) { - // most versions of glibc don't include this information in siginfo_t. So, - // we need to explicitly copy it into a arch_sigsys structure. - struct arch_sigsys sigsys; -- memcpy(&sigsys, &info->_sifields, sizeof(sigsys)); -+ memcpy(&sigsys, &info->__si_fields, sizeof(sigsys)); - - #if defined(__mips__) - // When indirect syscall (syscall(__NR_foo, ...)) is made on Mips, the diff --git a/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-use-off64_t-instead-of-the-internal-__.patch b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-use-off64_t-instead-of-the-internal-__.patch new file mode 100644 index 00000000..ad7a085f --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-use-off64_t-instead-of-the-internal-__.patch @@ -0,0 +1,62 @@ +From 5cde4d2fb5affc6e739dba412453b4bf076f19e9 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 14:38:37 -0700 +Subject: [PATCH] chromium: musl: use off64_t instead of the internal __off64_t + +- only do the glibc 32-bit ABI check for mmap/mmap64 on gnu libc. musl + does not support the 32-bit ABI. + +Signed-off-by: Khem Raj +--- + .../tcmalloc/chromium/src/malloc_hook_mmap_linux.h | 10 +++++----- + 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 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 +@@ -60,7 +60,7 @@ + + static inline void* do_mmap64(void *start, size_t length, + int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ 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); +@@ -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, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + void *result; + + // Try mmap2() unless it's not supported +@@ -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, +- int fd, __off64_t offset ) __THROW ++ int fd, off64_t offset ) __THROW + ATTRIBUTE_SECTION(malloc_hook); + void* mmap(void *start, size_t length,int prot, int flags, + int fd, off_t offset) __THROW +@@ -159,7 +159,7 @@ extern "C" { + } + + extern "C" void* mmap64(void *start, size_t length, int prot, int flags, +- int fd, __off64_t offset) __THROW { ++ int fd, off64_t offset) __THROW { + MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset); + void *result; + if (!MallocHook::InvokeMmapReplacement( +@@ -170,7 +170,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, + return result; + } + +-# if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) ++# if defined(__GLIBC__) && (!defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH)) + + extern "C" void* mmap(void *start, size_t length, int prot, int flags, + int fd, off_t offset) __THROW { diff --git a/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch deleted file mode 100644 index 459f13ba..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 106c8aa7bc2dab7f7b04014d85d93082fae20632 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 7 Jul 2017 15:27:50 -0700 -Subject: [PATCH] chromium: musl: Define res_ninit and res_nclose for non-glibc - platforms - -Signed-off-by: Khem Raj ---- - chromium/net/dns/dns_config_service_posix.cc | 4 +++ - chromium/net/dns/dns_reloader.cc | 4 +++ - chromium/net/dns/resolv_compat.h | 29 ++++++++++++++++++++ - 3 files changed, 37 insertions(+) - 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 31c564faeee..222ff65b6e1 100644 ---- a/chromium/net/dns/dns_config_service_posix.cc -+++ b/chromium/net/dns/dns_config_service_posix.cc -@@ -29,6 +29,10 @@ - #include "net/dns/public/dns_protocol.h" - #include "net/dns/serial_worker.h" - -+#if defined(OS_LINUX) && !defined(__GLIBC__) -+#include "net/dns/resolv_compat.h" -+#endif -+ - #if defined(OS_MACOSX) && !defined(OS_IOS) - #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 03e248c9878..9ccda82c7e9 100644 ---- a/chromium/net/dns/dns_reloader.cc -+++ b/chromium/net/dns/dns_reloader.cc -@@ -9,6 +9,10 @@ - - #include - -+#if defined(OS_LINUX) && !defined(__GLIBC__) -+#include "net/dns/resolv_compat.h" -+#endif -+ - #include "base/lazy_instance.h" - #include "base/logging.h" - #include "base/macros.h" -diff --git a/chromium/net/dns/resolv_compat.h b/chromium/net/dns/resolv_compat.h -new file mode 100644 -index 00000000000..4f0e852a19d ---- /dev/null -+++ b/chromium/net/dns/resolv_compat.h -@@ -0,0 +1,29 @@ -+#if !defined(__GLIBC__) -+/*************************************************************************** -+ * resolv_compat.h -+ * -+ * Mimick GLIBC's res_ninit() and res_nclose() for musl libc -+ * Note: res_init() is actually deprecated according to -+ * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html -+ **************************************************************************/ -+#include -+ -+static inline int res_ninit(res_state statp) -+{ -+ int rc = res_init(); -+ if (statp != &_res) { -+ memcpy(statp, &_res, sizeof(*statp)); -+ } -+ return rc; -+} -+ -+static inline int res_nclose(res_state statp) -+{ -+ if (!statp) -+ return -1; -+ if (statp != &_res) { -+ memset(statp, 0, sizeof(*statp)); -+ } -+ return 0; -+} -+#endif diff --git a/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-linux-glibc-make-the-distinction.patch b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-linux-glibc-make-the-distinction.patch new file mode 100644 index 00000000..2fdc4944 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-linux-glibc-make-the-distinction.patch @@ -0,0 +1,23 @@ +From 04a11fa6f38987091b6b65244950d3d83579c9a8 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 14:54:38 -0700 +Subject: [PATCH] chromium: musl: linux != glibc, make the distinction + +Signed-off-by: Khem Raj +--- + chromium/base/allocator/allocator_check.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/chromium/base/allocator/allocator_check.cc b/chromium/base/allocator/allocator_check.cc +index 5fb86467dde..9864858eb67 100644 +--- a/chromium/base/allocator/allocator_check.cc ++++ b/chromium/base/allocator/allocator_check.cc +@@ -27,7 +27,7 @@ bool IsAllocatorInitialized() { + // Set by allocator_shim_override_ucrt_symbols_win.h when the + // shimmed _set_new_mode() is called. + return g_is_win_shim_layer_initialized; +-#elif defined(OS_LINUX) && defined(USE_TCMALLOC) && \ ++#elif defined(__GLIBC__) && defined(USE_TCMALLOC) && \ + !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) + // From third_party/tcmalloc/chromium/src/gperftools/tcmalloc.h. + // TODO(primiano): replace with an include once base can depend on allocator. diff --git a/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Do-not-define-__sbrk-on-musl.patch b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Do-not-define-__sbrk-on-musl.patch deleted file mode 100644 index dbab1ab2..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Do-not-define-__sbrk-on-musl.patch +++ /dev/null @@ -1,26 +0,0 @@ -From b5e59b5ca71ecab2f5515162fad92524230736ec Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 7 Jul 2017 15:39:57 -0700 -Subject: [PATCH] chromium: musl: Do not define __sbrk on musl - -musl libc does not have sbrk. on musl libc will only work when called with 0 as -argument, so we just let it out for now - -Signed-off-by: Khem Raj ---- - .../third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h | 2 +- - 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 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 -@@ -213,7 +213,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, - return result; - } - --#ifndef __UCLIBC__ -+#if !defined(__UCLIBC__) && defined(__GLIBC__) - // libc's version: - extern "C" void* __sbrk(intptr_t increment); - diff --git a/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch new file mode 100644 index 00000000..81d555f9 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch @@ -0,0 +1,24 @@ +From 59ab7f11b90bd2114ff8cc16d6502e0ad6bb6538 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 15:09:02 -0700 +Subject: [PATCH] chromium: musl: allocator: Do not include glibc_weak_symbols + for musl + +Signed-off-by: Khem Raj +--- + chromium/base/allocator/allocator_shim.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/chromium/base/allocator/allocator_shim.cc b/chromium/base/allocator/allocator_shim.cc +index e6838ebda84..7296cc9ed81 100644 +--- a/chromium/base/allocator/allocator_shim.cc ++++ b/chromium/base/allocator/allocator_shim.cc +@@ -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. +-#if defined(USE_TCMALLOC) ++#if defined(USE_TCMALLOC) && defined(__GLIBC__) + #include "base/allocator/allocator_shim_override_glibc_weak_symbols.h" + #endif + diff --git a/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Adjust-default-pthread-stack-size.patch b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Adjust-default-pthread-stack-size.patch deleted file mode 100644 index 790bf140..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Adjust-default-pthread-stack-size.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 3628242064040d8ac5c20a85dc04ba8166cc4065 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 7 Jul 2017 16:41:23 -0700 -Subject: [PATCH] chromium: musl: Adjust default pthread stack size - -Signed-off-by: Khem Raj ---- - chromium/base/threading/platform_thread_linux.cc | 3 ++- - .../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 095c49b8dc0..d1479b54d48 100644 ---- a/chromium/base/threading/platform_thread_linux.cc -+++ b/chromium/base/threading/platform_thread_linux.cc -@@ -186,7 +186,8 @@ void TerminateOnThread() {} - - size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) { - #if !defined(THREAD_SANITIZER) -- return 0; -+ // use 8mb like glibc to avoid running out of space -+ return (1 << 23); - #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/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. - --#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ -+#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 blink_unittests). -@@ -97,7 +97,7 @@ return Threading::ThreadStackSize(); - } - - void* GetStackStart() { --#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ - defined(OS_FUCHSIA) - pthread_attr_t attr; - int error; diff --git a/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Use-correct-member-name-__si_fields-fr.patch b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Use-correct-member-name-__si_fields-fr.patch new file mode 100644 index 00000000..b611781b --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Use-correct-member-name-__si_fields-fr.patch @@ -0,0 +1,24 @@ +From b8735496287b7c2a15224f7d837dc74a09434bdb Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 15:12:39 -0700 +Subject: [PATCH] chromium: musl: Use correct member name __si_fields from + LinuxSigInfo + +Signed-off-by: Khem Raj +--- + chromium/sandbox/linux/seccomp-bpf/trap.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/chromium/sandbox/linux/seccomp-bpf/trap.cc b/chromium/sandbox/linux/seccomp-bpf/trap.cc +index 003708d2c89..0fef3148f9d 100644 +--- a/chromium/sandbox/linux/seccomp-bpf/trap.cc ++++ b/chromium/sandbox/linux/seccomp-bpf/trap.cc +@@ -168,7 +168,7 @@ void Trap::SigSys(int nr, LinuxSigInfo* info, ucontext_t* ctx) { + // most versions of glibc don't include this information in siginfo_t. So, + // we need to explicitly copy it into a arch_sigsys structure. + struct arch_sigsys sigsys; +- memcpy(&sigsys, &info->_sifields, sizeof(sigsys)); ++ memcpy(&sigsys, &info->__si_fields, sizeof(sigsys)); + + #if defined(__mips__) + // When indirect syscall (syscall(__NR_foo, ...)) is made on Mips, the diff --git a/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch b/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch new file mode 100644 index 00000000..4b531624 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch @@ -0,0 +1,79 @@ +From 09c0c63a65770465ef2ec0a3b028e22a9a0164f6 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 15:27:50 -0700 +Subject: [PATCH] chromium: musl: Define res_ninit and res_nclose for non-glibc + platforms + +Signed-off-by: Khem Raj +--- + chromium/net/dns/dns_config_service_posix.cc | 4 +++ + chromium/net/dns/dns_reloader.cc | 4 +++ + chromium/net/dns/resolv_compat.h | 29 ++++++++++++++++++++ + 3 files changed, 37 insertions(+) + 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 ee2d5721425..bcb83b07f6e 100644 +--- a/chromium/net/dns/dns_config_service_posix.cc ++++ b/chromium/net/dns/dns_config_service_posix.cc +@@ -29,6 +29,10 @@ + #include "net/dns/public/dns_protocol.h" + #include "net/dns/serial_worker.h" + ++#if defined(OS_LINUX) && !defined(__GLIBC__) ++#include "net/dns/resolv_compat.h" ++#endif ++ + #if defined(OS_MACOSX) && !defined(OS_IOS) + #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 03e248c9878..9ccda82c7e9 100644 +--- a/chromium/net/dns/dns_reloader.cc ++++ b/chromium/net/dns/dns_reloader.cc +@@ -9,6 +9,10 @@ + + #include + ++#if defined(OS_LINUX) && !defined(__GLIBC__) ++#include "net/dns/resolv_compat.h" ++#endif ++ + #include "base/lazy_instance.h" + #include "base/logging.h" + #include "base/macros.h" +diff --git a/chromium/net/dns/resolv_compat.h b/chromium/net/dns/resolv_compat.h +new file mode 100644 +index 00000000000..4f0e852a19d +--- /dev/null ++++ b/chromium/net/dns/resolv_compat.h +@@ -0,0 +1,29 @@ ++#if !defined(__GLIBC__) ++/*************************************************************************** ++ * resolv_compat.h ++ * ++ * Mimick GLIBC's res_ninit() and res_nclose() for musl libc ++ * Note: res_init() is actually deprecated according to ++ * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html ++ **************************************************************************/ ++#include ++ ++static inline int res_ninit(res_state statp) ++{ ++ int rc = res_init(); ++ if (statp != &_res) { ++ memcpy(statp, &_res, sizeof(*statp)); ++ } ++ return rc; ++} ++ ++static inline int res_nclose(res_state statp) ++{ ++ if (!statp) ++ return -1; ++ if (statp != &_res) { ++ memset(statp, 0, sizeof(*statp)); ++ } ++ return 0; ++} ++#endif diff --git a/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch b/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch deleted file mode 100644 index 58c869fa..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch +++ /dev/null @@ -1,63 +0,0 @@ -From c98e81a6c88d056a6e093f6fbcc985bd2d7b1ed4 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 25 Sep 2018 12:35:07 -0700 -Subject: [PATCH] chromium: musl: Use _fpstate instead of _libc_fpstate on - linux - -glibc defines both. musl libc only the former. - -Signed-off-by: Khem Raj ---- - .../src/client/linux/dump_writer_common/ucontext_reader.cc | 4 ++-- - .../src/client/linux/dump_writer_common/ucontext_reader.h | 2 +- - .../src/client/linux/minidump_writer/minidump_writer.h | 2 +- - 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 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) { - } - - void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, -- const struct _libc_fpstate* fp) { -+ const struct _fpstate* fp) { - const greg_t* regs = uc->uc_mcontext.gregs; - - out->context_flags = MD_CONTEXT_X86_FULL | -@@ -97,7 +97,7 @@ uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { - } - - void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, -- const struct _libc_fpstate* fpregs) { -+ const struct _fpstate* fpregs) { - const greg_t* regs = uc->uc_mcontext.gregs; - - out->context_flags = MD_CONTEXT_AMD64_FULL; -diff --git a/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h b/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h -index f830618f240..f3dde1f4dff 100644 ---- a/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h -+++ b/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h -@@ -50,7 +50,7 @@ struct UContextReader { - // info: the collection of register structures. - #if defined(__i386__) || defined(__x86_64) - static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, -- const struct _libc_fpstate* fp); -+ const struct _fpstate* fp); - #elif defined(__aarch64__) - static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, - const struct fpsimd_context* fpregs); -diff --git a/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h b/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h -index d1dc331215a..d1cc5624cd4 100644 ---- a/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h -+++ b/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h -@@ -48,7 +48,7 @@ class ExceptionHandler; - #if defined(__aarch64__) - typedef struct fpsimd_context fpstate_t; - #elif !defined(__ARM_EABI__) && !defined(__mips__) --typedef struct _libc_fpstate fpstate_t; -+typedef struct _fpstate fpstate_t; - #endif - - // These entries store a list of memory regions that the client wants included diff --git a/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-Do-not-define-__sbrk-on-musl.patch b/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-Do-not-define-__sbrk-on-musl.patch new file mode 100644 index 00000000..b20456b0 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-Do-not-define-__sbrk-on-musl.patch @@ -0,0 +1,26 @@ +From 57ebdf59c45c70ab13b724a2293fdd78241a8a37 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 15:39:57 -0700 +Subject: [PATCH] chromium: musl: Do not define __sbrk on musl + +musl libc does not have sbrk. on musl libc will only work when called with 0 as +argument, so we just let it out for now + +Signed-off-by: Khem Raj +--- + .../third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h | 2 +- + 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 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 +@@ -213,7 +213,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, + return result; + } + +-#ifndef __UCLIBC__ ++#if !defined(__UCLIBC__) && defined(__GLIBC__) + // libc's version: + extern "C" void* __sbrk(intptr_t increment); + diff --git a/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch b/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch deleted file mode 100644 index bb0d13a7..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 350739f3986367253e476093eaaa653b7320c54d Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 25 Sep 2018 12:59:05 -0700 -Subject: [PATCH] chromium: musl: elf_reader.cc: include to get - __WORDSIZE on musl libc - -Signed-off-by: Khem Raj -Signed-off-by: Martin Jansa ---- - chromium/third_party/breakpad/breakpad/configure.ac | 2 +- - .../breakpad/breakpad/src/common/dwarf/elf_reader.cc | 3 ++- - .../breakpad/breakpad/src/common/linux/elf_core_dump.h | 1 + - 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 9cca5aa069c..04139a728cc 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, - AC_HEADER_STDC - AC_SYS_LARGEFILE - AX_PTHREAD --AC_CHECK_HEADERS([a.out.h sys/random.h]) -+AC_CHECK_HEADERS([a.out.h sys/random.h sys/reg.h]) - AC_CHECK_FUNCS([arc4random getrandom]) - - AX_CXX_COMPILE_STDCXX(11, noext, mandatory) -diff --git a/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc b/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc -index 4135a51a980..be92b792d3c 100644 ---- a/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc -+++ b/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc -@@ -29,10 +29,11 @@ - #ifndef _GNU_SOURCE - #define _GNU_SOURCE // needed for pread() - #endif -- -+#include - #include - #include - #include -+#include - #include - #include - #include -diff --git a/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h b/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h -index d03c7a88d38..28b55ab6300 100644 ---- a/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h -+++ b/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h -@@ -33,6 +33,7 @@ - #ifndef COMMON_LINUX_ELF_CORE_DUMP_H_ - #define COMMON_LINUX_ELF_CORE_DUMP_H_ - -+#include - #include - #include - #include diff --git a/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-Adjust-default-pthread-stack-size.patch b/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-Adjust-default-pthread-stack-size.patch new file mode 100644 index 00000000..62b9531b --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-Adjust-default-pthread-stack-size.patch @@ -0,0 +1,47 @@ +From 50d5b6fa29696c873830af7632b51cb4836c2210 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 16:41:23 -0700 +Subject: [PATCH] chromium: musl: Adjust default pthread stack size + +Signed-off-by: Khem Raj +--- + chromium/base/threading/platform_thread_linux.cc | 3 ++- + .../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 095c49b8dc0..d1479b54d48 100644 +--- a/chromium/base/threading/platform_thread_linux.cc ++++ b/chromium/base/threading/platform_thread_linux.cc +@@ -186,7 +186,8 @@ void TerminateOnThread() {} + + size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) { + #if !defined(THREAD_SANITIZER) +- return 0; ++ // use 8mb like glibc to avoid running out of space ++ return (1 << 23); + #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/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. + +-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ ++#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 blink_unittests). +@@ -97,7 +97,7 @@ return Threading::ThreadStackSize(); + } + + void* GetStackStart() { +-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ + defined(OS_FUCHSIA) + pthread_attr_t attr; + int error; diff --git a/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-pread-pwrite.patch b/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-pread-pwrite.patch deleted file mode 100644 index a12e28c4..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-pread-pwrite.patch +++ /dev/null @@ -1,31 +0,0 @@ -From debbdd4f419ef2d48c3e1fb0128dc4ac6c9f687b Mon Sep 17 00:00:00 2001 -From: Khem Raj -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 ---- - 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 e19e51dd304..5c661949d1e 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 diff --git a/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch deleted file mode 100644 index ac16068c..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 6ae9112ffea9a5b7d41a06c3d33e55e4f32d8b5a Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 30 Nov 2019 10:07:43 -0800 -Subject: [PATCH] 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 ---- - 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 684514ff011..e2f2ae0b633 100644 ---- a/chromium/ui/events/ozone/evdev/event_converter_evdev.cc -+++ b/chromium/ui/events/ozone/evdev/event_converter_evdev.cc -@@ -168,8 +168,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(×tamp); - 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; --- -2.24.0 - diff --git a/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch b/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch new file mode 100644 index 00000000..7ed278b0 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch @@ -0,0 +1,63 @@ +From 1f839bf6ac48d81a8acbf3def4f57a555a05fa18 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 25 Sep 2018 12:35:07 -0700 +Subject: [PATCH] chromium: musl: Use _fpstate instead of _libc_fpstate on + linux + +glibc defines both. musl libc only the former. + +Signed-off-by: Khem Raj +--- + .../src/client/linux/dump_writer_common/ucontext_reader.cc | 4 ++-- + .../src/client/linux/dump_writer_common/ucontext_reader.h | 2 +- + .../src/client/linux/minidump_writer/minidump_writer.h | 2 +- + 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 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) { + } + + void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, +- const struct _libc_fpstate* fp) { ++ const struct _fpstate* fp) { + const greg_t* regs = uc->uc_mcontext.gregs; + + out->context_flags = MD_CONTEXT_X86_FULL | +@@ -97,7 +97,7 @@ uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { + } + + void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, +- const struct _libc_fpstate* fpregs) { ++ const struct _fpstate* fpregs) { + const greg_t* regs = uc->uc_mcontext.gregs; + + out->context_flags = MD_CONTEXT_AMD64_FULL; +diff --git a/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h b/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h +index f830618f240..f3dde1f4dff 100644 +--- a/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h ++++ b/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h +@@ -50,7 +50,7 @@ struct UContextReader { + // info: the collection of register structures. + #if defined(__i386__) || defined(__x86_64) + static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, +- const struct _libc_fpstate* fp); ++ const struct _fpstate* fp); + #elif defined(__aarch64__) + static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, + const struct fpsimd_context* fpregs); +diff --git a/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h b/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h +index d1dc331215a..d1cc5624cd4 100644 +--- a/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h ++++ b/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h +@@ -48,7 +48,7 @@ class ExceptionHandler; + #if defined(__aarch64__) + typedef struct fpsimd_context fpstate_t; + #elif !defined(__ARM_EABI__) && !defined(__mips__) +-typedef struct _libc_fpstate fpstate_t; ++typedef struct _fpstate fpstate_t; + #endif + + // These entries store a list of memory regions that the client wants included diff --git a/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-Include-cstddef-for-size_t-definition.patch b/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-Include-cstddef-for-size_t-definition.patch deleted file mode 100644 index 27f83ccb..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-Include-cstddef-for-size_t-definition.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 409a3764e31f3c3db4087fbd2a401c950e6e041d Mon Sep 17 00:00:00 2001 -From: Khem Raj -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 - -ccc - -Signed-off-by: Khem Raj ---- - .../webrtc/modules/audio_processing/aec3/clockdrift_detector.h | 1 + - 1 file changed, 1 insertion(+) - ---- 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 -+#include - - namespace webrtc { - ---- 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 - #include - #include -+#include - - namespace webrtc { - diff --git a/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch b/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch new file mode 100644 index 00000000..34761950 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch @@ -0,0 +1,56 @@ +From 8f16cec0583c9de1ceb2c34a3bea527096f34075 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 25 Sep 2018 12:59:05 -0700 +Subject: [PATCH] chromium: musl: elf_reader.cc: include to get + __WORDSIZE on musl libc + +Signed-off-by: Khem Raj +Signed-off-by: Martin Jansa +--- + chromium/third_party/breakpad/breakpad/configure.ac | 2 +- + .../breakpad/breakpad/src/common/dwarf/elf_reader.cc | 3 ++- + .../breakpad/breakpad/src/common/linux/elf_core_dump.h | 1 + + 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 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, + AC_HEADER_STDC + AC_SYS_LARGEFILE + AX_PTHREAD +-AC_CHECK_HEADERS([a.out.h sys/random.h]) ++AC_CHECK_HEADERS([a.out.h sys/random.h sys/reg.h]) + AC_CHECK_FUNCS([arc4random getrandom]) + + AX_CXX_COMPILE_STDCXX(11, noext, mandatory) +diff --git a/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc b/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc +index 4135a51a980..be92b792d3c 100644 +--- a/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc ++++ b/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc +@@ -29,10 +29,11 @@ + #ifndef _GNU_SOURCE + #define _GNU_SOURCE // needed for pread() + #endif +- ++#include + #include + #include + #include ++#include + #include + #include + #include +diff --git a/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h b/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h +index d03c7a88d38..28b55ab6300 100644 +--- a/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h ++++ b/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h +@@ -33,6 +33,7 @@ + #ifndef COMMON_LINUX_ELF_CORE_DUMP_H_ + #define COMMON_LINUX_ELF_CORE_DUMP_H_ + ++#include + #include + #include + #include diff --git a/recipes-qt/qt5/qtwebengine/chromium/0023-chromium-Move-CharAllocator-definition-to-a-header-f.patch b/recipes-qt/qt5/qtwebengine/chromium/0023-chromium-Move-CharAllocator-definition-to-a-header-f.patch deleted file mode 100644 index 84bfeb4d..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0023-chromium-Move-CharAllocator-definition-to-a-header-f.patch +++ /dev/null @@ -1,551 +0,0 @@ -From 3324558fb02b720cd394e0cc270d10dc6db0c915 Mon Sep 17 00:00:00 2001 -From: Khem Raj -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 ---- - chromium/cc/base/list_container_helper.cc | 245 --------------------- - chromium/cc/base/list_container_helper.h | 250 ++++++++++++++++++++++ - 2 files changed, 250 insertions(+), 245 deletions(-) - -diff --git a/chromium/cc/base/list_container_helper.cc b/chromium/cc/base/list_container_helper.cc -index 380ad3dd187..1a029f959f3 100644 ---- a/chromium/cc/base/list_container_helper.cc -+++ b/chromium/cc/base/list_container_helper.cc -@@ -13,257 +13,12 @@ - #include "base/macros.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 { -- std::unique_ptr 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 new_data( -- static_cast(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; } -- -- private: -- DISALLOW_COPY_AND_ASSIGN(InnerList); -- }; -- -- 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() = default; -- -- 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 new_list(new InnerList); -- new_list->capacity = list_size; -- new_list->size = 0; -- new_list->step = element_size_; -- new_list->data.reset(static_cast( -- base::AlignedAlloc(list_size * element_size_, alignment_))); -- storage_.push_back(std::move(new_list)); -- } -- -- std::vector> 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_; -- -- DISALLOW_COPY_AND_ASSIGN(CharAllocator); --}; - - // PositionInCharAllocator - ////////////////////////////////////////////////////// -diff --git a/chromium/cc/base/list_container_helper.h b/chromium/cc/base/list_container_helper.h -index c79cf1f1884..91450e5c116 100644 ---- a/chromium/cc/base/list_container_helper.h -+++ b/chromium/cc/base/list_container_helper.h -@@ -8,10 +8,19 @@ - #include - - #include -+#include -+#include - - #include "base/macros.h" -+ -+#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 +183,247 @@ class CC_BASE_EXPORT ListContainerHelper final { - DISALLOW_COPY_AND_ASSIGN(ListContainerHelper); - }; - -+class ListContainerHelper::CharAllocator { -+ public: -+ // CharAllocator::InnerList -+ ///////////////////////////////////////////// -+ // This class holds the raw memory chunk, as well as information about its -+ // size and availability. -+ struct InnerList { -+ std::unique_ptr 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 new_data( -+ static_cast(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; } -+ -+ private: -+ DISALLOW_COPY_AND_ASSIGN(InnerList); -+ }; -+ -+ 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() = default; -+ -+ 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 new_list(new InnerList); -+ new_list->capacity = list_size; -+ new_list->size = 0; -+ new_list->step = element_size_; -+ new_list->data.reset(static_cast( -+ base::AlignedAlloc(list_size * element_size_, alignment_))); -+ storage_.push_back(std::move(new_list)); -+ } -+ -+ std::vector> 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_; -+ -+ DISALLOW_COPY_AND_ASSIGN(CharAllocator); -+}; - } // namespace cc - - #endif // CC_BASE_LIST_CONTAINER_HELPER_H_ --- -2.24.1 - diff --git a/recipes-qt/qt5/qtwebengine/chromium/0023-chromium-musl-pread-pwrite.patch b/recipes-qt/qt5/qtwebengine/chromium/0023-chromium-musl-pread-pwrite.patch new file mode 100644 index 00000000..631ae8a0 --- /dev/null +++ b/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 +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 +--- + 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 diff --git a/recipes-qt/qt5/qtwebengine_git.bb b/recipes-qt/qt5/qtwebengine_git.bb index 8307e438..1a241547 100644 --- a/recipes-qt/qt5/qtwebengine_git.bb +++ b/recipes-qt/qt5/qtwebengine_git.bb @@ -137,8 +137,8 @@ RDEPENDS_${PN}-examples += " \ QT_MODULE_BRANCH_CHROMIUM = "77-based" -# Patches from https://github.com/meta-qt5/qtwebengine/commits/b5.13 -# 5.13.meta-qt5.2 +# Patches from https://github.com/meta-qt5/qtwebengine/commits/b5.14 +# 5.14.meta-qt5.1 SRC_URI += " \ ${QT_GIT}/qtwebengine-chromium.git;name=chromium;branch=${QT_MODULE_BRANCH_CHROMIUM};protocol=${QT_GIT_PROTOCOL};destsuffix=git/src/3rdparty \ file://0001-Force-host-toolchain-configuration.patch \ @@ -149,8 +149,8 @@ SRC_URI_append_libc-musl = "\ file://0004-mkspecs-Allow-builds-with-libc-glibc.patch \ " -# Patches from https://github.com/meta-qt5/qtwebengine-chromium/commits/73-based -# 73-based.meta-qt5.3 +# Patches from https://github.com/meta-qt5/qtwebengine-chromium/commits/77-based +# 77-based.meta-qt5.1 SRC_URI += " \ file://chromium/0001-chromium-workaround-for-too-long-.rps-file-name.patch;patchdir=src/3rdparty \ file://chromium/0002-chromium-stack-pointer-clobber.patch;patchdir=src/3rdparty \ @@ -159,25 +159,25 @@ SRC_URI += " \ file://chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch;patchdir=src/3rdparty \ file://chromium/0006-chromium-aarch64-skia-build-fix.patch;patchdir=src/3rdparty \ file://chromium/0007-chromium-fix-build-after-y2038-changes-in-glibc.patch;patchdir=src/3rdparty \ - file://chromium/0021-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch;patchdir=src/3rdparty \ - file://chromium/0022-chromium-Include-cstddef-for-size_t-definition.patch;patchdir=src/3rdparty \ - file://chromium/0023-chromium-Move-CharAllocator-definition-to-a-header-f.patch;patchdir=src/3rdparty \ + file://chromium/0008-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch;patchdir=src/3rdparty \ + file://chromium/0009-chromium-Include-cstddef-for-size_t-definition.patch;patchdir=src/3rdparty \ + file://chromium/0010-chromium-Move-CharAllocator-definition-to-a-header-f.patch;patchdir=src/3rdparty \ " SRC_URI_append_libc-musl = "\ - file://chromium/0008-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch;patchdir=src/3rdparty \ - file://chromium/0009-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch;patchdir=src/3rdparty \ - file://chromium/0010-chromium-musl-include-fcntl.h-for-loff_t.patch;patchdir=src/3rdparty \ - file://chromium/0011-chromium-musl-use-off64_t-instead-of-the-internal-__.patch;patchdir=src/3rdparty \ - file://chromium/0012-chromium-musl-linux-glibc-make-the-distinction.patch;patchdir=src/3rdparty \ - file://chromium/0013-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch;patchdir=src/3rdparty \ - file://chromium/0014-chromium-musl-Use-correct-member-name-__si_fields-fr.patch;patchdir=src/3rdparty \ - file://chromium/0015-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch;patchdir=src/3rdparty \ - file://chromium/0016-chromium-musl-Do-not-define-__sbrk-on-musl.patch;patchdir=src/3rdparty \ - file://chromium/0017-chromium-musl-Adjust-default-pthread-stack-size.patch;patchdir=src/3rdparty \ - file://chromium/0018-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch;patchdir=src/3rdparty \ - file://chromium/0019-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch;patchdir=src/3rdparty \ - file://chromium/0020-chromium-musl-pread-pwrite.patch;patchdir=src/3rdparty \ + file://chromium/0011-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch;patchdir=src/3rdparty \ + file://chromium/0012-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch;patchdir=src/3rdparty \ + file://chromium/0013-chromium-musl-include-fcntl.h-for-loff_t.patch;patchdir=src/3rdparty \ + file://chromium/0014-chromium-musl-use-off64_t-instead-of-the-internal-__.patch;patchdir=src/3rdparty \ + file://chromium/0015-chromium-musl-linux-glibc-make-the-distinction.patch;patchdir=src/3rdparty \ + file://chromium/0016-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch;patchdir=src/3rdparty \ + file://chromium/0017-chromium-musl-Use-correct-member-name-__si_fields-fr.patch;patchdir=src/3rdparty \ + file://chromium/0018-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch;patchdir=src/3rdparty \ + file://chromium/0019-chromium-musl-Do-not-define-__sbrk-on-musl.patch;patchdir=src/3rdparty \ + file://chromium/0020-chromium-musl-Adjust-default-pthread-stack-size.patch;patchdir=src/3rdparty \ + file://chromium/0021-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch;patchdir=src/3rdparty \ + file://chromium/0022-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch;patchdir=src/3rdparty \ + file://chromium/0023-chromium-musl-pread-pwrite.patch;patchdir=src/3rdparty \ " SRCREV_qtwebengine = "d366f1d5d37ce6f1833ac67c7ebda540b16690f2" -- cgit v1.2.3-54-g00ecf