From 83ab966e790dcf0ecd9a8eddb9521e606080dc98 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 21 Nov 2020 21:19:56 -0800 Subject: qtwebengine: Fix build with clang-11 Signed-off-by: Khem Raj --- ...m-Fix-compiler-error-emitted-with-clang11.patch | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0016-chromium-Fix-compiler-error-emitted-with-clang11.patch (limited to 'recipes-qt/qt5/qtwebengine') diff --git a/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-Fix-compiler-error-emitted-with-clang11.patch b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-Fix-compiler-error-emitted-with-clang11.patch new file mode 100644 index 00000000..f722cb99 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-Fix-compiler-error-emitted-with-clang11.patch @@ -0,0 +1,26 @@ +From 46f0abc66c1d78c60a0415c5cb46852ef3bfa9bb Mon Sep 17 00:00:00 2001 +From: Nico Weber +Date: Sat, 8 Feb 2020 21:26:53 -0500 +Subject: [PATCH] Fix compile error emitted by trunk clang + +../../third_party/perfetto/src/tracing/core/virtual_destructors.cc:33:35: +error: destructor cannot be declared using a type alias + 'perfetto::TracingService::ConsumerEndpoint' (aka + 'perfetto::ConsumerEndpoint') of the class name +TracingService::ConsumerEndpoint::~ConsumerEndpoint() = default; + +Bug: chromium:1050372 +Change-Id: Icc1a8cca06b72ee3322924dc0825ebb62086f730 +--- a/chromium/third_party/perfetto/src/tracing/core/virtual_destructors.cc ++++ b/chromium/third_party/perfetto/src/tracing/core/virtual_destructors.cc +@@ -30,8 +30,8 @@ namespace perfetto { + Consumer::~Consumer() = default; + Producer::~Producer() = default; + TracingService::~TracingService() = default; +-TracingService::ConsumerEndpoint::~ConsumerEndpoint() = default; +-TracingService::ProducerEndpoint::~ProducerEndpoint() = default; ++ConsumerEndpoint::~ConsumerEndpoint() = default; ++ProducerEndpoint::~ProducerEndpoint() = default; + SharedMemory::~SharedMemory() = default; + SharedMemory::Factory::~Factory() = default; + SharedMemoryArbiter::~SharedMemoryArbiter() = default; -- cgit v1.2.3 From 280487f20bca829527a597d6263b0344a01917ac Mon Sep 17 00:00:00 2001 From: Jani Suonpera Date: Thu, 10 Dec 2020 09:03:39 +0200 Subject: Update to Qt 5.15.2 Signed-off-by: Jani Suonpera Change-Id: I5992e74cf524f9378dab64503345111b1cc159f2 --- .../0003-musl-link-against-libexecinfo.patch | 10 +-- ...0004-mkspecs-Allow-builds-with-libc-glibc.patch | 44 ++++++++++---- ...um-workaround-for-too-long-.rps-file-name.patch | 2 +- .../0002-chromium-stack-pointer-clobber.patch | 10 +-- .../0003-chromium-fix-build-with-clang.patch | 18 +++--- ...0004-chromium-Exclude-CRC32-for-32bit-arm.patch | 6 +- ...-not-try-to-set-the-guessed-values-for-ma.patch | 38 ------------ ...-Do-not-try-to-set-the-guessed-values-for.patch | 41 +++++++++++++ .../0006-chromium-aarch64-skia-build-fix.patch | 4 +- ...um-fix-build-after-y2038-changes-in-glibc.patch | 4 +- ...x-build-on-32bit-arches-with-64bit-time_t.patch | 71 ++++++++-------------- ...ium-Include-cstddef-for-size_t-definition.patch | 6 +- ...ve-CharAllocator-definition-to-a-header-f.patch | 2 +- ...0011-chromium-Include-cstddef-and-cstdint.patch | 2 +- ...12-chromium-Link-v8-with-libatomic-on-x86.patch | 6 +- .../chromium/0013-chromium-Fix-bison-3.7.patch | 52 ---------------- ...omium-icu-use-system-library-only-targets.patch | 18 +++--- ...sl-Use-correct-member-name-__si_fields-fr.patch | 24 -------- ...um-musl-Adjust-default-pthread-stack-size.patch | 16 ++--- .../chromium/0028-chromium-musl-pread-pwrite.patch | 4 +- ...sl-initialize-msghdr-in-a-compatible-mann.patch | 4 +- 21 files changed, 155 insertions(+), 227 deletions(-) delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0013-chromium-Fix-bison-3.7.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-Use-correct-member-name-__si_fields-fr.patch (limited to 'recipes-qt/qt5/qtwebengine') 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 f1fa3ed3..fa7de449 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 178aefa97fd7b725b1b802af7751df5f86a887af Mon Sep 17 00:00:00 2001 +From cc707f6c2d3dd152fcca23de0545351e99b3edcb 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,13 +10,13 @@ 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 5007012a..56c7ad4a 100644 +index 3b439e81..b1669e19 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro -@@ -57,7 +57,7 @@ linux { - POST_TARGETDEPS += $$NINJA_TARGETDEPS - +@@ -5,7 +5,7 @@ include($${QTWEBENGINE_ROOT}/src/buildtools/config/linking.pri) + api_library_name = qtwebenginecoreapi$$qtPlatformTargetSuffix() + api_library_path = $$OUT_PWD/api/$$getConfigDir() -LIBS_PRIVATE += -L$$api_library_path +LIBS_PRIVATE += -L$$api_library_path -lexecinfo CONFIG *= no_smart_library_merge 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 8cb665f1..6bd374d8 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 @@ -5,22 +5,44 @@ Subject: [PATCH] mkspecs: Allow builds with libc != glibc Signed-off-by: Khem Raj --- - src/buildtools/config/support.pri | 5 ----- - 1 file changed, 5 deletions(-) + src/buildtools/config/support.pri | 4 ---- + src/buildtools/configure.json | 4 +--- + 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri -index 8077b12f..aaf4db47 100644 +index 6768f0a1..1885f1b4 100644 --- a/src/buildtools/config/support.pri +++ b/src/buildtools/config/support.pri -@@ -97,11 +97,6 @@ defineTest(qtwebengine_checkErrorForLinux) { - return(false) - } +@@ -177,10 +177,6 @@ defineTest(qtwebengine_checkForHostPkgCfg) { + defineTest(qtwebengine_checkForGlibc) { + module = $$1 - !qtConfig(webengine-system-glibc) { -- qtwebengine_skipBuild("A suitable version >= 2.27 of libc required to build QtWebEngine could not be found.") +- qtwebengine_skipBuild("A suitable version >= 2.27 of libc required to build $${module} could not be found.") - return(false) - } -- - !qtConfig(webengine-system-khr) { - qtwebengine_skipBuild("Khronos development headers required to build QtWebEngine are missing (see mesa/libegl1-mesa-dev)") - return(false) + return(true) + } + +diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json +index 96727a14..fef8fc5e 100644 +--- a/src/buildtools/configure.json ++++ b/src/buildtools/configure.json +@@ -371,7 +371,6 @@ + && (!config.sanitizer || features.webengine-sanitizer) + && (!config.linux || features.pkg-config) + && (!config.linux || features.webengine-host-pkg-config) +- && (!config.linux || features.webengine-system-glibc) + && (!config.linux || features.webengine-system-khr) + && (!config.linux || features.webengine-system-nss) + && (!config.linux || features.webengine-system-dbus) +@@ -732,8 +731,7 @@ + "webengine-system-fontconfig", + "webengine-system-dbus", + "webengine-system-nss", +- "webengine-system-khr", +- "webengine-system-glibc" ++ "webengine-system-khr" + ] + }, + { 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 3abe38b6..8b5d41ba 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 105421c09f009b77019e60db2de22d5966a73602 Mon Sep 17 00:00:00 2001 +From 5af62581e5116b57efbe4bb7cc467efeb0aab941 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 497dd3b8..c93ba991 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 99453086770508f96eeb95635dda3f9831c485bf Mon Sep 17 00:00:00 2001 +From 8dd7987fc70fd8dab4a9f7ee32334c8d28ed34e4 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,10 +17,10 @@ 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 8e0cc385792..d2bd9df4d40 100644 +index d2baee9d243..fd8efdffea6 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 { +@@ -2017,7 +2017,7 @@ struct kernel_statfs { : "i" (__NR_##name), "ri" ((long)(arg1)), \ "c" ((long)(arg2)), "d" ((long)(arg3)), \ "S" ((long)(arg4)), "D" ((long)(arg5)) \ @@ -29,7 +29,7 @@ index 8e0cc385792..d2bd9df4d40 100644 LSS_RETURN(type,__res); \ } #undef _syscall6 -@@ -2034,7 +2034,7 @@ struct kernel_statfs { +@@ -2039,7 +2039,7 @@ struct kernel_statfs { : "i" (__NR_##name), "0" ((long)(&__s)), \ "c" ((long)(arg2)), "d" ((long)(arg3)), \ "S" ((long)(arg4)), "D" ((long)(arg5)) \ @@ -38,7 +38,7 @@ index 8e0cc385792..d2bd9df4d40 100644 LSS_RETURN(type,__res); \ } LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, -@@ -2120,7 +2120,7 @@ struct kernel_statfs { +@@ -2125,7 +2125,7 @@ struct kernel_statfs { : "0"(-EINVAL), "i"(__NR_clone), "m"(fn), "m"(child_stack), "m"(flags), "m"(arg), "m"(parent_tidptr), "m"(newtls), "m"(child_tidptr) 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 253cdaf6..a3f292c3 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 d3889654a28d901d345cae8fc8ec23988a085dab Mon Sep 17 00:00:00 2001 +From be18ba6e0b879fbd542f4e0d1a249f2ab5abb27c 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,10 +10,10 @@ 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 fdfcf65f5ab..13d71d04030 100644 +index ca81bd8ce0f..d3c588b21e3 100644 --- a/chromium/build/config/compiler/BUILD.gn +++ b/chromium/build/config/compiler/BUILD.gn -@@ -779,8 +779,6 @@ config("compiler_cpu_abi") { +@@ -776,8 +776,6 @@ config("compiler_cpu_abi") { } } else if (current_cpu == "arm") { if (is_clang && !is_android && !is_nacl) { @@ -22,7 +22,7 @@ index fdfcf65f5ab..13d71d04030 100644 } if (!is_nacl) { cflags += [ -@@ -793,8 +791,6 @@ config("compiler_cpu_abi") { +@@ -790,8 +788,6 @@ config("compiler_cpu_abi") { } } else if (current_cpu == "arm64") { if (is_clang && !is_android && !is_nacl && !is_fuchsia) { @@ -31,7 +31,7 @@ index fdfcf65f5ab..13d71d04030 100644 } } else if (current_cpu == "mipsel" && !is_nacl) { ldflags += [ "-Wl,--hash-style=sysv" ] -@@ -803,9 +799,6 @@ config("compiler_cpu_abi") { +@@ -800,9 +796,6 @@ config("compiler_cpu_abi") { if (is_android) { cflags += [ "--target=mipsel-linux-android" ] ldflags += [ "--target=mipsel-linux-android" ] @@ -41,7 +41,7 @@ index fdfcf65f5ab..13d71d04030 100644 } } else { cflags += [ "-EL" ] -@@ -884,10 +877,7 @@ config("compiler_cpu_abi") { +@@ -881,10 +874,7 @@ config("compiler_cpu_abi") { } else if (current_cpu == "mips" && !is_nacl) { ldflags += [ "-Wl,--hash-style=sysv" ] if (custom_toolchain == "") { @@ -53,7 +53,7 @@ index fdfcf65f5ab..13d71d04030 100644 cflags += [ "-EB" ] ldflags += [ "-EB" ] } -@@ -934,9 +924,6 @@ config("compiler_cpu_abi") { +@@ -931,9 +921,6 @@ config("compiler_cpu_abi") { if (is_android) { cflags += [ "--target=mips64el-linux-android" ] ldflags += [ "--target=mips64el-linux-android" ] @@ -63,7 +63,7 @@ index fdfcf65f5ab..13d71d04030 100644 } } else { cflags += [ -@@ -993,10 +980,7 @@ config("compiler_cpu_abi") { +@@ -990,10 +977,7 @@ config("compiler_cpu_abi") { } else if (current_cpu == "mips64") { ldflags += [ "-Wl,--hash-style=sysv" ] if (custom_toolchain == "") { @@ -75,7 +75,7 @@ index fdfcf65f5ab..13d71d04030 100644 cflags += [ "-EB", "-mabi=64", -@@ -1165,13 +1149,6 @@ config("compiler_deterministic") { +@@ -1157,13 +1141,6 @@ config("compiler_deterministic") { } } } 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 5b150b5f..c3de3cc5 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 7a778d56065b041e55c60e500d5e60c71b7e345f Mon Sep 17 00:00:00 2001 +From 7eeed60fceeca490c5252e256baff08100e13259 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,10 +15,10 @@ 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 4422fecc0c8..1b398ad981a 100644 +index 00d1e7c6ca3..f2c36d72dd2 100644 --- a/chromium/third_party/zlib/BUILD.gn +++ b/chromium/third_party/zlib/BUILD.gn -@@ -80,8 +80,11 @@ if (use_arm_neon_optimizations) { +@@ -86,8 +86,11 @@ if (use_arm_neon_optimizations) { # Disabled for iPhone, as described in DDI0487C_a_armv8_arm: # "All implementations of the ARMv8.1 architecture are required to # implement the CRC32* instructions. These are optional in ARMv8.0." 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 deleted file mode 100644 index 00293e5f..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 7cabdbd5f444dc10f4c87ed554792e97a527075b 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 - march/mtune/float-abi OE config machinary has computed these values already - and fed it via compiler cmdline to chromium build - -I think upstream should check for the values on compiler cmdline -before overriding these - -Upstream-Status: Inappropriate [OE-Specific] - -Signed-off-by: Khem Raj -Signed-off-by: Johannes Pointner ---- - chromium/build/config/compiler/BUILD.gn | 9 --------- - 1 file changed, 9 deletions(-) - -diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn -index 13d71d04030..3ebcf1ddbc3 100644 ---- a/chromium/build/config/compiler/BUILD.gn -+++ b/chromium/build/config/compiler/BUILD.gn -@@ -780,15 +780,6 @@ config("compiler_cpu_abi") { - } else if (current_cpu == "arm") { - if (is_clang && !is_android && !is_nacl) { - } -- if (!is_nacl) { -- cflags += [ -- "-march=$arm_arch", -- "-mfloat-abi=$arm_float_abi", -- ] -- } -- if (arm_tune != "") { -- cflags += [ "-mtune=$arm_tune" ] -- } - } else if (current_cpu == "arm64") { - if (is_clang && !is_android && !is_nacl && !is_fuchsia) { - } diff --git a/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for.patch b/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for.patch new file mode 100644 index 00000000..5f3f4528 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for.patch @@ -0,0 +1,41 @@ +From 0faac107930255380ea07aa75267153022de2248 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 + + march/mtune/float-abi OE config machinary has computed these values already + and fed it via compiler cmdline to chromium build + +I think upstream should check for the values on compiler cmdline +before overriding these + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj +Signed-off-by: Johannes Pointner + +%% original patch: 0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch +--- + chromium/build/config/compiler/BUILD.gn | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn +index d3c588b21e3..6d49fde33cc 100644 +--- a/chromium/build/config/compiler/BUILD.gn ++++ b/chromium/build/config/compiler/BUILD.gn +@@ -777,15 +777,6 @@ config("compiler_cpu_abi") { + } else if (current_cpu == "arm") { + if (is_clang && !is_android && !is_nacl) { + } +- if (!is_nacl) { +- cflags += [ +- "-march=$arm_arch", +- "-mfloat-abi=$arm_float_abi", +- ] +- } +- if (arm_tune != "") { +- cflags += [ "-mtune=$arm_tune" ] +- } + } else if (current_cpu == "arm64") { + if (is_clang && !is_android && !is_nacl && !is_fuchsia) { + } diff --git a/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 798b5f05..f560e315 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 e7e0646f07d1c0dcf6502cd1c074d50839f3d461 Mon Sep 17 00:00:00 2001 +From 69abe5acb926cef9ac771015ade3873fa9985f3b 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 @@ -28,7 +28,7 @@ Signed-off-by: Raphael Kubo da Costa 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 0d610ccfe33..c1844b61168 100644 +index 831f5b3bb03..bb9377c3641 100644 --- a/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h +++ b/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h @@ -986,13 +986,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 307ce4d4..1c7a3b1e 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 a5cdae084e84be8c847f4b0613b92e0462bbb038 Mon Sep 17 00:00:00 2001 +From 8a0cc2a6be8fb9f8c3f4976ad4b41b291e672a67 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 ead4e57dc15..7ba975e660a 100644 +index 0cbcb8130c6..bc3dd3bddda 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 index 03bdc05a..63a460cc 100644 --- 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 @@ -1,4 +1,4 @@ -From c769d6be7210a2fbc866e36f87ad21bcc91e9c6e Mon Sep 17 00:00:00 2001 +From ddedffaeb9f04ac8530f87f5010e0008dc548b96 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 @@ -11,58 +11,37 @@ input.h [1] 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(-) + chromium/ui/events/ozone/evdev/event_converter_evdev.h | 5 +++++ + chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc | 3 +-- + 2 files changed, 6 insertions(+), 2 deletions(-) -diff --git a/chromium/ui/events/ozone/evdev/event_converter_evdev.cc b/chromium/ui/events/ozone/evdev/event_converter_evdev.cc -index 9f27d39e209..f565dd2ce5c 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/event_converter_evdev.h b/chromium/ui/events/ozone/evdev/event_converter_evdev.h +index 717410f2ebc..a4cd55ca20e 100644 +--- a/chromium/ui/events/ozone/evdev/event_converter_evdev.h ++++ b/chromium/ui/events/ozone/evdev/event_converter_evdev.h +@@ -20,6 +20,11 @@ + #include "ui/events/ozone/evdev/event_dispatch_callback.h" + #include "ui/gfx/geometry/size.h" + ++#ifndef input_event_sec ++#define input_event_sec time.tv_sec ++#define input_event_usec time.tv_usec ++#endif ++ + struct input_event; + + namespace ui { 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 +index 01e49b7bbfd..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) +@@ -63,8 +63,7 @@ void TouchEventLogEvdev::DumpLog(const char* filename) { 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, + "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); + 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 0d5b83148f6..1f17608e94d 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 "base/component_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/0009-chromium-Include-cstddef-for-size_t-definition.patch b/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Include-cstddef-for-size_t-definition.patch index 3659f586..41a8ce36 100644 --- 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 @@ -1,4 +1,4 @@ -From 58783bf8f46657200643543f765f405a91699440 Mon Sep 17 00:00:00 2001 +From 022100d701dca71ecfe237e133712398bc1c59a7 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 @@ -22,10 +22,10 @@ Signed-off-by: Khem Raj 1 file changed, 1 insertion(+) 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 +index ec972949d89..2a76775cfb6 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 @@ +@@ -15,6 +15,7 @@ #include #include #include 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 index 965ecd72..abe1e16d 100644 --- 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 @@ -1,4 +1,4 @@ -From faff740bb831e1a25c7acb1754df9bbd028330b9 Mon Sep 17 00:00:00 2001 +From 9d9db26e626e1c8d4d10eab1522daf0efc8cb11c 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 diff --git a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.patch b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.patch index a6abd037..464f952b 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.patch @@ -1,4 +1,4 @@ -From 33005dfa49d65170fb006cd4ca4dbb8c6cf901e5 Mon Sep 17 00:00:00 2001 +From 1b8d57ba6595bbd743f6570d834f6a08600fb117 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 15 Jan 2020 16:53:46 -0800 Subject: [PATCH] chromium: Include and diff --git a/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch index 169b4c9b..eaff07e0 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch @@ -1,4 +1,4 @@ -From 910fe61d3ee439b26a6a33cc9f65e1f7a52f332d Mon Sep 17 00:00:00 2001 +From e60314a1257964bbebc0e7633d9799fd7c7ec35b Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 1 Feb 2020 12:17:23 -0800 Subject: [PATCH] chromium: Link v8 with libatomic on x86 @@ -14,10 +14,10 @@ Signed-off-by: Khem Raj 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chromium/v8/BUILD.gn b/chromium/v8/BUILD.gn -index 9107b302476..12d8171d238 100644 +index ab20142de9a..4ef4aa80cc0 100644 --- a/chromium/v8/BUILD.gn +++ b/chromium/v8/BUILD.gn -@@ -3324,7 +3324,8 @@ v8_source_set("v8_base_without_compiler") { +@@ -3543,7 +3543,8 @@ v8_source_set("v8_base_without_compiler") { if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel" || v8_current_cpu == "mips64" || v8_current_cpu == "mips64el" || v8_current_cpu == "ppc" || v8_current_cpu == "ppc64" || diff --git a/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-Fix-bison-3.7.patch b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-Fix-bison-3.7.patch deleted file mode 100644 index 3272b727..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-Fix-bison-3.7.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 3ccc10f378ca26c35104e39e08771c053ae5b19e Mon Sep 17 00:00:00 2001 -From: Allan Sandfeld Jensen -Date: Fri, 14 Aug 2020 16:38:48 +0200 -Subject: [PATCH] chromium: Fix bison 3.7 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Do a replace run inspired by newer versions of the script. - -Fixes: QTBUG-86018 -Change-Id: Ib1dc771e22a662aff0fae842d135ad58fad08bc1 -Reviewed-by: Michael BrĂ¼ning -Signed-off-by: Martin Jansa ---- - .../renderer/build/scripts/rule_bison.py | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -diff --git a/chromium/third_party/blink/renderer/build/scripts/rule_bison.py b/chromium/third_party/blink/renderer/build/scripts/rule_bison.py -index f75e25fd23f..7e0767e951a 100755 ---- a/chromium/third_party/blink/renderer/build/scripts/rule_bison.py -+++ b/chromium/third_party/blink/renderer/build/scripts/rule_bison.py -@@ -45,6 +45,19 @@ from utilities import abs - - from blinkbuild.name_style_converter import NameStyleConverter - -+def modify_file(path, prefix_lines, suffix_lines, replace_list=[]): -+ prefix_lines = map(lambda s: s + '\n', prefix_lines) -+ suffix_lines = map(lambda s: s + '\n', suffix_lines) -+ with open(path, 'r') as f: -+ old_lines = f.readlines() -+ for i in range(len(old_lines)): -+ for src, dest in replace_list: -+ old_lines[i] = old_lines[i].replace(src, dest) -+ new_lines = prefix_lines + old_lines + suffix_lines -+ with open(path, 'w') as f: -+ f.writelines(new_lines) -+ -+ - assert len(sys.argv) == 4 or len(sys.argv) == 5 - - inputFile = abs(sys.argv[1]) -@@ -115,3 +128,9 @@ print >>outputHFile, '#define %s' % headerGuard - print >>outputHFile, outputHContents - print >>outputHFile, '#endif // %s' % headerGuard - outputHFile.close() -+ -+common_replace_list = [(inputRoot + '.hh', -+ inputRoot + '.h')] -+modify_file( -+ outputCpp, [], [], -+ replace_list=common_replace_list) diff --git a/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-icu-use-system-library-only-targets.patch b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-icu-use-system-library-only-targets.patch index 52607983..8a6660ff 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-icu-use-system-library-only-targets.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-icu-use-system-library-only-targets.patch @@ -1,4 +1,4 @@ -From 8c9a4027426b0a2c56cc834da0dbad5b8378c2c6 Mon Sep 17 00:00:00 2001 +From 344e8a3945a29239dd2f27ea4969e3d64d5d8911 Mon Sep 17 00:00:00 2001 From: Andrej Valek Date: Fri, 17 Apr 2020 09:43:32 +0200 Subject: [PATCH] chromium: icu: use system library only targets @@ -20,7 +20,7 @@ Signed-off-by: Martin Jansa 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/chromium/third_party/icu/BUILD.gn b/chromium/third_party/icu/BUILD.gn -index 023d6e13a2c..312f34d6186 100644 +index 73673fa20ac..a656692c7bf 100644 --- a/chromium/third_party/icu/BUILD.gn +++ b/chromium/third_party/icu/BUILD.gn @@ -7,9 +7,13 @@ import("//build/config/host_byteorder.gni") @@ -37,9 +37,9 @@ index 023d6e13a2c..312f34d6186 100644 } if (is_android) { -@@ -20,6 +24,12 @@ if (is_mac) { - import("//build/config/sanitizers/sanitizers.gni") - } +@@ -23,6 +27,12 @@ if (is_mac) { + assert(!icu_disable_thin_archive || !is_component_build, + "icu_disable_thin_archive only works in static library builds") +if (use_system_icu) { + # Use system library only for target, otherwise use bundled @@ -50,7 +50,7 @@ index 023d6e13a2c..312f34d6186 100644 # Meta target that includes both icuuc and icui18n. Most targets want both. # You can depend on the individually if you need to. group("icu") { -@@ -1207,7 +1217,7 @@ config("system_icu_config") { +@@ -1222,7 +1232,7 @@ config("system_icu_config") { } } @@ -59,7 +59,7 @@ index 023d6e13a2c..312f34d6186 100644 pkg_config("system_icui18n") { packages = [ "icu-i18n" ] } -@@ -1420,7 +1430,7 @@ shim_headers("icuuc_shim") { +@@ -1435,7 +1445,7 @@ shim_headers("icuuc_shim") { } config("icu_config") { @@ -68,7 +68,7 @@ index 023d6e13a2c..312f34d6186 100644 configs = [ ":system_icu_config"] } else { configs = [ ":bundled_icu_config"] -@@ -1428,7 +1438,7 @@ config("icu_config") { +@@ -1443,7 +1453,7 @@ config("icu_config") { } group("icuuc") { @@ -77,7 +77,7 @@ index 023d6e13a2c..312f34d6186 100644 deps = [ ":icuuc_shim" ] public_configs = [ ":system_icu_config", -@@ -1440,7 +1450,7 @@ group("icuuc") { +@@ -1455,7 +1465,7 @@ group("icuuc") { } group("icui18n") { diff --git a/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-Use-correct-member-name-__si_fields-fr.patch b/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-Use-correct-member-name-__si_fields-fr.patch deleted file mode 100644 index 2da3e09d..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-Use-correct-member-name-__si_fields-fr.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 1902fc967d6f900a4e918e56f21bc856a0462e4c 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/0025-chromium-musl-Adjust-default-pthread-stack-size.patch b/recipes-qt/qt5/qtwebengine/chromium/0025-chromium-musl-Adjust-default-pthread-stack-size.patch index 04bf89e4..50d17413 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0025-chromium-musl-Adjust-default-pthread-stack-size.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0025-chromium-musl-Adjust-default-pthread-stack-size.patch @@ -5,15 +5,15 @@ 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(-) + chromium/base/threading/platform_thread_linux.cc | 3 ++- + chromium/third_party/blink/renderer/platform/wtf/stack_util.cc | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/chromium/base/threading/platform_thread_linux.cc b/chromium/base/threading/platform_thread_linux.cc -index 095c49b8dc0..d1479b54d48 100644 +index 74a01ad5af5..dab5773d73b 100644 --- a/chromium/base/threading/platform_thread_linux.cc +++ b/chromium/base/threading/platform_thread_linux.cc -@@ -186,7 +186,8 @@ void TerminateOnThread() {} +@@ -377,7 +377,8 @@ void TerminateOnThread() {} size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) { #if !defined(THREAD_SANITIZER) @@ -24,15 +24,15 @@ index 095c49b8dc0..d1479b54d48 100644 // 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 +index ab1dff4167e..b0763b0bd9a 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) || \ +-#elif defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ ++#elif 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). diff --git a/recipes-qt/qt5/qtwebengine/chromium/0028-chromium-musl-pread-pwrite.patch b/recipes-qt/qt5/qtwebengine/chromium/0028-chromium-musl-pread-pwrite.patch index e6fa0887..edeb3272 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0028-chromium-musl-pread-pwrite.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0028-chromium-musl-pread-pwrite.patch @@ -14,10 +14,10 @@ Signed-off-by: Khem Raj 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 d2bd9df4d40..88ea7f508aa 100644 +index fd8efdffea6..22a8863031c 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 { +@@ -1244,6 +1244,11 @@ struct kernel_statfs { #ifndef __NR_fallocate #define __NR_fallocate 285 #endif diff --git a/recipes-qt/qt5/qtwebengine/chromium/0029-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch b/recipes-qt/qt5/qtwebengine/chromium/0029-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch index 8db39395..72adf1cb 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0029-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0029-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch @@ -25,10 +25,10 @@ Signed-off-by: Khem Raj 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chromium/net/socket/udp_socket_posix.cc b/chromium/net/socket/udp_socket_posix.cc -index 572472a6993..504fdb5d5c6 100644 +index 7df6892d67e..030ff8896e4 100644 --- a/chromium/net/socket/udp_socket_posix.cc +++ b/chromium/net/socket/udp_socket_posix.cc -@@ -1190,8 +1190,12 @@ SendResult UDPSocketPosixSender::InternalSendmmsgBuffers( +@@ -1199,8 +1199,12 @@ SendResult UDPSocketPosixSender::InternalSendmmsgBuffers( for (auto& buffer : buffers) msg_iov->push_back({const_cast(buffer->data()), buffer->length()}); msgvec->reserve(buffers.size()); -- cgit v1.2.3 From 39599c2c05432e4ab5a9310d4dd4f17b27a260b1 Mon Sep 17 00:00:00 2001 From: Jani Suonpera Date: Thu, 21 Jan 2021 12:15:41 +0200 Subject: Update qtwebengine-chromium Newer hash from 83-based branch. Change-Id: I3e944e8bf9ced2311569f298016a168c1336dc26 --- ...m-Fix-compiler-error-emitted-with-clang11.patch | 26 ---------------------- 1 file changed, 26 deletions(-) delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0016-chromium-Fix-compiler-error-emitted-with-clang11.patch (limited to 'recipes-qt/qt5/qtwebengine') diff --git a/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-Fix-compiler-error-emitted-with-clang11.patch b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-Fix-compiler-error-emitted-with-clang11.patch deleted file mode 100644 index f722cb99..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-Fix-compiler-error-emitted-with-clang11.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 46f0abc66c1d78c60a0415c5cb46852ef3bfa9bb Mon Sep 17 00:00:00 2001 -From: Nico Weber -Date: Sat, 8 Feb 2020 21:26:53 -0500 -Subject: [PATCH] Fix compile error emitted by trunk clang - -../../third_party/perfetto/src/tracing/core/virtual_destructors.cc:33:35: -error: destructor cannot be declared using a type alias - 'perfetto::TracingService::ConsumerEndpoint' (aka - 'perfetto::ConsumerEndpoint') of the class name -TracingService::ConsumerEndpoint::~ConsumerEndpoint() = default; - -Bug: chromium:1050372 -Change-Id: Icc1a8cca06b72ee3322924dc0825ebb62086f730 ---- a/chromium/third_party/perfetto/src/tracing/core/virtual_destructors.cc -+++ b/chromium/third_party/perfetto/src/tracing/core/virtual_destructors.cc -@@ -30,8 +30,8 @@ namespace perfetto { - Consumer::~Consumer() = default; - Producer::~Producer() = default; - TracingService::~TracingService() = default; --TracingService::ConsumerEndpoint::~ConsumerEndpoint() = default; --TracingService::ProducerEndpoint::~ProducerEndpoint() = default; -+ConsumerEndpoint::~ConsumerEndpoint() = default; -+ProducerEndpoint::~ProducerEndpoint() = default; - SharedMemory::~SharedMemory() = default; - SharedMemory::Factory::~Factory() = default; - SharedMemoryArbiter::~SharedMemoryArbiter() = default; -- cgit v1.2.3 From 7520e38d187cba6685848e12b3203f805c8f31a3 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Wed, 27 Jan 2021 13:30:03 +0100 Subject: qtwebengine: refresh the patches * update to match https://github.com/meta-qt5/qtwebengine/commits/b5.15-glibc 5.15-glibc.meta-qt5.9 https://github.com/meta-qt5/qtwebengine/commits/b5.15 5.15.meta-qt5.9 https://github.com/meta-qt5/qtwebengine-chromium/commits/83-based-glibc 83-based-glibc.meta-qt5.1 https://github.com/meta-qt5/qtwebengine-chromium/commits/83-based 83-based.meta-qt5.1 Signed-off-by: Martin Jansa --- .../0001-Force-host-toolchain-configuration.patch | 6 +- ...use-pvalloc-as-it-s-not-available-on-musl.patch | 2 +- .../0003-musl-link-against-libexecinfo.patch | 2 +- ...0004-mkspecs-Allow-builds-with-libc-glibc.patch | 12 +- ...um-workaround-for-too-long-.rps-file-name.patch | 2 +- .../0002-chromium-stack-pointer-clobber.patch | 2 +- .../0003-chromium-fix-build-with-clang.patch | 2 +- ...0004-chromium-Exclude-CRC32-for-32bit-arm.patch | 6 +- ...-Do-not-try-to-set-the-guessed-values-for.patch | 2 +- .../0006-chromium-aarch64-skia-build-fix.patch | 2 +- ...um-fix-build-after-y2038-changes-in-glibc.patch | 2 +- ...x-build-on-32bit-arches-with-64bit-time_t.patch | 2 +- ...ium-Include-cstddef-for-size_t-definition.patch | 2 +- ...ve-CharAllocator-definition-to-a-header-f.patch | 2 +- ...0011-chromium-Include-cstddef-and-cstdint.patch | 2 +- ...12-chromium-Link-v8-with-libatomic-on-x86.patch | 2 +- ...omium-icu-use-system-library-only-targets.patch | 88 +++++++++++++ ...x-sandbox-Aw-snap-for-syscalls-403-and-40.patch | 139 +++++++++++++++++++++ ...omium-icu-use-system-library-only-targets.patch | 88 ------------- ...x-sandbox-Aw-snap-for-syscalls-403-and-40.patch | 139 --------------------- ...sl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch | 33 +++++ ...sl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch | 52 ++++++++ ...sl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch | 33 ----- ...sl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch | 52 -------- ...-chromium-musl-include-fcntl.h-for-loff_t.patch | 22 ++++ ...-chromium-musl-include-fcntl.h-for-loff_t.patch | 22 ---- ...sl-use-off64_t-instead-of-the-internal-__.patch | 62 +++++++++ ...ium-musl-linux-glibc-make-the-distinction.patch | 23 ++++ ...sl-use-off64_t-instead-of-the-internal-__.patch | 62 --------- ...sl-allocator-Do-not-include-glibc_weak_sy.patch | 24 ++++ ...ium-musl-linux-glibc-make-the-distinction.patch | 23 ---- ...sl-Define-res_ninit-and-res_nclose-for-no.patch | 79 ++++++++++++ ...sl-allocator-Do-not-include-glibc_weak_sy.patch | 24 ---- ...hromium-musl-Do-not-define-__sbrk-on-musl.patch | 26 ++++ ...um-musl-Adjust-default-pthread-stack-size.patch | 47 +++++++ ...sl-Define-res_ninit-and-res_nclose-for-no.patch | 79 ------------ ...hromium-musl-Do-not-define-__sbrk-on-musl.patch | 26 ---- ...sl-Use-_fpstate-instead-of-_libc_fpstate-.patch | 63 ++++++++++ ...um-musl-Adjust-default-pthread-stack-size.patch | 47 ------- ...sl-elf_reader.cc-include-sys-reg.h-to-get.patch | 56 +++++++++ ...sl-Use-_fpstate-instead-of-_libc_fpstate-.patch | 63 ---------- .../chromium/0026-chromium-musl-pread-pwrite.patch | 31 +++++ ...sl-elf_reader.cc-include-sys-reg.h-to-get.patch | 56 --------- ...sl-initialize-msghdr-in-a-compatible-mann.patch | 45 +++++++ .../chromium/0028-chromium-musl-pread-pwrite.patch | 31 ----- ...sl-initialize-msghdr-in-a-compatible-mann.patch | 45 ------- 46 files changed, 815 insertions(+), 815 deletions(-) create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0013-chromium-icu-use-system-library-only-targets.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0014-chromium-Fix-sandbox-Aw-snap-for-syscalls-403-and-40.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0014-chromium-icu-use-system-library-only-targets.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0015-chromium-Fix-sandbox-Aw-snap-for-syscalls-403-and-40.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-include-fcntl.h-for-loff_t.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-include-fcntl.h-for-loff_t.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-use-off64_t-instead-of-the-internal-__.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-linux-glibc-make-the-distinction.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-use-off64_t-instead-of-the-internal-__.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-linux-glibc-make-the-distinction.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-Do-not-define-__sbrk-on-musl.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0023-chromium-musl-Adjust-default-pthread-stack-size.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0023-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0024-chromium-musl-Do-not-define-__sbrk-on-musl.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0024-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0025-chromium-musl-Adjust-default-pthread-stack-size.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0025-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0026-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0026-chromium-musl-pread-pwrite.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0027-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0027-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0028-chromium-musl-pread-pwrite.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0029-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch (limited to 'recipes-qt/qt5/qtwebengine') 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 31961d91..d1a73717 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 a6f536ce5753e95d2ecfd392ebc7deb37aceea09 Mon Sep 17 00:00:00 2001 +From efcb303585f8ebae43767ab284d1e808d44d290f 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,10 +19,10 @@ 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 455a2e3c..6178d860 100644 +index 56c18bdb..ea6142a6 100644 --- a/src/buildtools/config/linux.pri +++ b/src/buildtools/config/linux.pri -@@ -122,7 +122,7 @@ contains(QT_ARCH, "mips") { +@@ -118,7 +118,7 @@ contains(QT_ARCH, "mips") { host_build { gn_args += custom_toolchain=\"$$QTWEBENGINE_OUT_ROOT/src/toolchain:host\" 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 27fc693a..2fbe73f7 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 8e1f112ba2cef3a7752263259921372d62324469 Mon Sep 17 00:00:00 2001 +From 4d816d872fbb635ac5a6d263218634b7027fa0f9 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 fa7de449..e2ed63cb 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 cc707f6c2d3dd152fcca23de0545351e99b3edcb Mon Sep 17 00:00:00 2001 +From 5ff62acfe5882c39dcd9154dbb9bd631b10c20ab 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 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 6bd374d8..6569ced8 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,4 +1,4 @@ -From 5994177219f97ac3eac35539b281c507dc65ed41 Mon Sep 17 00:00:00 2001 +From b52d58e204ffcb3dcd55ddee390d256cfbb1b54b 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 @@ -10,10 +10,10 @@ Signed-off-by: Khem Raj 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri -index 6768f0a1..1885f1b4 100644 +index e192f877..49ad4bf3 100644 --- a/src/buildtools/config/support.pri +++ b/src/buildtools/config/support.pri -@@ -177,10 +177,6 @@ defineTest(qtwebengine_checkForHostPkgCfg) { +@@ -181,10 +181,6 @@ defineTest(qtwebengine_checkForHostPkgCfg) { defineTest(qtwebengine_checkForGlibc) { module = $$1 @@ -25,10 +25,10 @@ index 6768f0a1..1885f1b4 100644 } diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json -index 96727a14..fef8fc5e 100644 +index 1ca6214a..b352e675 100644 --- a/src/buildtools/configure.json +++ b/src/buildtools/configure.json -@@ -371,7 +371,6 @@ +@@ -376,7 +376,6 @@ && (!config.sanitizer || features.webengine-sanitizer) && (!config.linux || features.pkg-config) && (!config.linux || features.webengine-host-pkg-config) @@ -36,7 +36,7 @@ index 96727a14..fef8fc5e 100644 && (!config.linux || features.webengine-system-khr) && (!config.linux || features.webengine-system-nss) && (!config.linux || features.webengine-system-dbus) -@@ -732,8 +731,7 @@ +@@ -743,8 +742,7 @@ "webengine-system-fontconfig", "webengine-system-dbus", "webengine-system-nss", 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 8b5d41ba..a783a1e7 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 5af62581e5116b57efbe4bb7cc467efeb0aab941 Mon Sep 17 00:00:00 2001 +From 0e5ecca67b6a9fb71bb200af534f22cb820ac652 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 c93ba991..0b14cf81 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 8dd7987fc70fd8dab4a9f7ee32334c8d28ed34e4 Mon Sep 17 00:00:00 2001 +From 1af3e18800c3be5c4fbe1aa96fc1a0c454d89817 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 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 a3f292c3..659f938a 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 be18ba6e0b879fbd542f4e0d1a249f2ab5abb27c Mon Sep 17 00:00:00 2001 +From 52bcf1b214cd39139fdd547fef514acaf19bd3f8 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 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 c3de3cc5..f79c07a5 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 7eeed60fceeca490c5252e256baff08100e13259 Mon Sep 17 00:00:00 2001 +From 1572f98f6be6ac77a45dfd5442b2f6ba1a03e360 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,10 +15,10 @@ 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 00d1e7c6ca3..f2c36d72dd2 100644 +index fb2a35e87f2..6cca80181ed 100644 --- a/chromium/third_party/zlib/BUILD.gn +++ b/chromium/third_party/zlib/BUILD.gn -@@ -86,8 +86,11 @@ if (use_arm_neon_optimizations) { +@@ -89,8 +89,11 @@ if (use_arm_neon_optimizations) { # Disabled for iPhone, as described in DDI0487C_a_armv8_arm: # "All implementations of the ARMv8.1 architecture are required to # implement the CRC32* instructions. These are optional in ARMv8.0." diff --git a/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for.patch b/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for.patch index 5f3f4528..37442d0a 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for.patch @@ -1,4 +1,4 @@ -From 0faac107930255380ea07aa75267153022de2248 Mon Sep 17 00:00:00 2001 +From 4e0bc86764ac1e324c50e698b47c630efab07632 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 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 f560e315..5da3c36f 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 69abe5acb926cef9ac771015ade3873fa9985f3b Mon Sep 17 00:00:00 2001 +From 2eab9281d34bf53fd5a4b58184f9e165e27f9eaf 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 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 1c7a3b1e..0dacc25f 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 8a0cc2a6be8fb9f8c3f4976ad4b41b291e672a67 Mon Sep 17 00:00:00 2001 +From 3be4bd9030c774e5e06abd5e74f9f5465510b2db 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 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 index 63a460cc..b7c9f1b1 100644 --- 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 @@ -1,4 +1,4 @@ -From ddedffaeb9f04ac8530f87f5010e0008dc548b96 Mon Sep 17 00:00:00 2001 +From e61af5f5bc6a14a3e77373eee1055cd15c54797f 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 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 index 41a8ce36..78dbba17 100644 --- 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 @@ -1,4 +1,4 @@ -From 022100d701dca71ecfe237e133712398bc1c59a7 Mon Sep 17 00:00:00 2001 +From 533788149c8b24d7da2702866594cd7a44c8f571 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 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 index abe1e16d..d018397e 100644 --- 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 @@ -1,4 +1,4 @@ -From 9d9db26e626e1c8d4d10eab1522daf0efc8cb11c Mon Sep 17 00:00:00 2001 +From ec96f37700a45c317027ad917a835e1eac2169fc 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 diff --git a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.patch b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.patch index 464f952b..a8f3feb9 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.patch @@ -1,4 +1,4 @@ -From 1b8d57ba6595bbd743f6570d834f6a08600fb117 Mon Sep 17 00:00:00 2001 +From 93a8a2a4c33ffece095ab3438eb3c7a4f60ead34 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 15 Jan 2020 16:53:46 -0800 Subject: [PATCH] chromium: Include and diff --git a/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch index eaff07e0..1ce09e34 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch @@ -1,4 +1,4 @@ -From e60314a1257964bbebc0e7633d9799fd7c7ec35b Mon Sep 17 00:00:00 2001 +From 15e16b5f8405a402b94bd1be48d1eabff474795f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 1 Feb 2020 12:17:23 -0800 Subject: [PATCH] chromium: Link v8 with libatomic on x86 diff --git a/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-icu-use-system-library-only-targets.patch b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-icu-use-system-library-only-targets.patch new file mode 100644 index 00000000..a8b52c39 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-icu-use-system-library-only-targets.patch @@ -0,0 +1,88 @@ +From f0aebd4351e729d281fb597627ff87cbe8a67dd0 Mon Sep 17 00:00:00 2001 +From: Andrej Valek +Date: Fri, 17 Apr 2020 09:43:32 +0200 +Subject: [PATCH] chromium: icu: use system library only targets + + - use bundled one for native/v8 internal builds + +Complete system ICU library using requires ICU dev package +be installed on host. Enabling dependency on native package +is not enough due to V8 hosttools toolchain. V8 toolchain +is not using native sysroot, only a host packages. +On the other hand webenegine does not produce external +native artifacts. So external system ICU linking is not +needed. + +Signed-off-by: Andrej Valek +Signed-off-by: Martin Jansa +--- + chromium/third_party/icu/BUILD.gn | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) + +diff --git a/chromium/third_party/icu/BUILD.gn b/chromium/third_party/icu/BUILD.gn +index 73673fa20ac..a656692c7bf 100644 +--- a/chromium/third_party/icu/BUILD.gn ++++ b/chromium/third_party/icu/BUILD.gn +@@ -7,9 +7,13 @@ import("//build/config/host_byteorder.gni") + import("//build/config/linux/pkg_config.gni") + import("//build/shim_headers.gni") + import("//third_party/icu/config.gni") ++import("//v8/gni/snapshot_toolchain.gni") + + declare_args() { + use_system_icu = false ++ ++ # Use only target icu library, when system using is enabled ++ use_system_icu_target_only = false + } + + if (is_android) { +@@ -23,6 +27,12 @@ if (is_mac) { + assert(!icu_disable_thin_archive || !is_component_build, + "icu_disable_thin_archive only works in static library builds") + ++if (use_system_icu) { ++ # Use system library only for target, otherwise use bundled ++ if ((current_toolchain != host_toolchain) && (current_toolchain != v8_snapshot_toolchain)) { ++ use_system_icu_target_only = true ++ } ++} + # Meta target that includes both icuuc and icui18n. Most targets want both. + # You can depend on the individually if you need to. + group("icu") { +@@ -1222,7 +1232,7 @@ config("system_icu_config") { + } + } + +-if (use_system_icu) { ++if (use_system_icu_target_only) { + pkg_config("system_icui18n") { + packages = [ "icu-i18n" ] + } +@@ -1435,7 +1445,7 @@ shim_headers("icuuc_shim") { + } + + config("icu_config") { +- if (use_system_icu) { ++ if (use_system_icu_target_only) { + configs = [ ":system_icu_config"] + } else { + configs = [ ":bundled_icu_config"] +@@ -1443,7 +1453,7 @@ config("icu_config") { + } + + group("icuuc") { +- if (use_system_icu) { ++ if (use_system_icu_target_only) { + deps = [ ":icuuc_shim" ] + public_configs = [ + ":system_icu_config", +@@ -1455,7 +1465,7 @@ group("icuuc") { + } + + group("icui18n") { +- if (use_system_icu) { ++ if (use_system_icu_target_only) { + deps = [ ":icui18n_shim" ] + public_configs = [ + ":system_icu_config", diff --git a/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-Fix-sandbox-Aw-snap-for-syscalls-403-and-40.patch b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-Fix-sandbox-Aw-snap-for-syscalls-403-and-40.patch new file mode 100644 index 00000000..7708a4c0 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-Fix-sandbox-Aw-snap-for-syscalls-403-and-40.patch @@ -0,0 +1,139 @@ +From d073427b25915e1784c3d74296b68fef0076ceb0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Mon, 20 Apr 2020 23:56:48 +0200 +Subject: [PATCH] chromium: Fix sandbox 'Aw, snap' for syscalls 403 and 407 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Taken as is from meta-browser. Saw my application freeze for syscall 0407 +trouble: + +| ../../../../git/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:seccomp-bpf failure in syscall 0407 + +Original commit message: + +* syscall 403: reported by ArchLinux users [1-2] +* syscall 407: reported by me [3] + +Looking at [4-5] it seems that glibc (>=2.31?) introduced extra syscalls for +32Bit systems to handle time64: + +* __NR_clock_gettime -> __NR_clock_gettime64 +* __NR_clock_nanosleep -> __NR_clock_nanosleep_time64 + +To fix +| ../../sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:seccomp-bpf failure in syscall 0403 +| ../../sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:seccomp-bpf failure in syscall 0407 + +we handle new systemcalls in the same way as 64bit systems do and 32bit systems +did before glibc 2.31. + +[1] https://bugs.archlinux32.org/index.php?do=details&task_id=105 +[2] https://bbs.archlinux32.org/viewtopic.php?id=2897 +[3] https://github.com/OSSystems/meta-browser/issues/357 +[4] https://sourceware.org/git/?p=glibc.git;a=commit;h=2e44b10b42d68d9887ccab17b76db5d7bbae4fb6 +[5] https://github.com/bminor/glibc/blob/019d828669df966dc4ef2684fce0b1c17bef9aae/sysdeps/unix/sysv/linux/clock_gettime.c#L30 + +Upstream Status: Pending [Have no idea where to send this] + +Signed-off-by: Andreas MĂ¼ller +Signed-off-by: Martin Jansa +--- + .../sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc | 9 ++++++++- + .../syscall_parameters_restrictions_unittests.cc | 6 ++++++ + .../sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc | 6 ++++++ + .../sandbox/linux/system_headers/arm_linux_syscalls.h | 8 ++++++++ + .../sandbox/linux/system_headers/mips_linux_syscalls.h | 8 ++++++++ + 5 files changed, 36 insertions(+), 1 deletion(-) + +diff --git a/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc b/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +index 712f9699a94..2a80dd2d2b3 100644 +--- a/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc ++++ b/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +@@ -148,7 +148,14 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, + return Allow(); + #endif + +- if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) { ++ if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep ++#if defined(__NR_clock_gettime64) ++ || sysno == __NR_clock_gettime64 ++#endif ++#if defined(__NR_clock_nanosleep_time64) ++ || sysno == __NR_clock_nanosleep_time64 ++#endif ++ ) { + return RestrictClockID(); + } + +diff --git a/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc b/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc +index b6c8c637746..81972a9d998 100644 +--- a/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc ++++ b/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc +@@ -60,6 +60,12 @@ class RestrictClockIdPolicy : public bpf_dsl::Policy { + case __NR_clock_gettime: + case __NR_clock_getres: + case __NR_clock_nanosleep: ++#if defined(__NR_clock_nanosleep_time64) ++ case __NR_clock_nanosleep_time64: ++#endif ++#if defined(__NR_clock_gettime64) ++ case __NR_clock_gettime64: ++#endif + return RestrictClockID(); + default: + return Allow(); +diff --git a/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +index d9d18822f67..0db8745cb57 100644 +--- a/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ++++ b/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +@@ -39,6 +39,12 @@ bool SyscallSets::IsAllowedGettime(int sysno) { + // filtered by RestrictClokID(). + case __NR_clock_gettime: // Parameters filtered by RestrictClockID(). + case __NR_clock_nanosleep: // Parameters filtered by RestrictClockID(). ++#if defined(__NR_clock_gettime64) ++ case __NR_clock_gettime64: // Parameters filtered by RestrictClockID(). ++#endif ++#if defined(__NR_clock_nanosleep_time64) ++ case __NR_clock_nanosleep_time64: // Parameters filtered by RestrictClockID(). ++#endif + case __NR_clock_settime: // Privileged. + #if defined(__i386__) || \ + (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) +diff --git a/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h b/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h +index 1addd53843c..5de2162f981 100644 +--- a/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h ++++ b/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h +@@ -1385,6 +1385,14 @@ + #define __NR_memfd_create (__NR_SYSCALL_BASE+385) + #endif + ++#if !defined(__NR_clock_gettime64) ++#define __NR_clock_gettime64 (__NR_SYSCALL_BASE+403) ++#endif ++ ++#if !defined(__NR_clock_nanosleep_time64) ++#define __NR_clock_nanosleep_time64 (__NR_SYSCALL_BASE+407) ++#endif ++ + // ARM private syscalls. + #if !defined(__ARM_NR_BASE) + #define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000) +diff --git a/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h b/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h +index ddbf97f3d8b..fa01b3bbc66 100644 +--- a/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h ++++ b/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h +@@ -1433,4 +1433,12 @@ + #define __NR_memfd_create (__NR_Linux + 354) + #endif + ++#if !defined(__NR_clock_gettime64) ++#define __NR_clock_gettime64 (__NR_Linux + 403) ++#endif ++ ++#if !defined(__NR_clock_nanosleep_time64) ++#define __NR_clock_nanosleep_time64 (__NR_Linux + 407) ++#endif ++ + #endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS_LINUX_SYSCALLS_H_ diff --git a/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-icu-use-system-library-only-targets.patch b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-icu-use-system-library-only-targets.patch deleted file mode 100644 index 8a6660ff..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-icu-use-system-library-only-targets.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 344e8a3945a29239dd2f27ea4969e3d64d5d8911 Mon Sep 17 00:00:00 2001 -From: Andrej Valek -Date: Fri, 17 Apr 2020 09:43:32 +0200 -Subject: [PATCH] chromium: icu: use system library only targets - - - use bundled one for native/v8 internal builds - -Complete system ICU library using requires ICU dev package -be installed on host. Enabling dependency on native package -is not enough due to V8 hosttools toolchain. V8 toolchain -is not using native sysroot, only a host packages. -On the other hand webenegine does not produce external -native artifacts. So external system ICU linking is not -needed. - -Signed-off-by: Andrej Valek -Signed-off-by: Martin Jansa ---- - chromium/third_party/icu/BUILD.gn | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -diff --git a/chromium/third_party/icu/BUILD.gn b/chromium/third_party/icu/BUILD.gn -index 73673fa20ac..a656692c7bf 100644 ---- a/chromium/third_party/icu/BUILD.gn -+++ b/chromium/third_party/icu/BUILD.gn -@@ -7,9 +7,13 @@ import("//build/config/host_byteorder.gni") - import("//build/config/linux/pkg_config.gni") - import("//build/shim_headers.gni") - import("//third_party/icu/config.gni") -+import("//v8/gni/snapshot_toolchain.gni") - - declare_args() { - use_system_icu = false -+ -+ # Use only target icu library, when system using is enabled -+ use_system_icu_target_only = false - } - - if (is_android) { -@@ -23,6 +27,12 @@ if (is_mac) { - assert(!icu_disable_thin_archive || !is_component_build, - "icu_disable_thin_archive only works in static library builds") - -+if (use_system_icu) { -+ # Use system library only for target, otherwise use bundled -+ if ((current_toolchain != host_toolchain) && (current_toolchain != v8_snapshot_toolchain)) { -+ use_system_icu_target_only = true -+ } -+} - # Meta target that includes both icuuc and icui18n. Most targets want both. - # You can depend on the individually if you need to. - group("icu") { -@@ -1222,7 +1232,7 @@ config("system_icu_config") { - } - } - --if (use_system_icu) { -+if (use_system_icu_target_only) { - pkg_config("system_icui18n") { - packages = [ "icu-i18n" ] - } -@@ -1435,7 +1445,7 @@ shim_headers("icuuc_shim") { - } - - config("icu_config") { -- if (use_system_icu) { -+ if (use_system_icu_target_only) { - configs = [ ":system_icu_config"] - } else { - configs = [ ":bundled_icu_config"] -@@ -1443,7 +1453,7 @@ config("icu_config") { - } - - group("icuuc") { -- if (use_system_icu) { -+ if (use_system_icu_target_only) { - deps = [ ":icuuc_shim" ] - public_configs = [ - ":system_icu_config", -@@ -1455,7 +1465,7 @@ group("icuuc") { - } - - group("icui18n") { -- if (use_system_icu) { -+ if (use_system_icu_target_only) { - deps = [ ":icui18n_shim" ] - public_configs = [ - ":system_icu_config", diff --git a/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-Fix-sandbox-Aw-snap-for-syscalls-403-and-40.patch b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-Fix-sandbox-Aw-snap-for-syscalls-403-and-40.patch deleted file mode 100644 index 1b43fcbb..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-Fix-sandbox-Aw-snap-for-syscalls-403-and-40.patch +++ /dev/null @@ -1,139 +0,0 @@ -From 5aa69767be0fbbc7a3a5075c6c94366a535c99a8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= -Date: Mon, 20 Apr 2020 23:56:48 +0200 -Subject: [PATCH] chromium: Fix sandbox 'Aw, snap' for syscalls 403 and 407 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Taken as is from meta-browser. Saw my application freeze for syscall 0407 -trouble: - -| ../../../../git/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:seccomp-bpf failure in syscall 0407 - -Original commit message: - -* syscall 403: reported by ArchLinux users [1-2] -* syscall 407: reported by me [3] - -Looking at [4-5] it seems that glibc (>=2.31?) introduced extra syscalls for -32Bit systems to handle time64: - -* __NR_clock_gettime -> __NR_clock_gettime64 -* __NR_clock_nanosleep -> __NR_clock_nanosleep_time64 - -To fix -| ../../sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:seccomp-bpf failure in syscall 0403 -| ../../sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:seccomp-bpf failure in syscall 0407 - -we handle new systemcalls in the same way as 64bit systems do and 32bit systems -did before glibc 2.31. - -[1] https://bugs.archlinux32.org/index.php?do=details&task_id=105 -[2] https://bbs.archlinux32.org/viewtopic.php?id=2897 -[3] https://github.com/OSSystems/meta-browser/issues/357 -[4] https://sourceware.org/git/?p=glibc.git;a=commit;h=2e44b10b42d68d9887ccab17b76db5d7bbae4fb6 -[5] https://github.com/bminor/glibc/blob/019d828669df966dc4ef2684fce0b1c17bef9aae/sysdeps/unix/sysv/linux/clock_gettime.c#L30 - -Upstream Status: Pending [Have no idea where to send this] - -Signed-off-by: Andreas MĂ¼ller -Signed-off-by: Martin Jansa ---- - .../sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc | 9 ++++++++- - .../syscall_parameters_restrictions_unittests.cc | 6 ++++++ - .../sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc | 6 ++++++ - .../sandbox/linux/system_headers/arm_linux_syscalls.h | 8 ++++++++ - .../sandbox/linux/system_headers/mips_linux_syscalls.h | 8 ++++++++ - 5 files changed, 36 insertions(+), 1 deletion(-) - -diff --git a/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc b/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc -index 768025ce192..87025d91785 100644 ---- a/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc -+++ b/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc -@@ -148,7 +148,14 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, - return Allow(); - #endif - -- if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) { -+ if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep -+#if defined(__NR_clock_gettime64) -+ || sysno == __NR_clock_gettime64 -+#endif -+#if defined(__NR_clock_nanosleep_time64) -+ || sysno == __NR_clock_nanosleep_time64 -+#endif -+ ) { - return RestrictClockID(); - } - -diff --git a/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc b/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc -index 76193b62c9f..7731c697002 100644 ---- a/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc -+++ b/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc -@@ -60,6 +60,12 @@ class RestrictClockIdPolicy : public bpf_dsl::Policy { - case __NR_clock_gettime: - case __NR_clock_getres: - case __NR_clock_nanosleep: -+#if defined(__NR_clock_nanosleep_time64) -+ case __NR_clock_nanosleep_time64: -+#endif -+#if defined(__NR_clock_gettime64) -+ case __NR_clock_gettime64: -+#endif - return RestrictClockID(); - default: - return Allow(); -diff --git a/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -index d9d18822f67..0db8745cb57 100644 ---- a/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -+++ b/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -@@ -39,6 +39,12 @@ bool SyscallSets::IsAllowedGettime(int sysno) { - // filtered by RestrictClokID(). - case __NR_clock_gettime: // Parameters filtered by RestrictClockID(). - case __NR_clock_nanosleep: // Parameters filtered by RestrictClockID(). -+#if defined(__NR_clock_gettime64) -+ case __NR_clock_gettime64: // Parameters filtered by RestrictClockID(). -+#endif -+#if defined(__NR_clock_nanosleep_time64) -+ case __NR_clock_nanosleep_time64: // Parameters filtered by RestrictClockID(). -+#endif - case __NR_clock_settime: // Privileged. - #if defined(__i386__) || \ - (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -diff --git a/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h b/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h -index 1addd53843c..5de2162f981 100644 ---- a/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h -+++ b/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h -@@ -1385,6 +1385,14 @@ - #define __NR_memfd_create (__NR_SYSCALL_BASE+385) - #endif - -+#if !defined(__NR_clock_gettime64) -+#define __NR_clock_gettime64 (__NR_SYSCALL_BASE+403) -+#endif -+ -+#if !defined(__NR_clock_nanosleep_time64) -+#define __NR_clock_nanosleep_time64 (__NR_SYSCALL_BASE+407) -+#endif -+ - // ARM private syscalls. - #if !defined(__ARM_NR_BASE) - #define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000) -diff --git a/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h b/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h -index ddbf97f3d8b..fa01b3bbc66 100644 ---- a/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h -+++ b/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h -@@ -1433,4 +1433,12 @@ - #define __NR_memfd_create (__NR_Linux + 354) - #endif - -+#if !defined(__NR_clock_gettime64) -+#define __NR_clock_gettime64 (__NR_Linux + 403) -+#endif -+ -+#if !defined(__NR_clock_nanosleep_time64) -+#define __NR_clock_nanosleep_time64 (__NR_Linux + 407) -+#endif -+ - #endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS_LINUX_SYSCALLS_H_ diff --git a/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch new file mode 100644 index 00000000..e1624cb9 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch @@ -0,0 +1,33 @@ +From d6a03a1de746c5fc460f3e63fe2ceec050663da4 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 5fdb4817af8..e5b9431daa0 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/0016-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch new file mode 100644 index 00000000..ef45ed08 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch @@ -0,0 +1,52 @@ +From 73d501e0503fc5a9a2229933f976c713b6e7f28a 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 044bd8d244f..cec43e1d59b 100644 +--- a/chromium/base/process/process_metrics_posix.cc ++++ b/chromium/base/process/process_metrics_posix.cc +@@ -110,14 +110,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 BUILDFLAG(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 1bf34c9d9ea..00e46d30b3a 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_) +@@ -170,6 +171,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/0016-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch deleted file mode 100644 index 01c46c05..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0dbcdee3ccc23d3a6c9e66b5abc3fb3d1ccbc297 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/0017-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch deleted file mode 100644 index 03226154..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch +++ /dev/null @@ -1,52 +0,0 @@ -From bbb23eb876e1f4500e7c8fd716a73351ad660725 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 044bd8d244f..cec43e1d59b 100644 ---- a/chromium/base/process/process_metrics_posix.cc -+++ b/chromium/base/process/process_metrics_posix.cc -@@ -110,14 +110,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 BUILDFLAG(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 7e42cfc20bb..4e24fc711ad 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_) -@@ -175,6 +176,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/0017-chromium-musl-include-fcntl.h-for-loff_t.patch b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-include-fcntl.h-for-loff_t.patch new file mode 100644 index 00000000..7cc717e2 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-include-fcntl.h-for-loff_t.patch @@ -0,0 +1,22 @@ +From 181e65fb3a39ad4fb08c676b0ee67d887aeb68c7 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/0018-chromium-musl-include-fcntl.h-for-loff_t.patch b/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-include-fcntl.h-for-loff_t.patch deleted file mode 100644 index 869ac113..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-include-fcntl.h-for-loff_t.patch +++ /dev/null @@ -1,22 +0,0 @@ -From d1d6bd4260eb847c1493a8ce4a974bb8d8ee0218 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/0018-chromium-musl-use-off64_t-instead-of-the-internal-__.patch b/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-use-off64_t-instead-of-the-internal-__.patch new file mode 100644 index 00000000..96d5f6c0 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-use-off64_t-instead-of-the-internal-__.patch @@ -0,0 +1,62 @@ +From 486e9c6aa16c9f2ea69a454bacbb15a11c0f96f2 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/0019-chromium-musl-linux-glibc-make-the-distinction.patch b/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-linux-glibc-make-the-distinction.patch new file mode 100644 index 00000000..f01dbc80 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-linux-glibc-make-the-distinction.patch @@ -0,0 +1,23 @@ +From 4d4ec444217441b360e0ed7d784558b8acbcd4ab 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 5ea77ef2d27..85343a13905 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) && BUILDFLAG(USE_TCMALLOC) && \ ++#elif defined(__GLIBC__) && BUILDFLAG(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/0019-chromium-musl-use-off64_t-instead-of-the-internal-__.patch b/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-use-off64_t-instead-of-the-internal-__.patch deleted file mode 100644 index 638c7312..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-use-off64_t-instead-of-the-internal-__.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 7cf2404330f7888f3cc8a25becfe944cc2fc421e 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/0020-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch b/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch new file mode 100644 index 00000000..96eac41d --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch @@ -0,0 +1,24 @@ +From a07b5244ac103dd49c3deab81b6bed7589f5384e 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 ef42d5ad67f..626e4c996a5 100644 +--- a/chromium/base/allocator/allocator_shim.cc ++++ b/chromium/base/allocator/allocator_shim.cc +@@ -352,7 +352,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 BUILDFLAG(USE_TCMALLOC) ++#if BUILDFLAG(USE_TCMALLOC) && defined(__GLIBC__) + #include "base/allocator/allocator_shim_override_glibc_weak_symbols.h" + #endif + diff --git a/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-linux-glibc-make-the-distinction.patch b/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-linux-glibc-make-the-distinction.patch deleted file mode 100644 index 55939ddd..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-linux-glibc-make-the-distinction.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 350b57a5cad7c655ccb68a8b4b91e7d32021a1d7 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 5ea77ef2d27..85343a13905 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) && BUILDFLAG(USE_TCMALLOC) && \ -+#elif defined(__GLIBC__) && BUILDFLAG(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/0021-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch b/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch new file mode 100644 index 00000000..c359002e --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch @@ -0,0 +1,79 @@ +From 50a0f95d35c5180ee04fd66ec5135bf020acdad2 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 eaa5336c339..18b40d7d005 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 1c014a65019..2670a827aa5 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/0021-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch b/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch deleted file mode 100644 index 37276844..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 68decc5d87b4eb013f1455fc4f81f67f926fa3b2 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 ef42d5ad67f..626e4c996a5 100644 ---- a/chromium/base/allocator/allocator_shim.cc -+++ b/chromium/base/allocator/allocator_shim.cc -@@ -352,7 +352,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 BUILDFLAG(USE_TCMALLOC) -+#if BUILDFLAG(USE_TCMALLOC) && defined(__GLIBC__) - #include "base/allocator/allocator_shim_override_glibc_weak_symbols.h" - #endif - diff --git a/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-Do-not-define-__sbrk-on-musl.patch b/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-Do-not-define-__sbrk-on-musl.patch new file mode 100644 index 00000000..2cdec0e0 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-Do-not-define-__sbrk-on-musl.patch @@ -0,0 +1,26 @@ +From 095231f601a93c46408364d9ffd1378a14cc8d83 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/0023-chromium-musl-Adjust-default-pthread-stack-size.patch b/recipes-qt/qt5/qtwebengine/chromium/0023-chromium-musl-Adjust-default-pthread-stack-size.patch new file mode 100644 index 00000000..808cf67a --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0023-chromium-musl-Adjust-default-pthread-stack-size.patch @@ -0,0 +1,47 @@ +From c24db93fd5fa5728da55448865ba6bb4d6355491 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 1aaaa1c60d2..f49152fa6ac 100644 +--- a/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc ++++ b/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc +@@ -28,7 +28,7 @@ size_t GetUnderestimatedStackSize() { + // FIXME: On Mac OSX and Linux, this method cannot estimate stack size + // correctly for the main thread. + +-#elif defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ ++#elif 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). +@@ -96,7 +96,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/0023-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch b/recipes-qt/qt5/qtwebengine/chromium/0023-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch deleted file mode 100644 index aea690d9..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0023-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch +++ /dev/null @@ -1,79 +0,0 @@ -From fea443adcea6e081cfee94a19c75e7b0516e1bce 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 2e0f06b0c1e..aaafef77d79 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 1c014a65019..2670a827aa5 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/0024-chromium-musl-Do-not-define-__sbrk-on-musl.patch b/recipes-qt/qt5/qtwebengine/chromium/0024-chromium-musl-Do-not-define-__sbrk-on-musl.patch deleted file mode 100644 index cd1059e3..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0024-chromium-musl-Do-not-define-__sbrk-on-musl.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 64e79d346a2038b976f5bafe2b0b2032b1628229 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/0024-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch b/recipes-qt/qt5/qtwebengine/chromium/0024-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch new file mode 100644 index 00000000..786e65d8 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0024-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch @@ -0,0 +1,63 @@ +From 01c128d575571f525a586fa769debf62826db888 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/0025-chromium-musl-Adjust-default-pthread-stack-size.patch b/recipes-qt/qt5/qtwebengine/chromium/0025-chromium-musl-Adjust-default-pthread-stack-size.patch deleted file mode 100644 index 50d17413..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0025-chromium-musl-Adjust-default-pthread-stack-size.patch +++ /dev/null @@ -1,47 +0,0 @@ -From cecdf34d89110115948cfde44c04a43c9925b24a 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 ++- - chromium/third_party/blink/renderer/platform/wtf/stack_util.cc | 2 +- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/chromium/base/threading/platform_thread_linux.cc b/chromium/base/threading/platform_thread_linux.cc -index 74a01ad5af5..dab5773d73b 100644 ---- a/chromium/base/threading/platform_thread_linux.cc -+++ b/chromium/base/threading/platform_thread_linux.cc -@@ -377,7 +377,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 ab1dff4167e..b0763b0bd9a 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. - --#elif defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ -+#elif 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/0025-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch b/recipes-qt/qt5/qtwebengine/chromium/0025-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch new file mode 100644 index 00000000..e4ecf41e --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0025-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch @@ -0,0 +1,56 @@ +From 426b9ef79898e82ee04cfbe7c19746bdfd1c92ac 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/0026-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch b/recipes-qt/qt5/qtwebengine/chromium/0026-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch deleted file mode 100644 index 07a1e3d6..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0026-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch +++ /dev/null @@ -1,63 +0,0 @@ -From ae4187267b4d0d2ff13a6593b69ca06cee321eea 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/0026-chromium-musl-pread-pwrite.patch b/recipes-qt/qt5/qtwebengine/chromium/0026-chromium-musl-pread-pwrite.patch new file mode 100644 index 00000000..1e615637 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0026-chromium-musl-pread-pwrite.patch @@ -0,0 +1,31 @@ +From 1506681955d4f7a70372cb27bf47dddd1ca00954 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 fd8efdffea6..22a8863031c 100644 +--- a/chromium/third_party/lss/linux_syscall_support.h ++++ b/chromium/third_party/lss/linux_syscall_support.h +@@ -1244,6 +1244,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/0027-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch b/recipes-qt/qt5/qtwebengine/chromium/0027-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch deleted file mode 100644 index 63f93873..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0027-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch +++ /dev/null @@ -1,56 +0,0 @@ -From f12f5d2dc91548ca77b296a0be3705aacc9fca33 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/0027-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch b/recipes-qt/qt5/qtwebengine/chromium/0027-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch new file mode 100644 index 00000000..97035dc5 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0027-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch @@ -0,0 +1,45 @@ +From 2e220677883ce371119b9b07b2a90ff6bde1b6d3 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 10 May 2020 08:16:01 -0700 +Subject: [PATCH] chromium: musl: initialize msghdr in a compatible manner + +initialize msghdr in a compatible manner + +msghdr stuct from socket.h is not same between musl and glibc +where musl claims to be more posix compliant where as glibc seems +to fill whats needed for linux sizewise and chooses long enough types +which maybe questionable, therefore constructing a structure with explicit +constructor is not going to work correctly for musl and glibc at same time + +see +https://git.musl-libc.org/cgit/musl/commit/arch/x86_64/bits/socket.h?id=7168790763cdeb794df52be6e3b39fbb021c5a64 + +This fix initialized the struct to 0 first and then sets the struct elements +by name, so we dont have to hard code the positions of elements when initializing +structure + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + chromium/net/socket/udp_socket_posix.cc | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/chromium/net/socket/udp_socket_posix.cc b/chromium/net/socket/udp_socket_posix.cc +index 7df6892d67e..030ff8896e4 100644 +--- a/chromium/net/socket/udp_socket_posix.cc ++++ b/chromium/net/socket/udp_socket_posix.cc +@@ -1199,8 +1199,12 @@ SendResult UDPSocketPosixSender::InternalSendmmsgBuffers( + for (auto& buffer : buffers) + msg_iov->push_back({const_cast(buffer->data()), buffer->length()}); + msgvec->reserve(buffers.size()); +- for (size_t j = 0; j < buffers.size(); j++) +- msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0}); ++ for (size_t j = 0; j < buffers.size(); j++) { ++ struct msghdr m = {0}; ++ m.msg_iov = &msg_iov[j]; ++ m.msg_iovlen = 1; ++ msgvec->push_back({m, 0}); ++ } + int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0)); + SendResult send_result(0, 0, std::move(buffers)); + if (result < 0) { diff --git a/recipes-qt/qt5/qtwebengine/chromium/0028-chromium-musl-pread-pwrite.patch b/recipes-qt/qt5/qtwebengine/chromium/0028-chromium-musl-pread-pwrite.patch deleted file mode 100644 index edeb3272..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0028-chromium-musl-pread-pwrite.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 3269ffba733ed7eeb7c2c36912dd19ca1ef35f8b 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 fd8efdffea6..22a8863031c 100644 ---- a/chromium/third_party/lss/linux_syscall_support.h -+++ b/chromium/third_party/lss/linux_syscall_support.h -@@ -1244,6 +1244,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/0029-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch b/recipes-qt/qt5/qtwebengine/chromium/0029-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch deleted file mode 100644 index 72adf1cb..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0029-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 0b04cbd5b93908bad4dfc6d829048fe90a09b868 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 10 May 2020 08:16:01 -0700 -Subject: [PATCH] chromium: musl: initialize msghdr in a compatible manner - -initialize msghdr in a compatible manner - -msghdr stuct from socket.h is not same between musl and glibc -where musl claims to be more posix compliant where as glibc seems -to fill whats needed for linux sizewise and chooses long enough types -which maybe questionable, therefore constructing a structure with explicit -constructor is not going to work correctly for musl and glibc at same time - -see -https://git.musl-libc.org/cgit/musl/commit/arch/x86_64/bits/socket.h?id=7168790763cdeb794df52be6e3b39fbb021c5a64 - -This fix initialized the struct to 0 first and then sets the struct elements -by name, so we dont have to hard code the positions of elements when initializing -structure - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - chromium/net/socket/udp_socket_posix.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/chromium/net/socket/udp_socket_posix.cc b/chromium/net/socket/udp_socket_posix.cc -index 7df6892d67e..030ff8896e4 100644 ---- a/chromium/net/socket/udp_socket_posix.cc -+++ b/chromium/net/socket/udp_socket_posix.cc -@@ -1199,8 +1199,12 @@ SendResult UDPSocketPosixSender::InternalSendmmsgBuffers( - for (auto& buffer : buffers) - msg_iov->push_back({const_cast(buffer->data()), buffer->length()}); - msgvec->reserve(buffers.size()); -- for (size_t j = 0; j < buffers.size(); j++) -- msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0}); -+ for (size_t j = 0; j < buffers.size(); j++) { -+ struct msghdr m = {0}; -+ m.msg_iov = &msg_iov[j]; -+ m.msg_iovlen = 1; -+ msgvec->push_back({m, 0}); -+ } - int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0)); - SendResult send_result(0, 0, std::move(buffers)); - if (result < 0) { -- cgit v1.2.3 From ecdb62b1e5a83b892d1385179e71093ce22407ba Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 8 Apr 2021 18:43:40 -0700 Subject: qtwebengine: Fix build with GCC 11 Signed-off-by: Khem Raj --- .../chromium/0015-chromium-gcc11-fixes.patch | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0015-chromium-gcc11-fixes.patch (limited to 'recipes-qt/qt5/qtwebengine') diff --git a/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-gcc11-fixes.patch b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-gcc11-fixes.patch new file mode 100644 index 00000000..699a809a --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-gcc11-fixes.patch @@ -0,0 +1,23 @@ +Include header + +gcc11 complains + +../../../../git/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h:256:34: error: no member named 'numeric_limits' in namespace 'std' + PERFETTO_DCHECK(value < std::numeric_limits::max()); + +This is because its missing right header which perhaps is included +implicitly in older compilers + +Upstream-Status: Pending +Signed-off-by: Khem Raj + +--- a/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h ++++ b/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h +@@ -20,6 +20,7 @@ + #include + #include + ++#include + #include + #include + -- cgit v1.2.3 From 047eab9e268e68964731783d7641557dcbb666ea Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Thu, 11 Mar 2021 15:46:17 +0100 Subject: qtwebengine: upgrade to 5.15.4 with chromium-87 Signed-off-by: Martin Jansa --- .../0001-Force-host-toolchain-configuration.patch | 4 +- ...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 | 12 +- ...um-workaround-for-too-long-.rps-file-name.patch | 2 +- .../0002-chromium-fix-build-with-clang.patch | 91 ++++ .../0002-chromium-stack-pointer-clobber.patch | 49 -- ...0003-chromium-Exclude-CRC32-for-32bit-arm.patch | 33 ++ .../0003-chromium-fix-build-with-clang.patch | 91 ---- ...-Do-not-try-to-set-the-guessed-values-for.patch | 41 ++ ...0004-chromium-Exclude-CRC32-for-32bit-arm.patch | 33 -- ...-Do-not-try-to-set-the-guessed-values-for.patch | 41 -- ...um-fix-build-after-y2038-changes-in-glibc.patch | 28 ++ ...x-build-on-32bit-arches-with-64bit-time_t.patch | 47 ++ .../0006-chromium-aarch64-skia-build-fix.patch | 64 --- ...ium-Include-cstddef-for-size_t-definition.patch | 35 ++ ...um-fix-build-after-y2038-changes-in-glibc.patch | 28 -- ...x-build-on-32bit-arches-with-64bit-time_t.patch | 47 -- ...ve-CharAllocator-definition-to-a-header-f.patch | 554 +++++++++++++++++++++ ...ium-Include-cstddef-for-size_t-definition.patch | 35 -- ...09-chromium-Link-v8-with-libatomic-on-x86.patch | 29 ++ ...ve-CharAllocator-definition-to-a-header-f.patch | 554 --------------------- ...omium-icu-use-system-library-only-targets.patch | 88 ++++ ...0011-chromium-Include-cstddef-and-cstdint.patch | 24 - ...sl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch | 33 ++ ...12-chromium-Link-v8-with-libatomic-on-x86.patch | 29 -- ...sl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch | 52 ++ ...omium-icu-use-system-library-only-targets.patch | 88 ---- ...-chromium-musl-include-fcntl.h-for-loff_t.patch | 22 + ...x-sandbox-Aw-snap-for-syscalls-403-and-40.patch | 139 ------ ...sl-use-off64_t-instead-of-the-internal-__.patch | 62 +++ ...ium-musl-linux-glibc-make-the-distinction.patch | 23 + ...sl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch | 33 -- ...sl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch | 52 -- ...sl-Define-res_ninit-and-res_nclose-for-no.patch | 63 +++ ...hromium-musl-Do-not-define-__sbrk-on-musl.patch | 26 + ...-chromium-musl-include-fcntl.h-for-loff_t.patch | 22 - ...um-musl-Adjust-default-pthread-stack-size.patch | 47 ++ ...sl-use-off64_t-instead-of-the-internal-__.patch | 62 --- ...sl-elf_reader.cc-include-sys-reg.h-to-get.patch | 52 ++ ...ium-musl-linux-glibc-make-the-distinction.patch | 23 - ...sl-allocator-Do-not-include-glibc_weak_sy.patch | 24 - .../chromium/0020-chromium-musl-pread-pwrite.patch | 32 ++ ...sl-Define-res_ninit-and-res_nclose-for-no.patch | 79 --- ...sl-initialize-msghdr-in-a-compatible-mann.patch | 45 ++ ...hromium-musl-Do-not-define-__sbrk-on-musl.patch | 26 - ...um-musl-Adjust-default-pthread-stack-size.patch | 47 -- ...sl-Use-_fpstate-instead-of-_libc_fpstate-.patch | 63 --- ...sl-elf_reader.cc-include-sys-reg.h-to-get.patch | 56 --- .../chromium/0026-chromium-musl-pread-pwrite.patch | 31 -- ...sl-initialize-msghdr-in-a-compatible-mann.patch | 45 -- 51 files changed, 1415 insertions(+), 1797 deletions(-) create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0002-chromium-fix-build-with-clang.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0002-chromium-stack-pointer-clobber.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0003-chromium-Exclude-CRC32-for-32bit-arm.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0003-chromium-fix-build-with-clang.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Do-not-try-to-set-the-guessed-values-for.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Exclude-CRC32-for-32bit-arm.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0005-chromium-fix-build-after-y2038-changes-in-glibc.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0006-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0006-chromium-aarch64-skia-build-fix.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0007-chromium-Include-cstddef-for-size_t-definition.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0007-chromium-fix-build-after-y2038-changes-in-glibc.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0008-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0008-chromium-Move-CharAllocator-definition-to-a-header-f.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Include-cstddef-for-size_t-definition.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Link-v8-with-libatomic-on-x86.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0010-chromium-Move-CharAllocator-definition-to-a-header-f.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0010-chromium-icu-use-system-library-only-targets.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.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/0012-chromium-Link-v8-with-libatomic-on-x86.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/0013-chromium-icu-use-system-library-only-targets.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-Fix-sandbox-Aw-snap-for-syscalls-403-and-40.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-use-off64_t-instead-of-the-internal-__.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/0015-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Do-not-define-__sbrk-on-musl.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-include-fcntl.h-for-loff_t.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Adjust-default-pthread-stack-size.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-use-off64_t-instead-of-the-internal-__.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-linux-glibc-make-the-distinction.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-pread-pwrite.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-Do-not-define-__sbrk-on-musl.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0023-chromium-musl-Adjust-default-pthread-stack-size.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0024-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0025-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0026-chromium-musl-pread-pwrite.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0027-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch (limited to 'recipes-qt/qt5/qtwebengine') 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 d1a73717..be24bc51 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 efcb303585f8ebae43767ab284d1e808d44d290f Mon Sep 17 00:00:00 2001 +From 083cc8263e38640dc4da53796c4c3665e5b2444c 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 56c18bdb..ea6142a6 100644 +index 7507d51e..1e078cbf 100644 --- a/src/buildtools/config/linux.pri +++ b/src/buildtools/config/linux.pri @@ -118,7 +118,7 @@ contains(QT_ARCH, "mips") { 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 2fbe73f7..a7c8f79f 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 4d816d872fbb635ac5a6d263218634b7027fa0f9 Mon Sep 17 00:00:00 2001 +From e45b77542978de101d3a3e9d644bfcaccea6982d 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 e2ed63cb..fc5a39a0 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 5ff62acfe5882c39dcd9154dbb9bd631b10c20ab Mon Sep 17 00:00:00 2001 +From b00c5048b99a87665491d932dc05a2723a604edb 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 3b439e81..b1669e19 100644 +index 520b452f..d2b29b29 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro @@ -5,7 +5,7 @@ include($${QTWEBENGINE_ROOT}/src/buildtools/config/linking.pri) 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 6569ced8..c2eac846 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,4 +1,4 @@ -From b52d58e204ffcb3dcd55ddee390d256cfbb1b54b Mon Sep 17 00:00:00 2001 +From a4099f31e1850c81a27ae3572b00705431b05254 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 @@ -10,10 +10,10 @@ Signed-off-by: Khem Raj 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri -index e192f877..49ad4bf3 100644 +index e7f869a1..f9c9c24b 100644 --- a/src/buildtools/config/support.pri +++ b/src/buildtools/config/support.pri -@@ -181,10 +181,6 @@ defineTest(qtwebengine_checkForHostPkgCfg) { +@@ -191,10 +191,6 @@ defineTest(qtwebengine_checkForHostPkgCfg) { defineTest(qtwebengine_checkForGlibc) { module = $$1 @@ -25,10 +25,10 @@ index e192f877..49ad4bf3 100644 } diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json -index 1ca6214a..b352e675 100644 +index 812a91f9..a7c3d972 100644 --- a/src/buildtools/configure.json +++ b/src/buildtools/configure.json -@@ -376,7 +376,6 @@ +@@ -373,7 +373,6 @@ && (!config.sanitizer || features.webengine-sanitizer) && (!config.linux || features.pkg-config) && (!config.linux || features.webengine-host-pkg-config) @@ -36,7 +36,7 @@ index 1ca6214a..b352e675 100644 && (!config.linux || features.webengine-system-khr) && (!config.linux || features.webengine-system-nss) && (!config.linux || features.webengine-system-dbus) -@@ -743,8 +742,7 @@ +@@ -770,8 +769,7 @@ "webengine-system-fontconfig", "webengine-system-dbus", "webengine-system-nss", 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 a783a1e7..1df41114 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 0e5ecca67b6a9fb71bb200af534f22cb820ac652 Mon Sep 17 00:00:00 2001 +From 6c4a4b7c3dbfb1fc851522a67e1bcb7862b91184 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-fix-build-with-clang.patch b/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-fix-build-with-clang.patch new file mode 100644 index 00000000..75dad974 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-fix-build-with-clang.patch @@ -0,0 +1,91 @@ +From 35cd9c8391865012644038b1af425ac7e2ae1828 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 + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + chromium/build/config/compiler/BUILD.gn | 27 ++----------------------- + 1 file changed, 2 insertions(+), 25 deletions(-) + +diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn +index 6a58d21cf07..c007eab8ec9 100644 +--- a/chromium/build/config/compiler/BUILD.gn ++++ b/chromium/build/config/compiler/BUILD.gn +@@ -782,8 +782,6 @@ config("compiler_cpu_abi") { + } + } else if (current_cpu == "arm") { + if (is_clang && !is_android && !is_nacl) { +- cflags += [ "--target=arm-linux-gnueabihf" ] +- ldflags += [ "--target=arm-linux-gnueabihf" ] + } + if (!is_nacl) { + cflags += [ +@@ -796,8 +794,6 @@ config("compiler_cpu_abi") { + } + } else if (current_cpu == "arm64") { + if (is_clang && !is_android && !is_nacl && !is_fuchsia) { +- cflags += [ "--target=aarch64-linux-gnu" ] +- ldflags += [ "--target=aarch64-linux-gnu" ] + } + } else if (current_cpu == "mipsel" && !is_nacl) { + ldflags += [ "-Wl,--hash-style=sysv" ] +@@ -806,9 +802,6 @@ config("compiler_cpu_abi") { + if (is_android) { + cflags += [ "--target=mipsel-linux-android" ] + ldflags += [ "--target=mipsel-linux-android" ] +- } else { +- cflags += [ "--target=mipsel-linux-gnu" ] +- ldflags += [ "--target=mipsel-linux-gnu" ] + } + } else { + cflags += [ "-EL" ] +@@ -887,10 +880,7 @@ config("compiler_cpu_abi") { + } else if (current_cpu == "mips" && !is_nacl) { + ldflags += [ "-Wl,--hash-style=sysv" ] + if (custom_toolchain == "") { +- if (is_clang) { +- cflags += [ "--target=mips-linux-gnu" ] +- ldflags += [ "--target=mips-linux-gnu" ] +- } else { ++ if (!is_clang) { + cflags += [ "-EB" ] + ldflags += [ "-EB" ] + } +@@ -937,9 +927,6 @@ config("compiler_cpu_abi") { + if (is_android) { + cflags += [ "--target=mips64el-linux-android" ] + ldflags += [ "--target=mips64el-linux-android" ] +- } else { +- cflags += [ "--target=mips64el-linux-gnuabi64" ] +- ldflags += [ "--target=mips64el-linux-gnuabi64" ] + } + } else { + cflags += [ +@@ -996,10 +983,7 @@ config("compiler_cpu_abi") { + } else if (current_cpu == "mips64") { + ldflags += [ "-Wl,--hash-style=sysv" ] + if (custom_toolchain == "") { +- if (is_clang) { +- cflags += [ "--target=mips64-linux-gnuabi64" ] +- ldflags += [ "--target=mips64-linux-gnuabi64" ] +- } else { ++ if (!is_clang) { + cflags += [ + "-EB", + "-mabi=64", +@@ -1166,13 +1150,6 @@ config("compiler_deterministic") { + } + } + } +- +- # Tells the compiler not to use absolute paths when passing the default +- # paths to the tools it invokes. We don't want this because we don't +- # really need it and it can mess up the goma cache entries. +- if (is_clang && !is_nacl && !(use_qt && use_libcxx)) { +- cflags += [ "-no-canonical-prefixes" ] +- } + } + + config("clang_revision") { 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 deleted file mode 100644 index 0b14cf81..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-stack-pointer-clobber.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 1af3e18800c3be5c4fbe1aa96fc1a0c454d89817 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 - -Do not add stack pointer to clobber list - -it was being ignored until gcc 9.0 became capable -of flagging this silent ignoring via [1] - -[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813 - -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 | 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 d2baee9d243..fd8efdffea6 100644 ---- a/chromium/third_party/lss/linux_syscall_support.h -+++ b/chromium/third_party/lss/linux_syscall_support.h -@@ -2017,7 +2017,7 @@ struct kernel_statfs { - : "i" (__NR_##name), "ri" ((long)(arg1)), \ - "c" ((long)(arg2)), "d" ((long)(arg3)), \ - "S" ((long)(arg4)), "D" ((long)(arg5)) \ -- : "esp", "memory"); \ -+ : "memory"); \ - LSS_RETURN(type,__res); \ - } - #undef _syscall6 -@@ -2039,7 +2039,7 @@ struct kernel_statfs { - : "i" (__NR_##name), "0" ((long)(&__s)), \ - "c" ((long)(arg2)), "d" ((long)(arg3)), \ - "S" ((long)(arg4)), "D" ((long)(arg5)) \ -- : "esp", "memory"); \ -+ : "memory"); \ - LSS_RETURN(type,__res); \ - } - LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, -@@ -2125,7 +2125,7 @@ struct kernel_statfs { - : "0"(-EINVAL), "i"(__NR_clone), - "m"(fn), "m"(child_stack), "m"(flags), "m"(arg), - "m"(parent_tidptr), "m"(newtls), "m"(child_tidptr) -- : "esp", "memory", "ecx", "edx", "esi", "edi"); -+ : "memory", "ecx", "edx", "esi", "edi"); - LSS_RETURN(int, __res); - } - diff --git a/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-Exclude-CRC32-for-32bit-arm.patch b/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-Exclude-CRC32-for-32bit-arm.patch new file mode 100644 index 00000000..2f22f282 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-Exclude-CRC32-for-32bit-arm.patch @@ -0,0 +1,33 @@ +From 2fed766cdca44dc67a508b26ea66feab47eb49fd 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 + +This fixes build issues during cross compiling for linux using clang + +Fixes +src/3rdparty/chromium/third_party/zlib/crc32_simd.c:184: undefined reference to `__crc32d' + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + chromium/third_party/zlib/BUILD.gn | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/chromium/third_party/zlib/BUILD.gn b/chromium/third_party/zlib/BUILD.gn +index 891c2c34bfb..5ab519bd133 100644 +--- a/chromium/third_party/zlib/BUILD.gn ++++ b/chromium/third_party/zlib/BUILD.gn +@@ -115,8 +115,11 @@ if (use_arm_neon_optimizations) { + # Disabled for iPhone, as described in DDI0487C_a_armv8_arm: + # "All implementations of the ARMv8.1 architecture are required to + # implement the CRC32* instructions. These are optional in ARMv8.0." ++ defines = [] + if (!is_ios) { +- defines = [ "CRC32_ARMV8_CRC32" ] ++ if (current_cpu == "arm64") { ++ defines += [ "CRC32_ARMV8_CRC32" ] ++ } + if (is_android) { + defines += [ "ARMV8_OS_ANDROID" ] + } else if (is_linux || is_chromeos) { diff --git a/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 deleted file mode 100644 index 659f938a..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-fix-build-with-clang.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 52bcf1b214cd39139fdd547fef514acaf19bd3f8 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 - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - chromium/build/config/compiler/BUILD.gn | 27 ++----------------------- - 1 file changed, 2 insertions(+), 25 deletions(-) - -diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn -index ca81bd8ce0f..d3c588b21e3 100644 ---- a/chromium/build/config/compiler/BUILD.gn -+++ b/chromium/build/config/compiler/BUILD.gn -@@ -776,8 +776,6 @@ config("compiler_cpu_abi") { - } - } else if (current_cpu == "arm") { - if (is_clang && !is_android && !is_nacl) { -- cflags += [ "--target=arm-linux-gnueabihf" ] -- ldflags += [ "--target=arm-linux-gnueabihf" ] - } - if (!is_nacl) { - cflags += [ -@@ -790,8 +788,6 @@ config("compiler_cpu_abi") { - } - } else if (current_cpu == "arm64") { - if (is_clang && !is_android && !is_nacl && !is_fuchsia) { -- cflags += [ "--target=aarch64-linux-gnu" ] -- ldflags += [ "--target=aarch64-linux-gnu" ] - } - } else if (current_cpu == "mipsel" && !is_nacl) { - ldflags += [ "-Wl,--hash-style=sysv" ] -@@ -800,9 +796,6 @@ config("compiler_cpu_abi") { - if (is_android) { - cflags += [ "--target=mipsel-linux-android" ] - ldflags += [ "--target=mipsel-linux-android" ] -- } else { -- cflags += [ "--target=mipsel-linux-gnu" ] -- ldflags += [ "--target=mipsel-linux-gnu" ] - } - } else { - cflags += [ "-EL" ] -@@ -881,10 +874,7 @@ config("compiler_cpu_abi") { - } else if (current_cpu == "mips" && !is_nacl) { - ldflags += [ "-Wl,--hash-style=sysv" ] - if (custom_toolchain == "") { -- if (is_clang) { -- cflags += [ "--target=mips-linux-gnu" ] -- ldflags += [ "--target=mips-linux-gnu" ] -- } else { -+ if (!is_clang) { - cflags += [ "-EB" ] - ldflags += [ "-EB" ] - } -@@ -931,9 +921,6 @@ config("compiler_cpu_abi") { - if (is_android) { - cflags += [ "--target=mips64el-linux-android" ] - ldflags += [ "--target=mips64el-linux-android" ] -- } else { -- cflags += [ "--target=mips64el-linux-gnuabi64" ] -- ldflags += [ "--target=mips64el-linux-gnuabi64" ] - } - } else { - cflags += [ -@@ -990,10 +977,7 @@ config("compiler_cpu_abi") { - } else if (current_cpu == "mips64") { - ldflags += [ "-Wl,--hash-style=sysv" ] - if (custom_toolchain == "") { -- if (is_clang) { -- cflags += [ "--target=mips64-linux-gnuabi64" ] -- ldflags += [ "--target=mips64-linux-gnuabi64" ] -- } else { -+ if (!is_clang) { - cflags += [ - "-EB", - "-mabi=64", -@@ -1157,13 +1141,6 @@ config("compiler_deterministic") { - } - } - } -- -- # Tells the compiler not to use absolute paths when passing the default -- # paths to the tools it invokes. We don't want this because we don't -- # really need it and it can mess up the goma cache entries. -- if (is_clang && !is_nacl && !(use_qt && use_libcxx)) { -- cflags += [ "-no-canonical-prefixes" ] -- } - } - - config("clang_revision") { diff --git a/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Do-not-try-to-set-the-guessed-values-for.patch b/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Do-not-try-to-set-the-guessed-values-for.patch new file mode 100644 index 00000000..92e16f40 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Do-not-try-to-set-the-guessed-values-for.patch @@ -0,0 +1,41 @@ +From 6c43c38e14a889950f1401d484fe16594cac2c22 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 + + march/mtune/float-abi OE config machinary has computed these values already + and fed it via compiler cmdline to chromium build + +I think upstream should check for the values on compiler cmdline +before overriding these + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj +Signed-off-by: Johannes Pointner + +%% original patch: 0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch +--- + chromium/build/config/compiler/BUILD.gn | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn +index c007eab8ec9..feb4340f522 100644 +--- a/chromium/build/config/compiler/BUILD.gn ++++ b/chromium/build/config/compiler/BUILD.gn +@@ -783,15 +783,6 @@ config("compiler_cpu_abi") { + } else if (current_cpu == "arm") { + if (is_clang && !is_android && !is_nacl) { + } +- if (!is_nacl) { +- cflags += [ +- "-march=$arm_arch", +- "-mfloat-abi=$arm_float_abi", +- ] +- } +- if (arm_tune != "") { +- cflags += [ "-mtune=$arm_tune" ] +- } + } else if (current_cpu == "arm64") { + if (is_clang && !is_android && !is_nacl && !is_fuchsia) { + } diff --git a/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 deleted file mode 100644 index f79c07a5..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Exclude-CRC32-for-32bit-arm.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 1572f98f6be6ac77a45dfd5442b2f6ba1a03e360 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 - -This fixes build issues during cross compiling for linux using clang - -Fixes -src/3rdparty/chromium/third_party/zlib/crc32_simd.c:184: undefined reference to `__crc32d' - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - chromium/third_party/zlib/BUILD.gn | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/chromium/third_party/zlib/BUILD.gn b/chromium/third_party/zlib/BUILD.gn -index fb2a35e87f2..6cca80181ed 100644 ---- a/chromium/third_party/zlib/BUILD.gn -+++ b/chromium/third_party/zlib/BUILD.gn -@@ -89,8 +89,11 @@ if (use_arm_neon_optimizations) { - # Disabled for iPhone, as described in DDI0487C_a_armv8_arm: - # "All implementations of the ARMv8.1 architecture are required to - # implement the CRC32* instructions. These are optional in ARMv8.0." -+ defines = [] - if (!is_ios) { -- defines = [ "CRC32_ARMV8_CRC32" ] -+ if (current_cpu == "arm64") { -+ defines += [ "CRC32_ARMV8_CRC32" ] -+ } - if (is_android) { - defines += [ "ARMV8_OS_ANDROID" ] - } else if (is_linux || is_chromeos) { diff --git a/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for.patch b/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for.patch deleted file mode 100644 index 37442d0a..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 4e0bc86764ac1e324c50e698b47c630efab07632 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 - - march/mtune/float-abi OE config machinary has computed these values already - and fed it via compiler cmdline to chromium build - -I think upstream should check for the values on compiler cmdline -before overriding these - -Upstream-Status: Inappropriate [OE-Specific] - -Signed-off-by: Khem Raj -Signed-off-by: Johannes Pointner - -%% original patch: 0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch ---- - chromium/build/config/compiler/BUILD.gn | 9 --------- - 1 file changed, 9 deletions(-) - -diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn -index d3c588b21e3..6d49fde33cc 100644 ---- a/chromium/build/config/compiler/BUILD.gn -+++ b/chromium/build/config/compiler/BUILD.gn -@@ -777,15 +777,6 @@ config("compiler_cpu_abi") { - } else if (current_cpu == "arm") { - if (is_clang && !is_android && !is_nacl) { - } -- if (!is_nacl) { -- cflags += [ -- "-march=$arm_arch", -- "-mfloat-abi=$arm_float_abi", -- ] -- } -- if (arm_tune != "") { -- cflags += [ "-mtune=$arm_tune" ] -- } - } else if (current_cpu == "arm64") { - if (is_clang && !is_android && !is_nacl && !is_fuchsia) { - } diff --git a/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-fix-build-after-y2038-changes-in-glibc.patch b/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-fix-build-after-y2038-changes-in-glibc.patch new file mode 100644 index 00000000..f8e7d4ba --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-fix-build-after-y2038-changes-in-glibc.patch @@ -0,0 +1,28 @@ +From b2521c339d944c1f5333ccc258cbae2fd8b741a2 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 + +SIOCGSTAMP is defined in linux/sockios.h since kernel 5.2. Include that +file wherever needed. + +Signed-off-by: Jiri Slaby +Signed-off-by: Martin Jansa + +Upstream-Status: Pending +--- + chromium/third_party/webrtc/rtc_base/physical_socket_server.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc b/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc +index cf6e7927951..e5df6f9d92c 100644 +--- a/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc ++++ b/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc +@@ -70,6 +70,7 @@ typedef void* SockOptArg; + #endif // WEBRTC_POSIX + + #if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__) ++#include + + int64_t GetSocketRecvTimestamp(int socket) { + struct timeval tv_ioctl; diff --git a/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch new file mode 100644 index 00000000..6677a03a --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch @@ -0,0 +1,47 @@ +From 5fc06ad92eaeb20e3b0afbc47a2436bf9038d942 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.h | 5 +++++ + chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc | 3 +-- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/chromium/ui/events/ozone/evdev/event_converter_evdev.h b/chromium/ui/events/ozone/evdev/event_converter_evdev.h +index 2d184811a00..fb2ba0069f1 100644 +--- a/chromium/ui/events/ozone/evdev/event_converter_evdev.h ++++ b/chromium/ui/events/ozone/evdev/event_converter_evdev.h +@@ -20,6 +20,11 @@ + #include "ui/events/ozone/evdev/event_dispatch_callback.h" + #include "ui/gfx/geometry/size.h" + ++#ifndef input_event_sec ++#define input_event_sec time.tv_sec ++#define input_event_usec time.tv_usec ++#endif ++ + struct input_event; + + namespace ui { +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 b8d089f7381..5d2d08b1ec6 100644 +--- a/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc ++++ b/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc +@@ -62,8 +62,7 @@ void TouchEventLogEvdev::DumpLog(const char* filename) { + continue; + std::string event_string = base::StringPrintf( + "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); ++ 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/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 deleted file mode 100644 index 5da3c36f..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-aarch64-skia-build-fix.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 2eab9281d34bf53fd5a4b58184f9e165e27f9eaf 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 - -Upstream-Status: Inappropriate - -GCC (tested rocko's 7.3.0) cannot find these intrinsics and the build fails: - -../../third_party/skia/src/opts/SkRasterPipeline_opts.h: In function 'neon::F neon::from_half(neon::U16)': -../../third_party/skia/src/opts/SkRasterPipeline_opts.h:657:26: error: cannot convert 'neon::U16 {aka short unsigned int}' to 'float16x4_ t {aka __vector(4) __ fp16}' for argument '1' to ' -float32x4_t vcvt_f32_f16(float16x4_t)' - return vcvt_f32_f16(h); - ^ -../../third_party/skia/src/opts/SkRasterPipeline_opts.h: In function 'neon::U16 neon::to_half(neon::F)': -../../third_party/skia/src/opts/SkRasterPipeline_opts.h:677:26: error: cannot convert 'neon::F {aka float}' to 'float32x4_t {aka __vector (4) float}' for argum ent '1' to 'float16x4_t vcvt -_f16_f32(float32x4_t)' - return vcvt_f16_f32(f); - ^ - -Upstream seems to have had similar issues according to -https://skia-review.googlesource.com/c/skia/+/84222, but there is no fix at the -moment. - -Signed-off-by: Raphael Kubo da Costa ---- - .../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 831f5b3bb03..bb9377c3641 100644 ---- a/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h -+++ b/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h -@@ -986,13 +986,7 @@ SI F approx_powf(F x, F y) { - } - - SI F from_half(U16 h) { --#if defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) \ -- && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds. -- __fp16 fp16; -- memcpy(&fp16, &h, sizeof(U16)); -- return float(fp16); -- --#elif defined(JUMPER_IS_HSW) || defined(JUMPER_IS_AVX512) -+#if defined(JUMPER_IS_HSW) || defined(JUMPER_IS_AVX512) - return _mm256_cvtph_ps(h); - - #else -@@ -1009,14 +1003,7 @@ SI F from_half(U16 h) { - } - - SI U16 to_half(F f) { --#if defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) \ -- && !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds. -- __fp16 fp16 = __fp16(f); -- U16 u16; -- memcpy(&u16, &fp16, sizeof(U16)); -- return u16; -- --#elif defined(JUMPER_IS_HSW) || defined(JUMPER_IS_AVX512) -+#if defined(JUMPER_IS_HSW) || defined(JUMPER_IS_AVX512) - return _mm256_cvtps_ph(f, _MM_FROUND_CUR_DIRECTION); - - #else diff --git a/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-Include-cstddef-for-size_t-definition.patch b/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-Include-cstddef-for-size_t-definition.patch new file mode 100644 index 00000000..064bb576 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-Include-cstddef-for-size_t-definition.patch @@ -0,0 +1,35 @@ +From 3ed9af348ff76523e5aa16317a354b47dcae1766 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 +--- + .../third_party/webrtc/modules/video_coding/decoding_state.h | 1 + + 1 file changed, 1 insertion(+) + +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 ec972949d89..2a76775cfb6 100644 +--- a/chromium/third_party/webrtc/modules/video_coding/decoding_state.h ++++ b/chromium/third_party/webrtc/modules/video_coding/decoding_state.h +@@ -15,6 +15,7 @@ + #include + #include + #include ++#include + + namespace webrtc { + 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 deleted file mode 100644 index 0dacc25f..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-fix-build-after-y2038-changes-in-glibc.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 3be4bd9030c774e5e06abd5e74f9f5465510b2db 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 - -SIOCGSTAMP is defined in linux/sockios.h since kernel 5.2. Include that -file wherever needed. - -Signed-off-by: Jiri Slaby -Signed-off-by: Martin Jansa - -Upstream-Status: Pending ---- - chromium/third_party/webrtc/rtc_base/physical_socket_server.cc | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc b/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc -index 0cbcb8130c6..bc3dd3bddda 100644 ---- a/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc -+++ b/chromium/third_party/webrtc/rtc_base/physical_socket_server.cc -@@ -71,6 +71,7 @@ typedef void* SockOptArg; - #endif // WEBRTC_POSIX - - #if defined(WEBRTC_POSIX) && !defined(WEBRTC_MAC) && !defined(__native_client__) -+#include - - int64_t GetSocketRecvTimestamp(int socket) { - struct timeval tv_ioctl; 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 deleted file mode 100644 index b7c9f1b1..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch +++ /dev/null @@ -1,47 +0,0 @@ -From e61af5f5bc6a14a3e77373eee1055cd15c54797f 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.h | 5 +++++ - chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc | 3 +-- - 2 files changed, 6 insertions(+), 2 deletions(-) - -diff --git a/chromium/ui/events/ozone/evdev/event_converter_evdev.h b/chromium/ui/events/ozone/evdev/event_converter_evdev.h -index 717410f2ebc..a4cd55ca20e 100644 ---- a/chromium/ui/events/ozone/evdev/event_converter_evdev.h -+++ b/chromium/ui/events/ozone/evdev/event_converter_evdev.h -@@ -20,6 +20,11 @@ - #include "ui/events/ozone/evdev/event_dispatch_callback.h" - #include "ui/gfx/geometry/size.h" - -+#ifndef input_event_sec -+#define input_event_sec time.tv_sec -+#define input_event_usec time.tv_usec -+#endif -+ - struct input_event; - - namespace ui { -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 01e49b7bbfd..4fccfd62f84 100644 ---- a/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc -+++ b/chromium/ui/events/ozone/evdev/touch_evdev_debug_buffer.cc -@@ -63,8 +63,7 @@ void TouchEventLogEvdev::DumpLog(const char* filename) { - continue; - std::string event_string = base::StringPrintf( - "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); -+ 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/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-Move-CharAllocator-definition-to-a-header-f.patch b/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-Move-CharAllocator-definition-to-a-header-f.patch new file mode 100644 index 00000000..2ee2cce0 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-Move-CharAllocator-definition-to-a-header-f.patch @@ -0,0 +1,554 @@ +From 159ee1528e0870555bf1bac8f24795d84c223a56 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 7b594b4a458..9dae1c360c4 100644 +--- a/chromium/cc/base/list_container_helper.cc ++++ b/chromium/cc/base/list_container_helper.cc +@@ -13,259 +13,8 @@ + #include "base/check_op.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/0009-chromium-Include-cstddef-for-size_t-definition.patch b/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Include-cstddef-for-size_t-definition.patch deleted file mode 100644 index 78dbba17..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Include-cstddef-for-size_t-definition.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 533788149c8b24d7da2702866594cd7a44c8f571 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 ---- - .../third_party/webrtc/modules/video_coding/decoding_state.h | 1 + - 1 file changed, 1 insertion(+) - -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 ec972949d89..2a76775cfb6 100644 ---- a/chromium/third_party/webrtc/modules/video_coding/decoding_state.h -+++ b/chromium/third_party/webrtc/modules/video_coding/decoding_state.h -@@ -15,6 +15,7 @@ - #include - #include - #include -+#include - - namespace webrtc { - diff --git a/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Link-v8-with-libatomic-on-x86.patch b/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Link-v8-with-libatomic-on-x86.patch new file mode 100644 index 00000000..3abfb814 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Link-v8-with-libatomic-on-x86.patch @@ -0,0 +1,29 @@ +From 496d125361f53ef9b3e4e92bdcfa19aec57c0007 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 1 Feb 2020 12:17:23 -0800 +Subject: [PATCH] chromium: Link v8 with libatomic on x86 + +Fixes +| v8_base_without_compiler_jumbo_47.cc:(.text._ZN2v88internal4wasm12_GLOBAL__N_123ExecuteCompilationUnitsERKSt10shared_ptrINS2_22BackgroundCompileTokenEEPNS0_8CountersEiNS2_19CompileBaselineOnlyE+0x29a): undefined reference to `__atomic_l +oad' + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + chromium/v8/BUILD.gn | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/chromium/v8/BUILD.gn b/chromium/v8/BUILD.gn +index ba99c75140b..33cf943bcba 100644 +--- a/chromium/v8/BUILD.gn ++++ b/chromium/v8/BUILD.gn +@@ -3862,7 +3862,8 @@ v8_source_set("v8_base_without_compiler") { + if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel" || + v8_current_cpu == "mips64" || v8_current_cpu == "mips64el" || + v8_current_cpu == "ppc" || v8_current_cpu == "ppc64" || +- v8_current_cpu == "s390" || v8_current_cpu == "s390x") { ++ v8_current_cpu == "s390" || v8_current_cpu == "s390x" || ++ v8_current_cpu == "x86") { + libs += [ "atomic" ] + } + 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 deleted file mode 100644 index d018397e..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-Move-CharAllocator-definition-to-a-header-f.patch +++ /dev/null @@ -1,554 +0,0 @@ -From ec96f37700a45c317027ad917a835e1eac2169fc 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-icu-use-system-library-only-targets.patch b/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-icu-use-system-library-only-targets.patch new file mode 100644 index 00000000..355ff4fa --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-icu-use-system-library-only-targets.patch @@ -0,0 +1,88 @@ +From acdb51541e4eb73177b28c79d395d8d6964ed161 Mon Sep 17 00:00:00 2001 +From: Andrej Valek +Date: Fri, 17 Apr 2020 09:43:32 +0200 +Subject: [PATCH] chromium: icu: use system library only targets + + - use bundled one for native/v8 internal builds + +Complete system ICU library using requires ICU dev package +be installed on host. Enabling dependency on native package +is not enough due to V8 hosttools toolchain. V8 toolchain +is not using native sysroot, only a host packages. +On the other hand webenegine does not produce external +native artifacts. So external system ICU linking is not +needed. + +Signed-off-by: Andrej Valek +Signed-off-by: Martin Jansa +--- + chromium/third_party/icu/BUILD.gn | 18 ++++++++++++++---- + 1 file changed, 14 insertions(+), 4 deletions(-) + +diff --git a/chromium/third_party/icu/BUILD.gn b/chromium/third_party/icu/BUILD.gn +index 2430d3e48e5..5d00226667d 100644 +--- a/chromium/third_party/icu/BUILD.gn ++++ b/chromium/third_party/icu/BUILD.gn +@@ -8,9 +8,13 @@ import("//build/config/linux/pkg_config.gni") + import("//build/shim_headers.gni") + import("//third_party/icu/config.gni") + import("//third_party/icu/sources.gni") ++import("//v8/gni/snapshot_toolchain.gni") + + declare_args() { + use_system_icu = false ++ ++ # Use only target icu library, when system using is enabled ++ use_system_icu_target_only = false + } + + if (is_android) { +@@ -24,6 +28,12 @@ if (is_mac && !icu_is_in_fuchsia) { + assert(!icu_disable_thin_archive || !is_component_build, + "icu_disable_thin_archive only works in static library builds") + ++if (use_system_icu) { ++ # Use system library only for target, otherwise use bundled ++ if ((current_toolchain != host_toolchain) && (current_toolchain != v8_snapshot_toolchain)) { ++ use_system_icu_target_only = true ++ } ++} + # Meta target that includes both icuuc and icui18n. Most targets want both. + # You can depend on the individually if you need to. + group("icu") { +@@ -413,7 +423,7 @@ config("system_icu_config") { + } + } + +-if (use_system_icu) { ++if (use_system_icu_target_only) { + pkg_config("system_icui18n") { + packages = [ "icu-i18n" ] + } +@@ -626,7 +636,7 @@ shim_headers("icuuc_shim") { + } + + config("icu_config") { +- if (use_system_icu) { ++ if (use_system_icu_target_only) { + configs = [ ":system_icu_config"] + } else { + configs = [ ":bundled_icu_config"] +@@ -634,7 +644,7 @@ config("icu_config") { + } + + group("icuuc") { +- if (use_system_icu) { ++ if (use_system_icu_target_only) { + deps = [ ":icuuc_shim" ] + public_configs = [ + ":system_icu_config", +@@ -646,7 +656,7 @@ group("icuuc") { + } + + group("icui18n") { +- if (use_system_icu) { ++ if (use_system_icu_target_only) { + deps = [ ":icui18n_shim" ] + public_configs = [ + ":system_icu_config", diff --git a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.patch b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.patch deleted file mode 100644 index a8f3feb9..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-Include-cstddef-and-cstdint.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 93a8a2a4c33ffece095ab3438eb3c7a4f60ead34 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 15 Jan 2020 16:53:46 -0800 -Subject: [PATCH] chromium: Include and - -These headers are needed for uintXX_t and size_t definitions - -Signed-off-by: Khem Raj ---- - chromium/third_party/webrtc/call/rtx_receive_stream.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/chromium/third_party/webrtc/call/rtx_receive_stream.h b/chromium/third_party/webrtc/call/rtx_receive_stream.h -index 66cc46dc091..e8cadb2bb80 100644 ---- a/chromium/third_party/webrtc/call/rtx_receive_stream.h -+++ b/chromium/third_party/webrtc/call/rtx_receive_stream.h -@@ -11,6 +11,7 @@ - #ifndef CALL_RTX_RECEIVE_STREAM_H_ - #define CALL_RTX_RECEIVE_STREAM_H_ - -+#include - #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..9acb43ab --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch @@ -0,0 +1,33 @@ +From a4e658527d513366e614c188f0572b4f32c385d1 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 5fdb4817af8..e5b9431daa0 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/0012-chromium-Link-v8-with-libatomic-on-x86.patch b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch deleted file mode 100644 index 1ce09e34..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-Link-v8-with-libatomic-on-x86.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 15e16b5f8405a402b94bd1be48d1eabff474795f Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 1 Feb 2020 12:17:23 -0800 -Subject: [PATCH] chromium: Link v8 with libatomic on x86 - -Fixes -| v8_base_without_compiler_jumbo_47.cc:(.text._ZN2v88internal4wasm12_GLOBAL__N_123ExecuteCompilationUnitsERKSt10shared_ptrINS2_22BackgroundCompileTokenEEPNS0_8CountersEiNS2_19CompileBaselineOnlyE+0x29a): undefined reference to `__atomic_l -oad' - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - chromium/v8/BUILD.gn | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/chromium/v8/BUILD.gn b/chromium/v8/BUILD.gn -index ab20142de9a..4ef4aa80cc0 100644 ---- a/chromium/v8/BUILD.gn -+++ b/chromium/v8/BUILD.gn -@@ -3543,7 +3543,8 @@ v8_source_set("v8_base_without_compiler") { - if (v8_current_cpu == "mips" || v8_current_cpu == "mipsel" || - v8_current_cpu == "mips64" || v8_current_cpu == "mips64el" || - v8_current_cpu == "ppc" || v8_current_cpu == "ppc64" || -- v8_current_cpu == "s390" || v8_current_cpu == "s390x") { -+ v8_current_cpu == "s390" || v8_current_cpu == "s390x" || -+ v8_current_cpu == "x86") { - libs += [ "atomic" ] - } - 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..dbb4e4df --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch @@ -0,0 +1,52 @@ +From 4ad1b69cbb61baba2d8796d721b2009c33c00640 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 9d12c427bb3..900ab13519f 100644 +--- a/chromium/base/process/process_metrics_posix.cc ++++ b/chromium/base/process/process_metrics_posix.cc +@@ -119,14 +119,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_CHROMEOS) || defined(OS_ANDROID) ++#elif defined(__GLIBC__) || defined(OS_CHROMEOS) || defined(OS_ANDROID) + struct mallinfo minfo = mallinfo(); + #if BUILDFLAG(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 c327f486596..90129e851e8 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_) +@@ -170,6 +171,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/0013-chromium-icu-use-system-library-only-targets.patch b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-icu-use-system-library-only-targets.patch deleted file mode 100644 index a8b52c39..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-icu-use-system-library-only-targets.patch +++ /dev/null @@ -1,88 +0,0 @@ -From f0aebd4351e729d281fb597627ff87cbe8a67dd0 Mon Sep 17 00:00:00 2001 -From: Andrej Valek -Date: Fri, 17 Apr 2020 09:43:32 +0200 -Subject: [PATCH] chromium: icu: use system library only targets - - - use bundled one for native/v8 internal builds - -Complete system ICU library using requires ICU dev package -be installed on host. Enabling dependency on native package -is not enough due to V8 hosttools toolchain. V8 toolchain -is not using native sysroot, only a host packages. -On the other hand webenegine does not produce external -native artifacts. So external system ICU linking is not -needed. - -Signed-off-by: Andrej Valek -Signed-off-by: Martin Jansa ---- - chromium/third_party/icu/BUILD.gn | 18 ++++++++++++++---- - 1 file changed, 14 insertions(+), 4 deletions(-) - -diff --git a/chromium/third_party/icu/BUILD.gn b/chromium/third_party/icu/BUILD.gn -index 73673fa20ac..a656692c7bf 100644 ---- a/chromium/third_party/icu/BUILD.gn -+++ b/chromium/third_party/icu/BUILD.gn -@@ -7,9 +7,13 @@ import("//build/config/host_byteorder.gni") - import("//build/config/linux/pkg_config.gni") - import("//build/shim_headers.gni") - import("//third_party/icu/config.gni") -+import("//v8/gni/snapshot_toolchain.gni") - - declare_args() { - use_system_icu = false -+ -+ # Use only target icu library, when system using is enabled -+ use_system_icu_target_only = false - } - - if (is_android) { -@@ -23,6 +27,12 @@ if (is_mac) { - assert(!icu_disable_thin_archive || !is_component_build, - "icu_disable_thin_archive only works in static library builds") - -+if (use_system_icu) { -+ # Use system library only for target, otherwise use bundled -+ if ((current_toolchain != host_toolchain) && (current_toolchain != v8_snapshot_toolchain)) { -+ use_system_icu_target_only = true -+ } -+} - # Meta target that includes both icuuc and icui18n. Most targets want both. - # You can depend on the individually if you need to. - group("icu") { -@@ -1222,7 +1232,7 @@ config("system_icu_config") { - } - } - --if (use_system_icu) { -+if (use_system_icu_target_only) { - pkg_config("system_icui18n") { - packages = [ "icu-i18n" ] - } -@@ -1435,7 +1445,7 @@ shim_headers("icuuc_shim") { - } - - config("icu_config") { -- if (use_system_icu) { -+ if (use_system_icu_target_only) { - configs = [ ":system_icu_config"] - } else { - configs = [ ":bundled_icu_config"] -@@ -1443,7 +1453,7 @@ config("icu_config") { - } - - group("icuuc") { -- if (use_system_icu) { -+ if (use_system_icu_target_only) { - deps = [ ":icuuc_shim" ] - public_configs = [ - ":system_icu_config", -@@ -1455,7 +1465,7 @@ group("icuuc") { - } - - group("icui18n") { -- if (use_system_icu) { -+ if (use_system_icu_target_only) { - deps = [ ":icui18n_shim" ] - public_configs = [ - ":system_icu_config", 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..cb49de14 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-include-fcntl.h-for-loff_t.patch @@ -0,0 +1,22 @@ +From c86fd26828f794d1e547d2d81970ecf3d701e9f7 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-Fix-sandbox-Aw-snap-for-syscalls-403-and-40.patch b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-Fix-sandbox-Aw-snap-for-syscalls-403-and-40.patch deleted file mode 100644 index 7708a4c0..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-Fix-sandbox-Aw-snap-for-syscalls-403-and-40.patch +++ /dev/null @@ -1,139 +0,0 @@ -From d073427b25915e1784c3d74296b68fef0076ceb0 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= -Date: Mon, 20 Apr 2020 23:56:48 +0200 -Subject: [PATCH] chromium: Fix sandbox 'Aw, snap' for syscalls 403 and 407 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Taken as is from meta-browser. Saw my application freeze for syscall 0407 -trouble: - -| ../../../../git/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:seccomp-bpf failure in syscall 0407 - -Original commit message: - -* syscall 403: reported by ArchLinux users [1-2] -* syscall 407: reported by me [3] - -Looking at [4-5] it seems that glibc (>=2.31?) introduced extra syscalls for -32Bit systems to handle time64: - -* __NR_clock_gettime -> __NR_clock_gettime64 -* __NR_clock_nanosleep -> __NR_clock_nanosleep_time64 - -To fix -| ../../sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:seccomp-bpf failure in syscall 0403 -| ../../sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc:**CRASHING**:seccomp-bpf failure in syscall 0407 - -we handle new systemcalls in the same way as 64bit systems do and 32bit systems -did before glibc 2.31. - -[1] https://bugs.archlinux32.org/index.php?do=details&task_id=105 -[2] https://bbs.archlinux32.org/viewtopic.php?id=2897 -[3] https://github.com/OSSystems/meta-browser/issues/357 -[4] https://sourceware.org/git/?p=glibc.git;a=commit;h=2e44b10b42d68d9887ccab17b76db5d7bbae4fb6 -[5] https://github.com/bminor/glibc/blob/019d828669df966dc4ef2684fce0b1c17bef9aae/sysdeps/unix/sysv/linux/clock_gettime.c#L30 - -Upstream Status: Pending [Have no idea where to send this] - -Signed-off-by: Andreas MĂ¼ller -Signed-off-by: Martin Jansa ---- - .../sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc | 9 ++++++++- - .../syscall_parameters_restrictions_unittests.cc | 6 ++++++ - .../sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc | 6 ++++++ - .../sandbox/linux/system_headers/arm_linux_syscalls.h | 8 ++++++++ - .../sandbox/linux/system_headers/mips_linux_syscalls.h | 8 ++++++++ - 5 files changed, 36 insertions(+), 1 deletion(-) - -diff --git a/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc b/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc -index 712f9699a94..2a80dd2d2b3 100644 ---- a/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc -+++ b/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc -@@ -148,7 +148,14 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, - return Allow(); - #endif - -- if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) { -+ if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep -+#if defined(__NR_clock_gettime64) -+ || sysno == __NR_clock_gettime64 -+#endif -+#if defined(__NR_clock_nanosleep_time64) -+ || sysno == __NR_clock_nanosleep_time64 -+#endif -+ ) { - return RestrictClockID(); - } - -diff --git a/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc b/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc -index b6c8c637746..81972a9d998 100644 ---- a/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc -+++ b/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc -@@ -60,6 +60,12 @@ class RestrictClockIdPolicy : public bpf_dsl::Policy { - case __NR_clock_gettime: - case __NR_clock_getres: - case __NR_clock_nanosleep: -+#if defined(__NR_clock_nanosleep_time64) -+ case __NR_clock_nanosleep_time64: -+#endif -+#if defined(__NR_clock_gettime64) -+ case __NR_clock_gettime64: -+#endif - return RestrictClockID(); - default: - return Allow(); -diff --git a/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -index d9d18822f67..0db8745cb57 100644 ---- a/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -+++ b/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -@@ -39,6 +39,12 @@ bool SyscallSets::IsAllowedGettime(int sysno) { - // filtered by RestrictClokID(). - case __NR_clock_gettime: // Parameters filtered by RestrictClockID(). - case __NR_clock_nanosleep: // Parameters filtered by RestrictClockID(). -+#if defined(__NR_clock_gettime64) -+ case __NR_clock_gettime64: // Parameters filtered by RestrictClockID(). -+#endif -+#if defined(__NR_clock_nanosleep_time64) -+ case __NR_clock_nanosleep_time64: // Parameters filtered by RestrictClockID(). -+#endif - case __NR_clock_settime: // Privileged. - #if defined(__i386__) || \ - (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -diff --git a/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h b/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h -index 1addd53843c..5de2162f981 100644 ---- a/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h -+++ b/chromium/sandbox/linux/system_headers/arm_linux_syscalls.h -@@ -1385,6 +1385,14 @@ - #define __NR_memfd_create (__NR_SYSCALL_BASE+385) - #endif - -+#if !defined(__NR_clock_gettime64) -+#define __NR_clock_gettime64 (__NR_SYSCALL_BASE+403) -+#endif -+ -+#if !defined(__NR_clock_nanosleep_time64) -+#define __NR_clock_nanosleep_time64 (__NR_SYSCALL_BASE+407) -+#endif -+ - // ARM private syscalls. - #if !defined(__ARM_NR_BASE) - #define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0xF0000) -diff --git a/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h b/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h -index ddbf97f3d8b..fa01b3bbc66 100644 ---- a/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h -+++ b/chromium/sandbox/linux/system_headers/mips_linux_syscalls.h -@@ -1433,4 +1433,12 @@ - #define __NR_memfd_create (__NR_Linux + 354) - #endif - -+#if !defined(__NR_clock_gettime64) -+#define __NR_clock_gettime64 (__NR_Linux + 403) -+#endif -+ -+#if !defined(__NR_clock_nanosleep_time64) -+#define __NR_clock_nanosleep_time64 (__NR_Linux + 407) -+#endif -+ - #endif // SANDBOX_LINUX_SYSTEM_HEADERS_MIPS_LINUX_SYSCALLS_H_ 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..96862bb5 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-use-off64_t-instead-of-the-internal-__.patch @@ -0,0 +1,62 @@ +From 953e53d9f6f43db1a8648b6a6644528ed145aca8 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-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..56e0d365 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-linux-glibc-make-the-distinction.patch @@ -0,0 +1,23 @@ +From a7bf393630fe1ad70cf32765c56a1a4f1c0e4d4c 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 a5ca0b7191e..7017d48b5a0 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(OS_CHROMEOS)) && \ ++#elif (defined(__GLIBC__) || defined(OS_CHROMEOS)) && \ + BUILDFLAG(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/0015-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch deleted file mode 100644 index e1624cb9..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch +++ /dev/null @@ -1,33 +0,0 @@ -From d6a03a1de746c5fc460f3e63fe2ceec050663da4 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 5fdb4817af8..e5b9431daa0 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/0016-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch deleted file mode 100644 index ef45ed08..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 73d501e0503fc5a9a2229933f976c713b6e7f28a 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 044bd8d244f..cec43e1d59b 100644 ---- a/chromium/base/process/process_metrics_posix.cc -+++ b/chromium/base/process/process_metrics_posix.cc -@@ -110,14 +110,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 BUILDFLAG(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 1bf34c9d9ea..00e46d30b3a 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_) -@@ -170,6 +171,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/0016-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch new file mode 100644 index 00000000..eae797ce --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch @@ -0,0 +1,63 @@ +From d9897081f0ca3b0da9fd3e6fed67a703f3848d6a 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_reloader.cc | 4 ++++ + chromium/net/dns/resolv_compat.h | 29 +++++++++++++++++++++++++++++ + 2 files changed, 33 insertions(+) + create mode 100644 chromium/net/dns/resolv_compat.h + +diff --git a/chromium/net/dns/dns_reloader.cc b/chromium/net/dns/dns_reloader.cc +index 0672e711afb..300f77e3b38 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/macros.h" + #include "base/notreached.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/0017-chromium-musl-Do-not-define-__sbrk-on-musl.patch b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Do-not-define-__sbrk-on-musl.patch new file mode 100644 index 00000000..71232258 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Do-not-define-__sbrk-on-musl.patch @@ -0,0 +1,26 @@ +From 9b3aa55d2ca61650ed99b17be5ca97989ead3a15 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/0017-chromium-musl-include-fcntl.h-for-loff_t.patch b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-include-fcntl.h-for-loff_t.patch deleted file mode 100644 index 7cc717e2..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-include-fcntl.h-for-loff_t.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 181e65fb3a39ad4fb08c676b0ee67d887aeb68c7 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/0018-chromium-musl-Adjust-default-pthread-stack-size.patch b/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Adjust-default-pthread-stack-size.patch new file mode 100644 index 00000000..25aed494 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Adjust-default-pthread-stack-size.patch @@ -0,0 +1,47 @@ +From 36174b6d0a7db78739c90ab51643b68cc64c1d5e 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 c1a705e2b89..f322fdb8352 100644 +--- a/chromium/base/threading/platform_thread_linux.cc ++++ b/chromium/base/threading/platform_thread_linux.cc +@@ -377,7 +377,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 71b901f4044..f33aba04bc3 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. + +-#elif defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ ++#elif 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/0018-chromium-musl-use-off64_t-instead-of-the-internal-__.patch b/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-use-off64_t-instead-of-the-internal-__.patch deleted file mode 100644 index 96d5f6c0..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-use-off64_t-instead-of-the-internal-__.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 486e9c6aa16c9f2ea69a454bacbb15a11c0f96f2 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/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 new file mode 100644 index 00000000..6c46ba03 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch @@ -0,0 +1,52 @@ +From 05bbf1b0d31cdeb8ac3c439fda261acb146cfe8d 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 | 2 ++ + .../breakpad/breakpad/src/common/linux/elf_core_dump.h | 1 + + 3 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/chromium/third_party/breakpad/breakpad/configure.ac b/chromium/third_party/breakpad/breakpad/configure.ac +index 08513687f34..13745540a5e 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 getcontext getrandom]) + AM_CONDITIONAL([HAVE_GETCONTEXT], [test "x$ac_cv_func_getcontext" = xyes]) + +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 bbfdba68093..d7d5dcf0e92 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 +@@ -30,6 +30,8 @@ + #define _GNU_SOURCE // needed for pread() + #endif + ++#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 6e153745dba..5cd2c6fcb23 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/0019-chromium-musl-linux-glibc-make-the-distinction.patch b/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-linux-glibc-make-the-distinction.patch deleted file mode 100644 index f01dbc80..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-linux-glibc-make-the-distinction.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 4d4ec444217441b360e0ed7d784558b8acbcd4ab 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 5ea77ef2d27..85343a13905 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) && BUILDFLAG(USE_TCMALLOC) && \ -+#elif defined(__GLIBC__) && BUILDFLAG(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/0020-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch b/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch deleted file mode 100644 index 96eac41d..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch +++ /dev/null @@ -1,24 +0,0 @@ -From a07b5244ac103dd49c3deab81b6bed7589f5384e 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 ef42d5ad67f..626e4c996a5 100644 ---- a/chromium/base/allocator/allocator_shim.cc -+++ b/chromium/base/allocator/allocator_shim.cc -@@ -352,7 +352,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 BUILDFLAG(USE_TCMALLOC) -+#if BUILDFLAG(USE_TCMALLOC) && defined(__GLIBC__) - #include "base/allocator/allocator_shim_override_glibc_weak_symbols.h" - #endif - 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 new file mode 100644 index 00000000..f6dd35a4 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-pread-pwrite.patch @@ -0,0 +1,32 @@ +From dc3766d6b9c173d53027e6fddb8432afcced7398 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 | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/chromium/third_party/lss/linux_syscall_support.h b/chromium/third_party/lss/linux_syscall_support.h +index e4ac22644c0..f56203ccce4 100644 +--- a/chromium/third_party/lss/linux_syscall_support.h ++++ b/chromium/third_party/lss/linux_syscall_support.h +@@ -1258,6 +1258,12 @@ struct kernel_statfs { + #ifndef __NR_getrandom + #define __NR_getrandom 318 + #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-musl-Define-res_ninit-and-res_nclose-for-no.patch b/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch deleted file mode 100644 index c359002e..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 50a0f95d35c5180ee04fd66ec5135bf020acdad2 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 eaa5336c339..18b40d7d005 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 1c014a65019..2670a827aa5 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/0021-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch b/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch new file mode 100644 index 00000000..3c1062fd --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch @@ -0,0 +1,45 @@ +From e6953baf7bb353a8b0d901f75aff7d45b74798b2 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 10 May 2020 08:16:01 -0700 +Subject: [PATCH] chromium: musl: initialize msghdr in a compatible manner + +initialize msghdr in a compatible manner + +msghdr stuct from socket.h is not same between musl and glibc +where musl claims to be more posix compliant where as glibc seems +to fill whats needed for linux sizewise and chooses long enough types +which maybe questionable, therefore constructing a structure with explicit +constructor is not going to work correctly for musl and glibc at same time + +see +https://git.musl-libc.org/cgit/musl/commit/arch/x86_64/bits/socket.h?id=7168790763cdeb794df52be6e3b39fbb021c5a64 + +This fix initialized the struct to 0 first and then sets the struct elements +by name, so we dont have to hard code the positions of elements when initializing +structure + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + chromium/net/socket/udp_socket_posix.cc | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/chromium/net/socket/udp_socket_posix.cc b/chromium/net/socket/udp_socket_posix.cc +index 71265568be5..42e0d298045 100644 +--- a/chromium/net/socket/udp_socket_posix.cc ++++ b/chromium/net/socket/udp_socket_posix.cc +@@ -1151,8 +1151,12 @@ SendResult UDPSocketPosixSender::InternalSendmmsgBuffers( + for (auto& buffer : buffers) + msg_iov->push_back({const_cast(buffer->data()), buffer->length()}); + msgvec->reserve(buffers.size()); +- for (size_t j = 0; j < buffers.size(); j++) +- msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0}); ++ for (size_t j = 0; j < buffers.size(); j++) { ++ struct msghdr m = {0}; ++ m.msg_iov = &msg_iov[j]; ++ m.msg_iovlen = 1; ++ msgvec->push_back({m, 0}); ++ } + int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0)); + SendResult send_result(0, 0, std::move(buffers)); + if (result < 0) { diff --git a/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-Do-not-define-__sbrk-on-musl.patch b/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-Do-not-define-__sbrk-on-musl.patch deleted file mode 100644 index 2cdec0e0..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-Do-not-define-__sbrk-on-musl.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 095231f601a93c46408364d9ffd1378a14cc8d83 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/0023-chromium-musl-Adjust-default-pthread-stack-size.patch b/recipes-qt/qt5/qtwebengine/chromium/0023-chromium-musl-Adjust-default-pthread-stack-size.patch deleted file mode 100644 index 808cf67a..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0023-chromium-musl-Adjust-default-pthread-stack-size.patch +++ /dev/null @@ -1,47 +0,0 @@ -From c24db93fd5fa5728da55448865ba6bb4d6355491 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 1aaaa1c60d2..f49152fa6ac 100644 ---- a/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc -+++ b/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc -@@ -28,7 +28,7 @@ size_t GetUnderestimatedStackSize() { - // FIXME: On Mac OSX and Linux, this method cannot estimate stack size - // correctly for the main thread. - --#elif defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ -+#elif 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). -@@ -96,7 +96,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/0024-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch b/recipes-qt/qt5/qtwebengine/chromium/0024-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch deleted file mode 100644 index 786e65d8..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0024-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 01c128d575571f525a586fa769debf62826db888 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/0025-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch b/recipes-qt/qt5/qtwebengine/chromium/0025-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch deleted file mode 100644 index e4ecf41e..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0025-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 426b9ef79898e82ee04cfbe7c19746bdfd1c92ac 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/0026-chromium-musl-pread-pwrite.patch b/recipes-qt/qt5/qtwebengine/chromium/0026-chromium-musl-pread-pwrite.patch deleted file mode 100644 index 1e615637..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0026-chromium-musl-pread-pwrite.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 1506681955d4f7a70372cb27bf47dddd1ca00954 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 fd8efdffea6..22a8863031c 100644 ---- a/chromium/third_party/lss/linux_syscall_support.h -+++ b/chromium/third_party/lss/linux_syscall_support.h -@@ -1244,6 +1244,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/0027-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch b/recipes-qt/qt5/qtwebengine/chromium/0027-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch deleted file mode 100644 index 97035dc5..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0027-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 2e220677883ce371119b9b07b2a90ff6bde1b6d3 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 10 May 2020 08:16:01 -0700 -Subject: [PATCH] chromium: musl: initialize msghdr in a compatible manner - -initialize msghdr in a compatible manner - -msghdr stuct from socket.h is not same between musl and glibc -where musl claims to be more posix compliant where as glibc seems -to fill whats needed for linux sizewise and chooses long enough types -which maybe questionable, therefore constructing a structure with explicit -constructor is not going to work correctly for musl and glibc at same time - -see -https://git.musl-libc.org/cgit/musl/commit/arch/x86_64/bits/socket.h?id=7168790763cdeb794df52be6e3b39fbb021c5a64 - -This fix initialized the struct to 0 first and then sets the struct elements -by name, so we dont have to hard code the positions of elements when initializing -structure - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - chromium/net/socket/udp_socket_posix.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/chromium/net/socket/udp_socket_posix.cc b/chromium/net/socket/udp_socket_posix.cc -index 7df6892d67e..030ff8896e4 100644 ---- a/chromium/net/socket/udp_socket_posix.cc -+++ b/chromium/net/socket/udp_socket_posix.cc -@@ -1199,8 +1199,12 @@ SendResult UDPSocketPosixSender::InternalSendmmsgBuffers( - for (auto& buffer : buffers) - msg_iov->push_back({const_cast(buffer->data()), buffer->length()}); - msgvec->reserve(buffers.size()); -- for (size_t j = 0; j < buffers.size(); j++) -- msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0}); -+ for (size_t j = 0; j < buffers.size(); j++) { -+ struct msghdr m = {0}; -+ m.msg_iov = &msg_iov[j]; -+ m.msg_iovlen = 1; -+ msgvec->push_back({m, 0}); -+ } - int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0)); - SendResult send_result(0, 0, std::move(buffers)); - if (result < 0) { -- cgit v1.2.3 From c92031e3729d778f0b52d98f6cd6def87139c7b7 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Thu, 29 Apr 2021 11:18:10 +0200 Subject: qtwebengine: upgrade to latest 5.15 and 87-based, fix build with gcc-11 Signed-off-by: Martin Jansa --- .../0001-Force-host-toolchain-configuration.patch | 2 +- ...use-pvalloc-as-it-s-not-available-on-musl.patch | 2 +- .../0003-musl-link-against-libexecinfo.patch | 2 +- ...0004-mkspecs-Allow-builds-with-libc-glibc.patch | 2 +- ...um-workaround-for-too-long-.rps-file-name.patch | 2 +- .../0002-chromium-fix-build-with-clang.patch | 2 +- ...0003-chromium-Exclude-CRC32-for-32bit-arm.patch | 2 +- ...-Do-not-try-to-set-the-guessed-values-for.patch | 2 +- ...um-fix-build-after-y2038-changes-in-glibc.patch | 2 +- ...x-build-on-32bit-arches-with-64bit-time_t.patch | 2 +- ...ium-Include-cstddef-for-size_t-definition.patch | 2 +- ...ve-CharAllocator-definition-to-a-header-f.patch | 2 +- ...09-chromium-Link-v8-with-libatomic-on-x86.patch | 2 +- ...omium-icu-use-system-library-only-targets.patch | 2 +- ...abseil-cpp-perfetto-fix-build-with-gcc-11.patch | 59 ++++++++++++++++ ...sl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch | 33 --------- ...sl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch | 52 -------------- ...sl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch | 33 +++++++++ ...sl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch | 52 ++++++++++++++ ...-chromium-musl-include-fcntl.h-for-loff_t.patch | 22 ------ ...-chromium-musl-include-fcntl.h-for-loff_t.patch | 22 ++++++ ...sl-use-off64_t-instead-of-the-internal-__.patch | 62 ----------------- .../chromium/0015-chromium-gcc11-fixes.patch | 23 ------- ...ium-musl-linux-glibc-make-the-distinction.patch | 23 ------- ...sl-use-off64_t-instead-of-the-internal-__.patch | 62 +++++++++++++++++ ...sl-Define-res_ninit-and-res_nclose-for-no.patch | 63 ----------------- ...ium-musl-linux-glibc-make-the-distinction.patch | 23 +++++++ ...sl-Define-res_ninit-and-res_nclose-for-no.patch | 79 ++++++++++++++++++++++ ...hromium-musl-Do-not-define-__sbrk-on-musl.patch | 26 ------- ...um-musl-Adjust-default-pthread-stack-size.patch | 47 ------------- ...hromium-musl-Do-not-define-__sbrk-on-musl.patch | 26 +++++++ ...um-musl-Adjust-default-pthread-stack-size.patch | 47 +++++++++++++ ...sl-elf_reader.cc-include-sys-reg.h-to-get.patch | 52 -------------- ...sl-elf_reader.cc-include-sys-reg.h-to-get.patch | 52 ++++++++++++++ .../chromium/0020-chromium-musl-pread-pwrite.patch | 32 --------- ...sl-initialize-msghdr-in-a-compatible-mann.patch | 45 ------------ .../chromium/0021-chromium-musl-pread-pwrite.patch | 32 +++++++++ ...sl-initialize-msghdr-in-a-compatible-mann.patch | 45 ++++++++++++ 38 files changed, 546 insertions(+), 494 deletions(-) create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0011-chromium-abseil-cpp-perfetto-fix-build-with-gcc-11.patch delete 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/0012-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-include-fcntl.h-for-loff_t.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-include-fcntl.h-for-loff_t.patch delete 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-gcc11-fixes.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-linux-glibc-make-the-distinction.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-use-off64_t-instead-of-the-internal-__.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-linux-glibc-make-the-distinction.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Do-not-define-__sbrk-on-musl.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Adjust-default-pthread-stack-size.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Do-not-define-__sbrk-on-musl.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-Adjust-default-pthread-stack-size.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-elf_reader.cc-include-sys-reg.h-to-get.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-musl-initialize-msghdr-in-a-compatible-mann.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-pread-pwrite.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch (limited to 'recipes-qt/qt5/qtwebengine') 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 be24bc51..67ea08b2 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 083cc8263e38640dc4da53796c4c3665e5b2444c Mon Sep 17 00:00:00 2001 +From 4f5aa37cb8c785f227eb3a55595dd055d5f3e2c5 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 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 a7c8f79f..33e19e87 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 e45b77542978de101d3a3e9d644bfcaccea6982d Mon Sep 17 00:00:00 2001 +From 5fced4923a35066d1a7ff4a36f5881528fa93e77 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 fc5a39a0..597e9a99 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 b00c5048b99a87665491d932dc05a2723a604edb Mon Sep 17 00:00:00 2001 +From 424795a1b7fb485d6aa41e13f02608bc523a4e3e 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 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 c2eac846..42fdcbba 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,4 +1,4 @@ -From a4099f31e1850c81a27ae3572b00705431b05254 Mon Sep 17 00:00:00 2001 +From 93c14cef9c8918fac79e3b059cc9653979856c62 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 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 1df41114..230acecc 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 6c4a4b7c3dbfb1fc851522a67e1bcb7862b91184 Mon Sep 17 00:00:00 2001 +From 900b6302bdb5f55e5c65443d57c1b9889ce8b1ac 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-fix-build-with-clang.patch b/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-fix-build-with-clang.patch index 75dad974..513a2ad1 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-fix-build-with-clang.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-fix-build-with-clang.patch @@ -1,4 +1,4 @@ -From 35cd9c8391865012644038b1af425ac7e2ae1828 Mon Sep 17 00:00:00 2001 +From e7c5bbcb94ac020d801eb86d7e93d69cfbb024a6 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 diff --git a/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-Exclude-CRC32-for-32bit-arm.patch b/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-Exclude-CRC32-for-32bit-arm.patch index 2f22f282..24fdbbfa 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-Exclude-CRC32-for-32bit-arm.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-Exclude-CRC32-for-32bit-arm.patch @@ -1,4 +1,4 @@ -From 2fed766cdca44dc67a508b26ea66feab47eb49fd Mon Sep 17 00:00:00 2001 +From 92ab3e8a7160d633d58e4a082dec6971aa7ecaa8 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 diff --git a/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Do-not-try-to-set-the-guessed-values-for.patch b/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Do-not-try-to-set-the-guessed-values-for.patch index 92e16f40..36855b40 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Do-not-try-to-set-the-guessed-values-for.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Do-not-try-to-set-the-guessed-values-for.patch @@ -1,4 +1,4 @@ -From 6c43c38e14a889950f1401d484fe16594cac2c22 Mon Sep 17 00:00:00 2001 +From 50fec34283ce34caeb7b554a6c241218234746b3 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 diff --git a/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-fix-build-after-y2038-changes-in-glibc.patch b/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-fix-build-after-y2038-changes-in-glibc.patch index f8e7d4ba..2924f382 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-fix-build-after-y2038-changes-in-glibc.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-fix-build-after-y2038-changes-in-glibc.patch @@ -1,4 +1,4 @@ -From b2521c339d944c1f5333ccc258cbae2fd8b741a2 Mon Sep 17 00:00:00 2001 +From 9864bef1a01b419d66072b72b39ae0cd7d67b110 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 diff --git a/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch b/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch index 6677a03a..41730a8e 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-Fix-build-on-32bit-arches-with-64bit-time_t.patch @@ -1,4 +1,4 @@ -From 5fc06ad92eaeb20e3b0afbc47a2436bf9038d942 Mon Sep 17 00:00:00 2001 +From d0b000b79a7c5da37d87881cca465847f768b8fc 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 diff --git a/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-Include-cstddef-for-size_t-definition.patch b/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-Include-cstddef-for-size_t-definition.patch index 064bb576..2417d854 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-Include-cstddef-for-size_t-definition.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-Include-cstddef-for-size_t-definition.patch @@ -1,4 +1,4 @@ -From 3ed9af348ff76523e5aa16317a354b47dcae1766 Mon Sep 17 00:00:00 2001 +From 0f4e4ee09874e819a0dfdb2753efd47ebe862dab 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 diff --git a/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-Move-CharAllocator-definition-to-a-header-f.patch b/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-Move-CharAllocator-definition-to-a-header-f.patch index 2ee2cce0..143a5b70 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-Move-CharAllocator-definition-to-a-header-f.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-Move-CharAllocator-definition-to-a-header-f.patch @@ -1,4 +1,4 @@ -From 159ee1528e0870555bf1bac8f24795d84c223a56 Mon Sep 17 00:00:00 2001 +From 3bc78b6d3e3e197b2dfa77ff4963561166492a49 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 diff --git a/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Link-v8-with-libatomic-on-x86.patch b/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Link-v8-with-libatomic-on-x86.patch index 3abfb814..c7a1323f 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Link-v8-with-libatomic-on-x86.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-Link-v8-with-libatomic-on-x86.patch @@ -1,4 +1,4 @@ -From 496d125361f53ef9b3e4e92bdcfa19aec57c0007 Mon Sep 17 00:00:00 2001 +From 8c54d047047f4345a7f0316d33a718c632bf5807 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 1 Feb 2020 12:17:23 -0800 Subject: [PATCH] chromium: Link v8 with libatomic on x86 diff --git a/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-icu-use-system-library-only-targets.patch b/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-icu-use-system-library-only-targets.patch index 355ff4fa..bac67267 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-icu-use-system-library-only-targets.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-icu-use-system-library-only-targets.patch @@ -1,4 +1,4 @@ -From acdb51541e4eb73177b28c79d395d8d6964ed161 Mon Sep 17 00:00:00 2001 +From 3ebde6b1a9be5476cda2ace2c103ffc2a3004a4c Mon Sep 17 00:00:00 2001 From: Andrej Valek Date: Fri, 17 Apr 2020 09:43:32 +0200 Subject: [PATCH] chromium: icu: use system library only targets diff --git a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-abseil-cpp-perfetto-fix-build-with-gcc-11.patch b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-abseil-cpp-perfetto-fix-build-with-gcc-11.patch new file mode 100644 index 00000000..9388c767 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-abseil-cpp-perfetto-fix-build-with-gcc-11.patch @@ -0,0 +1,59 @@ +From 504691a6e2ab928115cde1f6163661158151636b Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Thu, 29 Apr 2021 11:11:51 +0200 +Subject: [PATCH] chromium: abseil-cpp, perfetto: fix build with gcc-11 + +* fixes abseil-cpp: +FAILED: obj/third_party/abseil-cpp/absl/synchronization/graphcycles_internal/graphcycles.o +/OE/build/luneos-honister/webos-ports/tmp-glibc/work/core2-64-webos-linux/qtwebengine/5.15.3+gitAUTOINC+0930b350d7_687d322fae-r0/recipe-sysroot-native/usr/bin/x86_64-webos-linux/x86_64-webos-linux-g++ -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/OE/build/luneos-honister/webos-ports/tmp-glibc/work/core2-64-webos-linux/qtwebengine/5.15.3+gitAUTOINC+0930b350d7_687d322fae-r0/recipe-sysroot -MMD -MF obj/third_party/abseil-cpp/absl/synchronization/graphcycles_internal/graphcycles.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DCR_SYSROOT_HASH=5f64b417e1018dcf8fcc81dc2714e0f264b9b911 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DABSL_ALLOCATOR_NOTHROW=1 -Igen -I../../../../git/src/3rdparty/chromium -I../../../../git/src/3rdparty/chromium/third_party/abseil-cpp -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -m64 -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g1 -fvisibility=hidden -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -std=gnu++14 -fno-exceptions -fno-rtti --sysroot=../../../../recipe-sysroot -fvisibility-inlines-hidden -Wno-narrowing -Wno-class-memaccess -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -Wno-invalid-offsetof -Wno-return-type -Wno-deprecated-copy -c ../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc -o obj/third_party/abseil-cpp/absl/synchronization/graphcycles_internal/graphcycles.o +../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc: In member function 'void absl::synchronization_internal::GraphCycles::RemoveNode(void*)': +../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc:451:26: error: 'numeric_limits' is not a member of 'std' + 451 | if (x->version == std::numeric_limits::max()) { + | ^~~~~~~~~~~~~~ +../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc:451:49: error: expected primary-expression before '>' token + 451 | if (x->version == std::numeric_limits::max()) { + | ^ +../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc:451:52: error: '::max' has not been declared; did you mean 'std::max'? + 451 | if (x->version == std::numeric_limits::max()) { + | ^~~ + | std::max + +* and perfetto: +../../../../git/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h:256:34: error: no member named 'numeric_limits' in namespace 'std' + PERFETTO_DCHECK(value < std::numeric_limits::max()); + +This is because its missing right header which perhaps is included +implicitly in older compilers + +Upstream-Status: Pending +Signed-off-by: Khem Raj +Signed-off-by: Martin Jansa +--- + .../abseil-cpp/absl/synchronization/internal/graphcycles.cc | 1 + + .../perfetto/src/trace_processor/containers/string_pool.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc b/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +index 19f9aab5b1a..ab9d7f80bc7 100644 +--- a/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc ++++ b/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +@@ -36,6 +36,7 @@ + #include "absl/synchronization/internal/graphcycles.h" + + #include ++#include + #include + #include "absl/base/internal/hide_ptr.h" + #include "absl/base/internal/raw_logging.h" +diff --git a/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h b/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h +index 11ae91cfeca..558ff00e8fe 100644 +--- a/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h ++++ b/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h +@@ -20,6 +20,7 @@ + #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 deleted file mode 100644 index 9acb43ab..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch +++ /dev/null @@ -1,33 +0,0 @@ -From a4e658527d513366e614c188f0572b4f32c385d1 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 5fdb4817af8..e5b9431daa0 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/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 deleted file mode 100644 index dbb4e4df..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 4ad1b69cbb61baba2d8796d721b2009c33c00640 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 9d12c427bb3..900ab13519f 100644 ---- a/chromium/base/process/process_metrics_posix.cc -+++ b/chromium/base/process/process_metrics_posix.cc -@@ -119,14 +119,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_CHROMEOS) || defined(OS_ANDROID) -+#elif defined(__GLIBC__) || defined(OS_CHROMEOS) || defined(OS_ANDROID) - struct mallinfo minfo = mallinfo(); - #if BUILDFLAG(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 c327f486596..90129e851e8 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_) -@@ -170,6 +171,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-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch new file mode 100644 index 00000000..6bbcaae7 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch @@ -0,0 +1,33 @@ +From 39c047e4e590f7ea4a3f6b002d45dccc5f395cd0 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 5fdb4817af8..e5b9431daa0 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/0013-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch new file mode 100644 index 00000000..d41c644d --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch @@ -0,0 +1,52 @@ +From 02b620db1f054d6320b62ef421bbb84003b3d7e1 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 9d12c427bb3..900ab13519f 100644 +--- a/chromium/base/process/process_metrics_posix.cc ++++ b/chromium/base/process/process_metrics_posix.cc +@@ -119,14 +119,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_CHROMEOS) || defined(OS_ANDROID) ++#elif defined(__GLIBC__) || defined(OS_CHROMEOS) || defined(OS_ANDROID) + struct mallinfo minfo = mallinfo(); + #if BUILDFLAG(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 c327f486596..90129e851e8 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_) +@@ -170,6 +171,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/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 deleted file mode 100644 index cb49de14..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-include-fcntl.h-for-loff_t.patch +++ /dev/null @@ -1,22 +0,0 @@ -From c86fd26828f794d1e547d2d81970ecf3d701e9f7 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-include-fcntl.h-for-loff_t.patch b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-include-fcntl.h-for-loff_t.patch new file mode 100644 index 00000000..9369ed61 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-include-fcntl.h-for-loff_t.patch @@ -0,0 +1,22 @@ +From 21a0b6b6f3517548165aca2cbb6e4c20389d5be9 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-off64_t-instead-of-the-internal-__.patch b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-use-off64_t-instead-of-the-internal-__.patch deleted file mode 100644 index 96862bb5..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-use-off64_t-instead-of-the-internal-__.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 953e53d9f6f43db1a8648b6a6644528ed145aca8 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-gcc11-fixes.patch b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-gcc11-fixes.patch deleted file mode 100644 index 699a809a..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-gcc11-fixes.patch +++ /dev/null @@ -1,23 +0,0 @@ -Include header - -gcc11 complains - -../../../../git/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h:256:34: error: no member named 'numeric_limits' in namespace 'std' - PERFETTO_DCHECK(value < std::numeric_limits::max()); - -This is because its missing right header which perhaps is included -implicitly in older compilers - -Upstream-Status: Pending -Signed-off-by: Khem Raj - ---- a/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h -+++ b/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h -@@ -20,6 +20,7 @@ - #include - #include - -+#include - #include - #include - 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 deleted file mode 100644 index 56e0d365..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-linux-glibc-make-the-distinction.patch +++ /dev/null @@ -1,23 +0,0 @@ -From a7bf393630fe1ad70cf32765c56a1a4f1c0e4d4c 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 a5ca0b7191e..7017d48b5a0 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(OS_CHROMEOS)) && \ -+#elif (defined(__GLIBC__) || defined(OS_CHROMEOS)) && \ - BUILDFLAG(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/0015-chromium-musl-use-off64_t-instead-of-the-internal-__.patch b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-use-off64_t-instead-of-the-internal-__.patch new file mode 100644 index 00000000..e889e1bd --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-use-off64_t-instead-of-the-internal-__.patch @@ -0,0 +1,62 @@ +From 8b75424d0997059414eed6b10a0b1a6050437c49 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/0016-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch deleted file mode 100644 index eae797ce..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch +++ /dev/null @@ -1,63 +0,0 @@ -From d9897081f0ca3b0da9fd3e6fed67a703f3848d6a 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_reloader.cc | 4 ++++ - chromium/net/dns/resolv_compat.h | 29 +++++++++++++++++++++++++++++ - 2 files changed, 33 insertions(+) - create mode 100644 chromium/net/dns/resolv_compat.h - -diff --git a/chromium/net/dns/dns_reloader.cc b/chromium/net/dns/dns_reloader.cc -index 0672e711afb..300f77e3b38 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/macros.h" - #include "base/notreached.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/0016-chromium-musl-linux-glibc-make-the-distinction.patch b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-linux-glibc-make-the-distinction.patch new file mode 100644 index 00000000..87a38514 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-linux-glibc-make-the-distinction.patch @@ -0,0 +1,23 @@ +From eab6e024109ab2bd13bb0189be8d18bae1f597d4 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 a5ca0b7191e..7017d48b5a0 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(OS_CHROMEOS)) && \ ++#elif (defined(__GLIBC__) || defined(OS_CHROMEOS)) && \ + BUILDFLAG(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/0017-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch new file mode 100644 index 00000000..cf860499 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch @@ -0,0 +1,79 @@ +From 108a2e0d81870c418431c8dfb48d827f69606b6e 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 5a4aead0acf..3427923836b 100644 +--- a/chromium/net/dns/dns_config_service_posix.cc ++++ b/chromium/net/dns/dns_config_service_posix.cc +@@ -30,6 +30,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_MAC) + #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 0672e711afb..300f77e3b38 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/macros.h" + #include "base/notreached.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/0017-chromium-musl-Do-not-define-__sbrk-on-musl.patch b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Do-not-define-__sbrk-on-musl.patch deleted file mode 100644 index 71232258..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Do-not-define-__sbrk-on-musl.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 9b3aa55d2ca61650ed99b17be5ca97989ead3a15 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/0018-chromium-musl-Adjust-default-pthread-stack-size.patch b/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Adjust-default-pthread-stack-size.patch deleted file mode 100644 index 25aed494..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Adjust-default-pthread-stack-size.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 36174b6d0a7db78739c90ab51643b68cc64c1d5e 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 c1a705e2b89..f322fdb8352 100644 ---- a/chromium/base/threading/platform_thread_linux.cc -+++ b/chromium/base/threading/platform_thread_linux.cc -@@ -377,7 +377,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 71b901f4044..f33aba04bc3 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. - --#elif defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ -+#elif 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/0018-chromium-musl-Do-not-define-__sbrk-on-musl.patch b/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Do-not-define-__sbrk-on-musl.patch new file mode 100644 index 00000000..34e91314 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-Do-not-define-__sbrk-on-musl.patch @@ -0,0 +1,26 @@ +From 1821c58b645e97b11b49bd8790673e81165cfb3e 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-Adjust-default-pthread-stack-size.patch b/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-Adjust-default-pthread-stack-size.patch new file mode 100644 index 00000000..f97ae1ad --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-Adjust-default-pthread-stack-size.patch @@ -0,0 +1,47 @@ +From 8d4e7979c7d5b71159e4cab112ba5938109ac4e6 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 c1a705e2b89..f322fdb8352 100644 +--- a/chromium/base/threading/platform_thread_linux.cc ++++ b/chromium/base/threading/platform_thread_linux.cc +@@ -377,7 +377,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 71b901f4044..f33aba04bc3 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. + +-#elif defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ ++#elif 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/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 6c46ba03..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 05bbf1b0d31cdeb8ac3c439fda261acb146cfe8d 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 | 2 ++ - .../breakpad/breakpad/src/common/linux/elf_core_dump.h | 1 + - 3 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/chromium/third_party/breakpad/breakpad/configure.ac b/chromium/third_party/breakpad/breakpad/configure.ac -index 08513687f34..13745540a5e 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 getcontext getrandom]) - AM_CONDITIONAL([HAVE_GETCONTEXT], [test "x$ac_cv_func_getcontext" = xyes]) - -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 bbfdba68093..d7d5dcf0e92 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 -@@ -30,6 +30,8 @@ - #define _GNU_SOURCE // needed for pread() - #endif - -+#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 6e153745dba..5cd2c6fcb23 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-elf_reader.cc-include-sys-reg.h-to-get.patch b/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch new file mode 100644 index 00000000..5d219358 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch @@ -0,0 +1,52 @@ +From 9bb8968968361bc7e24bb51c70a27b06efba195f 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 | 2 ++ + .../breakpad/breakpad/src/common/linux/elf_core_dump.h | 1 + + 3 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/chromium/third_party/breakpad/breakpad/configure.ac b/chromium/third_party/breakpad/breakpad/configure.ac +index 08513687f34..13745540a5e 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 getcontext getrandom]) + AM_CONDITIONAL([HAVE_GETCONTEXT], [test "x$ac_cv_func_getcontext" = xyes]) + +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 bbfdba68093..d7d5dcf0e92 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 +@@ -30,6 +30,8 @@ + #define _GNU_SOURCE // needed for pread() + #endif + ++#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 6e153745dba..5cd2c6fcb23 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-pread-pwrite.patch b/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-pread-pwrite.patch deleted file mode 100644 index f6dd35a4..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0020-chromium-musl-pread-pwrite.patch +++ /dev/null @@ -1,32 +0,0 @@ -From dc3766d6b9c173d53027e6fddb8432afcced7398 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 | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/chromium/third_party/lss/linux_syscall_support.h b/chromium/third_party/lss/linux_syscall_support.h -index e4ac22644c0..f56203ccce4 100644 ---- a/chromium/third_party/lss/linux_syscall_support.h -+++ b/chromium/third_party/lss/linux_syscall_support.h -@@ -1258,6 +1258,12 @@ struct kernel_statfs { - #ifndef __NR_getrandom - #define __NR_getrandom 318 - #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-musl-initialize-msghdr-in-a-compatible-mann.patch b/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch deleted file mode 100644 index 3c1062fd..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch +++ /dev/null @@ -1,45 +0,0 @@ -From e6953baf7bb353a8b0d901f75aff7d45b74798b2 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 10 May 2020 08:16:01 -0700 -Subject: [PATCH] chromium: musl: initialize msghdr in a compatible manner - -initialize msghdr in a compatible manner - -msghdr stuct from socket.h is not same between musl and glibc -where musl claims to be more posix compliant where as glibc seems -to fill whats needed for linux sizewise and chooses long enough types -which maybe questionable, therefore constructing a structure with explicit -constructor is not going to work correctly for musl and glibc at same time - -see -https://git.musl-libc.org/cgit/musl/commit/arch/x86_64/bits/socket.h?id=7168790763cdeb794df52be6e3b39fbb021c5a64 - -This fix initialized the struct to 0 first and then sets the struct elements -by name, so we dont have to hard code the positions of elements when initializing -structure - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- - chromium/net/socket/udp_socket_posix.cc | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/chromium/net/socket/udp_socket_posix.cc b/chromium/net/socket/udp_socket_posix.cc -index 71265568be5..42e0d298045 100644 ---- a/chromium/net/socket/udp_socket_posix.cc -+++ b/chromium/net/socket/udp_socket_posix.cc -@@ -1151,8 +1151,12 @@ SendResult UDPSocketPosixSender::InternalSendmmsgBuffers( - for (auto& buffer : buffers) - msg_iov->push_back({const_cast(buffer->data()), buffer->length()}); - msgvec->reserve(buffers.size()); -- for (size_t j = 0; j < buffers.size(); j++) -- msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0}); -+ for (size_t j = 0; j < buffers.size(); j++) { -+ struct msghdr m = {0}; -+ m.msg_iov = &msg_iov[j]; -+ m.msg_iovlen = 1; -+ msgvec->push_back({m, 0}); -+ } - int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0)); - SendResult send_result(0, 0, std::move(buffers)); - if (result < 0) { diff --git a/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-pread-pwrite.patch b/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-pread-pwrite.patch new file mode 100644 index 00000000..8ae89b4c --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-musl-pread-pwrite.patch @@ -0,0 +1,32 @@ +From 5c0daff380e86d0af67211bb8b08e194abb43e2c 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 | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/chromium/third_party/lss/linux_syscall_support.h b/chromium/third_party/lss/linux_syscall_support.h +index e4ac22644c0..f56203ccce4 100644 +--- a/chromium/third_party/lss/linux_syscall_support.h ++++ b/chromium/third_party/lss/linux_syscall_support.h +@@ -1258,6 +1258,12 @@ struct kernel_statfs { + #ifndef __NR_getrandom + #define __NR_getrandom 318 + #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/0022-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch b/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch new file mode 100644 index 00000000..c5aaa3fe --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-musl-initialize-msghdr-in-a-compatible-mann.patch @@ -0,0 +1,45 @@ +From 5305f280c00e90b5961d77086eb3f498ece1c5dc Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 10 May 2020 08:16:01 -0700 +Subject: [PATCH] chromium: musl: initialize msghdr in a compatible manner + +initialize msghdr in a compatible manner + +msghdr stuct from socket.h is not same between musl and glibc +where musl claims to be more posix compliant where as glibc seems +to fill whats needed for linux sizewise and chooses long enough types +which maybe questionable, therefore constructing a structure with explicit +constructor is not going to work correctly for musl and glibc at same time + +see +https://git.musl-libc.org/cgit/musl/commit/arch/x86_64/bits/socket.h?id=7168790763cdeb794df52be6e3b39fbb021c5a64 + +This fix initialized the struct to 0 first and then sets the struct elements +by name, so we dont have to hard code the positions of elements when initializing +structure + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + chromium/net/socket/udp_socket_posix.cc | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/chromium/net/socket/udp_socket_posix.cc b/chromium/net/socket/udp_socket_posix.cc +index 71265568be5..42e0d298045 100644 +--- a/chromium/net/socket/udp_socket_posix.cc ++++ b/chromium/net/socket/udp_socket_posix.cc +@@ -1151,8 +1151,12 @@ SendResult UDPSocketPosixSender::InternalSendmmsgBuffers( + for (auto& buffer : buffers) + msg_iov->push_back({const_cast(buffer->data()), buffer->length()}); + msgvec->reserve(buffers.size()); +- for (size_t j = 0; j < buffers.size(); j++) +- msgvec->push_back({{nullptr, 0, &msg_iov[j], 1, nullptr, 0, 0}, 0}); ++ for (size_t j = 0; j < buffers.size(); j++) { ++ struct msghdr m = {0}; ++ m.msg_iov = &msg_iov[j]; ++ m.msg_iovlen = 1; ++ msgvec->push_back({m, 0}); ++ } + int result = HANDLE_EINTR(Sendmmsg(fd, &msgvec[0], buffers.size(), 0)); + SendResult send_result(0, 0, std::move(buffers)); + if (result < 0) { -- cgit v1.2.3 From 72772ba86f43610557d86b2d7af38776213b1aec Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Thu, 29 Apr 2021 11:23:25 +0200 Subject: qtwebengine: lower MODULE_VERSION to 5.15.2 * as we cannot upgrade all modules past 5.15.2 due to license change and the branches for 5.15.4 not available publicly, but qtwebengine and the chromium bits which are probably most important for security fixes are available and hopefully we can use them for non-commercial use Signed-off-by: Martin Jansa --- ...use-pvalloc-as-it-s-not-available-on-musl.patch | 37 ----------------- ...qmake.conf-lower-MODULE_VERSION-to-5.15.2.patch | 34 +++++++++++++++ ...use-pvalloc-as-it-s-not-available-on-musl.patch | 37 +++++++++++++++++ .../0003-musl-link-against-libexecinfo.patch | 24 ----------- ...0004-mkspecs-Allow-builds-with-libc-glibc.patch | 48 ---------------------- .../0004-musl-link-against-libexecinfo.patch | 24 +++++++++++ ...0005-mkspecs-Allow-builds-with-libc-glibc.patch | 48 ++++++++++++++++++++++ 7 files changed, 143 insertions(+), 109 deletions(-) delete mode 100644 recipes-qt/qt5/qtwebengine/0002-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch create mode 100644 recipes-qt/qt5/qtwebengine/0002-qmake.conf-lower-MODULE_VERSION-to-5.15.2.patch create mode 100644 recipes-qt/qt5/qtwebengine/0003-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch delete mode 100644 recipes-qt/qt5/qtwebengine/0003-musl-link-against-libexecinfo.patch delete mode 100644 recipes-qt/qt5/qtwebengine/0004-mkspecs-Allow-builds-with-libc-glibc.patch create mode 100644 recipes-qt/qt5/qtwebengine/0004-musl-link-against-libexecinfo.patch create mode 100644 recipes-qt/qt5/qtwebengine/0005-mkspecs-Allow-builds-with-libc-glibc.patch (limited to 'recipes-qt/qt5/qtwebengine') 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 deleted file mode 100644 index 33e19e87..00000000 --- a/recipes-qt/qt5/qtwebengine/0002-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 5fced4923a35066d1a7ff4a36f5881528fa93e77 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 - -Change-Id: I7145463ac7b9560e7459d3384a3db108bd727403 -Signed-off-by: Samuli Piippo ---- - src/core/api/qtbug-61521.cpp | 8 -------- - 1 file changed, 8 deletions(-) - -diff --git a/src/core/api/qtbug-61521.cpp b/src/core/api/qtbug-61521.cpp -index 002a1af2..8fd2da36 100644 ---- a/src/core/api/qtbug-61521.cpp -+++ b/src/core/api/qtbug-61521.cpp -@@ -74,10 +74,6 @@ SHIM_SYMBOL_VERSION(valloc); - void* __valloc(size_t size) - SHIM_ALIAS_SYMBOL(ShimValloc); - --SHIM_SYMBOL_VERSION(pvalloc); --void* __pvalloc(size_t size) -- SHIM_ALIAS_SYMBOL(ShimPvalloc); -- - SHIM_SYMBOL_VERSION(posix_memalign); - int __posix_memalign(void** r, size_t a, size_t s) - SHIM_ALIAS_SYMBOL(ShimPosixMemalign); -@@ -110,10 +106,6 @@ SHIM_HIDDEN void* ShimValloc(size_t size) { - return valloc(size); - } - --SHIM_HIDDEN void* ShimPvalloc(size_t size) { -- return pvalloc(size); --} -- - SHIM_HIDDEN int ShimPosixMemalign(void** r, size_t a, size_t s) { - return posix_memalign(r,a,s); - } diff --git a/recipes-qt/qt5/qtwebengine/0002-qmake.conf-lower-MODULE_VERSION-to-5.15.2.patch b/recipes-qt/qt5/qtwebengine/0002-qmake.conf-lower-MODULE_VERSION-to-5.15.2.patch new file mode 100644 index 00000000..ce327f69 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/0002-qmake.conf-lower-MODULE_VERSION-to-5.15.2.patch @@ -0,0 +1,34 @@ +From 1dd91e504648f94a41509cde9f04b0ec2b2ad6cf Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Fri, 12 Mar 2021 15:47:50 +0100 +Subject: [PATCH] qmake.conf: lower MODULE_VERSION to 5.15.2 + +* to avoid incompatibility when searching for qtwebchannel: + +CMake Error at /OE/build/luneos-hardknott/webos-ports/tmp-glibc/work/core2-64-webos-linux/org.webosports.app.browser/0.5.0-14+gitAUTOINC+4b5398142b-r0/recipe-sysroot/usr/lib/cmake/Qt5WebEngineCore/Qt5WebEngineCoreConfig.cmake:116 (find_package): + Could not find a configuration file for package "Qt5WebChannel" that is + compatible with requested version "5.15.4". + + The following configuration files were considered but not accepted: + + /OE/build/luneos-hardknott/webos-ports/tmp-glibc/work/core2-64-webos-linux/org.webosports.app.browser/0.5.0-14+gitAUTOINC+4b5398142b-r0/recipe-sysroot/usr/lib/cmake/Qt5WebChannel/Qt5WebChannelConfig.cmake, version: 5.15.2 + +Call Stack (most recent call first): + /OE/build/luneos-hardknott/webos-ports/tmp-glibc/work/core2-64-webos-linux/org.webosports.app.browser/0.5.0-14+gitAUTOINC+4b5398142b-r0/recipe-sysroot/usr/lib/cmake/Qt5WebEngine/Qt5WebEngineConfig.cmake:116 (find_package) + CMakeLists.txt:19 (find_package) + +Signed-off-by: Martin Jansa +--- + .qmake.conf | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/.qmake.conf b/.qmake.conf +index d5e64505..8de72145 100644 +--- a/.qmake.conf ++++ b/.qmake.conf +@@ -5,4 +5,4 @@ QTWEBENGINE_OUT_ROOT = $$shadowed($$PWD) + load(qt_build_config) + CONFIG += warning_clean + +-MODULE_VERSION = 5.15.4 ++MODULE_VERSION = 5.15.2 diff --git a/recipes-qt/qt5/qtwebengine/0003-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch b/recipes-qt/qt5/qtwebengine/0003-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch new file mode 100644 index 00000000..6bd3e641 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/0003-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch @@ -0,0 +1,37 @@ +From 5047c9dfe57c29f9b39829ba6404bd23df669571 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 + +Change-Id: I7145463ac7b9560e7459d3384a3db108bd727403 +Signed-off-by: Samuli Piippo +--- + src/core/api/qtbug-61521.cpp | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/src/core/api/qtbug-61521.cpp b/src/core/api/qtbug-61521.cpp +index 002a1af2..8fd2da36 100644 +--- a/src/core/api/qtbug-61521.cpp ++++ b/src/core/api/qtbug-61521.cpp +@@ -74,10 +74,6 @@ SHIM_SYMBOL_VERSION(valloc); + void* __valloc(size_t size) + SHIM_ALIAS_SYMBOL(ShimValloc); + +-SHIM_SYMBOL_VERSION(pvalloc); +-void* __pvalloc(size_t size) +- SHIM_ALIAS_SYMBOL(ShimPvalloc); +- + SHIM_SYMBOL_VERSION(posix_memalign); + int __posix_memalign(void** r, size_t a, size_t s) + SHIM_ALIAS_SYMBOL(ShimPosixMemalign); +@@ -110,10 +106,6 @@ SHIM_HIDDEN void* ShimValloc(size_t size) { + return valloc(size); + } + +-SHIM_HIDDEN void* ShimPvalloc(size_t size) { +- return pvalloc(size); +-} +- + SHIM_HIDDEN int ShimPosixMemalign(void** r, size_t a, size_t s) { + return posix_memalign(r,a,s); + } diff --git a/recipes-qt/qt5/qtwebengine/0003-musl-link-against-libexecinfo.patch b/recipes-qt/qt5/qtwebengine/0003-musl-link-against-libexecinfo.patch deleted file mode 100644 index 597e9a99..00000000 --- a/recipes-qt/qt5/qtwebengine/0003-musl-link-against-libexecinfo.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 424795a1b7fb485d6aa41e13f02608bc523a4e3e 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 - -Change-Id: Ifada60f9c72691973612850121f6fb152d70839a -Signed-off-by: Samuli Piippo ---- - src/core/core_module.pro | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/core/core_module.pro b/src/core/core_module.pro -index 520b452f..d2b29b29 100644 ---- a/src/core/core_module.pro -+++ b/src/core/core_module.pro -@@ -5,7 +5,7 @@ include($${QTWEBENGINE_ROOT}/src/buildtools/config/linking.pri) - - api_library_name = qtwebenginecoreapi$$qtPlatformTargetSuffix() - api_library_path = $$OUT_PWD/api/$$getConfigDir() --LIBS_PRIVATE += -L$$api_library_path -+LIBS_PRIVATE += -L$$api_library_path -lexecinfo - CONFIG *= no_smart_library_merge - osx { - LIBS_PRIVATE += -Wl,-force_load,$${api_library_path}$${QMAKE_DIR_SEP}lib$${api_library_name}.a 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 deleted file mode 100644 index 42fdcbba..00000000 --- a/recipes-qt/qt5/qtwebengine/0004-mkspecs-Allow-builds-with-libc-glibc.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 93c14cef9c8918fac79e3b059cc9653979856c62 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 ---- - src/buildtools/config/support.pri | 4 ---- - src/buildtools/configure.json | 4 +--- - 2 files changed, 1 insertion(+), 7 deletions(-) - -diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri -index e7f869a1..f9c9c24b 100644 ---- a/src/buildtools/config/support.pri -+++ b/src/buildtools/config/support.pri -@@ -191,10 +191,6 @@ defineTest(qtwebengine_checkForHostPkgCfg) { - - defineTest(qtwebengine_checkForGlibc) { - module = $$1 -- !qtConfig(webengine-system-glibc) { -- qtwebengine_skipBuild("A suitable version >= 2.27 of libc required to build $${module} could not be found.") -- return(false) -- } - return(true) - } - -diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json -index 812a91f9..a7c3d972 100644 ---- a/src/buildtools/configure.json -+++ b/src/buildtools/configure.json -@@ -373,7 +373,6 @@ - && (!config.sanitizer || features.webengine-sanitizer) - && (!config.linux || features.pkg-config) - && (!config.linux || features.webengine-host-pkg-config) -- && (!config.linux || features.webengine-system-glibc) - && (!config.linux || features.webengine-system-khr) - && (!config.linux || features.webengine-system-nss) - && (!config.linux || features.webengine-system-dbus) -@@ -770,8 +769,7 @@ - "webengine-system-fontconfig", - "webengine-system-dbus", - "webengine-system-nss", -- "webengine-system-khr", -- "webengine-system-glibc" -+ "webengine-system-khr" - ] - }, - { diff --git a/recipes-qt/qt5/qtwebengine/0004-musl-link-against-libexecinfo.patch b/recipes-qt/qt5/qtwebengine/0004-musl-link-against-libexecinfo.patch new file mode 100644 index 00000000..74899024 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/0004-musl-link-against-libexecinfo.patch @@ -0,0 +1,24 @@ +From e8ca5b9f0dde416a726e94b000b2a775fcd58ad5 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 + +Change-Id: Ifada60f9c72691973612850121f6fb152d70839a +Signed-off-by: Samuli Piippo +--- + src/core/core_module.pro | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/core_module.pro b/src/core/core_module.pro +index 520b452f..d2b29b29 100644 +--- a/src/core/core_module.pro ++++ b/src/core/core_module.pro +@@ -5,7 +5,7 @@ include($${QTWEBENGINE_ROOT}/src/buildtools/config/linking.pri) + + api_library_name = qtwebenginecoreapi$$qtPlatformTargetSuffix() + api_library_path = $$OUT_PWD/api/$$getConfigDir() +-LIBS_PRIVATE += -L$$api_library_path ++LIBS_PRIVATE += -L$$api_library_path -lexecinfo + CONFIG *= no_smart_library_merge + osx { + LIBS_PRIVATE += -Wl,-force_load,$${api_library_path}$${QMAKE_DIR_SEP}lib$${api_library_name}.a diff --git a/recipes-qt/qt5/qtwebengine/0005-mkspecs-Allow-builds-with-libc-glibc.patch b/recipes-qt/qt5/qtwebengine/0005-mkspecs-Allow-builds-with-libc-glibc.patch new file mode 100644 index 00000000..9e0050dc --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/0005-mkspecs-Allow-builds-with-libc-glibc.patch @@ -0,0 +1,48 @@ +From addc1b0951db494fa42b141cf7e1c0f5d462e49a 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 +--- + src/buildtools/config/support.pri | 4 ---- + src/buildtools/configure.json | 4 +--- + 2 files changed, 1 insertion(+), 7 deletions(-) + +diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri +index e7f869a1..f9c9c24b 100644 +--- a/src/buildtools/config/support.pri ++++ b/src/buildtools/config/support.pri +@@ -191,10 +191,6 @@ defineTest(qtwebengine_checkForHostPkgCfg) { + + defineTest(qtwebengine_checkForGlibc) { + module = $$1 +- !qtConfig(webengine-system-glibc) { +- qtwebengine_skipBuild("A suitable version >= 2.27 of libc required to build $${module} could not be found.") +- return(false) +- } + return(true) + } + +diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json +index 812a91f9..a7c3d972 100644 +--- a/src/buildtools/configure.json ++++ b/src/buildtools/configure.json +@@ -373,7 +373,6 @@ + && (!config.sanitizer || features.webengine-sanitizer) + && (!config.linux || features.pkg-config) + && (!config.linux || features.webengine-host-pkg-config) +- && (!config.linux || features.webengine-system-glibc) + && (!config.linux || features.webengine-system-khr) + && (!config.linux || features.webengine-system-nss) + && (!config.linux || features.webengine-system-dbus) +@@ -770,8 +769,7 @@ + "webengine-system-fontconfig", + "webengine-system-dbus", + "webengine-system-nss", +- "webengine-system-khr", +- "webengine-system-glibc" ++ "webengine-system-khr" + ] + }, + { -- cgit v1.2.3 From a2882fecc96019781880c38fc6a81a9b71c944ad Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Thu, 29 Apr 2021 13:36:15 +0200 Subject: qtwebengine: few more fixes for gcc-11 Signed-off-by: Martin Jansa --- ...seil-cpp-mojo-perfetto-fix-build-with-gcc.patch | 84 ++++++++++++++++++++++ ...abseil-cpp-perfetto-fix-build-with-gcc-11.patch | 59 --------------- 2 files changed, 84 insertions(+), 59 deletions(-) create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0011-chromium-abseil-cpp-mojo-perfetto-fix-build-with-gcc.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0011-chromium-abseil-cpp-perfetto-fix-build-with-gcc-11.patch (limited to 'recipes-qt/qt5/qtwebengine') diff --git a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-abseil-cpp-mojo-perfetto-fix-build-with-gcc.patch b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-abseil-cpp-mojo-perfetto-fix-build-with-gcc.patch new file mode 100644 index 00000000..27b3d7d2 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-abseil-cpp-mojo-perfetto-fix-build-with-gcc.patch @@ -0,0 +1,84 @@ +From c6ff2c26ae6a1c7cde6685a697d8dafc6e2d2694 Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Thu, 29 Apr 2021 11:11:51 +0200 +Subject: [PATCH] chromium: abseil-cpp, mojo, perfetto: fix build with gcc-11 + +* fixes abseil-cpp: +FAILED: obj/third_party/abseil-cpp/absl/synchronization/graphcycles_internal/graphcycles.o +/OE/build/luneos-honister/webos-ports/tmp-glibc/work/core2-64-webos-linux/qtwebengine/5.15.3+gitAUTOINC+0930b350d7_687d322fae-r0/recipe-sysroot-native/usr/bin/x86_64-webos-linux/x86_64-webos-linux-g++ -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/OE/build/luneos-honister/webos-ports/tmp-glibc/work/core2-64-webos-linux/qtwebengine/5.15.3+gitAUTOINC+0930b350d7_687d322fae-r0/recipe-sysroot -MMD -MF obj/third_party/abseil-cpp/absl/synchronization/graphcycles_internal/graphcycles.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DCR_SYSROOT_HASH=5f64b417e1018dcf8fcc81dc2714e0f264b9b911 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DABSL_ALLOCATOR_NOTHROW=1 -Igen -I../../../../git/src/3rdparty/chromium -I../../../../git/src/3rdparty/chromium/third_party/abseil-cpp -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -m64 -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g1 -fvisibility=hidden -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -std=gnu++14 -fno-exceptions -fno-rtti --sysroot=../../../../recipe-sysroot -fvisibility-inlines-hidden -Wno-narrowing -Wno-class-memaccess -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -Wno-invalid-offsetof -Wno-return-type -Wno-deprecated-copy -c ../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc -o obj/third_party/abseil-cpp/absl/synchronization/graphcycles_internal/graphcycles.o +../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc: In member function 'void absl::synchronization_internal::GraphCycles::RemoveNode(void*)': +../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc:451:26: error: 'numeric_limits' is not a member of 'std' + 451 | if (x->version == std::numeric_limits::max()) { + | ^~~~~~~~~~~~~~ +../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc:451:49: error: expected primary-expression before '>' token + 451 | if (x->version == std::numeric_limits::max()) { + | ^ +../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc:451:52: error: '::max' has not been declared; did you mean 'std::max'? + 451 | if (x->version == std::numeric_limits::max()) { + | ^~~ + | std::max + +* mojo: +| FAILED: obj/mojo/public/cpp/platform/platform/named_platform_channel_posix.o +| /OE/build/oe-core/tmp-musl/work/core2-64-oe-linux-musl/qtwebengine/5.15.4+gitAUTOINC+be49f438d6_6c7b4ffb3f-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux-musl/x86_64-oe-linux-musl-g++ -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 --sysroot=/OE/build/oe-core/tmp-musl/work/core2-64-oe-linux-musl/qtwebengine/5.15.4+gitAUTOINC+be49f438d6_6c7b4ffb3f-r0/recipe-sysroot -MMD -MF obj/mojo/public/cpp/platform/platform/named_platform_channel_posix.o.d -DIS_MOJO_CPP_PLATFORM_IMPL -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCR_SYSROOT_HASH=5f64b417e1018dcf8fcc81dc2714e0f264b9b911 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -I../../../../git/src/3rdparty/chromium -I../../../../git/src/3rdparty/chromium/third_party/perfetto/include -Igen/third_party/perfetto/build_config -Igen/third_party/perfetto -Igen -I../../../../git/src/3rdparty/chromium/third_party/abseil-cpp -I../../../../git/src/3rdparty/chromium/third_party/boringssl/src/include -I../../../../git/src/3rdparty/chromium/third_party/protobuf/src -Igen/protoc_out -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -m64 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g1 -fvisibility=hidden -std=gnu++14 -Wno-narrowing -Wno-class-memaccess -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -Wno-invalid-offsetof -Wno-return-type -Wno-deprecated-copy -fno-exceptions -fno-rtti --sysroot=../../../../recipe-sysroot -fvisibility-inlines-hidden -c ../../../../git/src/3rdparty/chromium/mojo/public/cpp/platform/named_platform_channel_posix.cc -o obj/mojo/public/cpp/platform/platform/named_platform_channel_posix.o +| ../../../../git/src/3rdparty/chromium/mojo/public/cpp/platform/named_platform_channel_posix.cc: In function 'bool mojo::{anonymous}::MakeUnixAddr(const ServerName&, sockaddr_un*, size_t*)': +| ../../../../git/src/3rdparty/chromium/mojo/public/cpp/platform/named_platform_channel_posix.cc:53:3: error: 'strncpy' was not declared in this scope +| 53 | strncpy(unix_addr->sun_path, server_name.c_str(), kMaxSocketNameLength); +| | ^~~~~~~ +| ../../../../git/src/3rdparty/chromium/mojo/public/cpp/platform/named_platform_channel_posix.cc:18:1: note: 'strncpy' is defined in header ''; did you forget to '#include '? +| 17 | #include "base/strings/string_number_conversions.h" +| +++ |+#include +| 18 | + +* and perfetto: +../../../../git/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h:256:34: error: no member named 'numeric_limits' in namespace 'std' + PERFETTO_DCHECK(value < std::numeric_limits::max()); + +This is because its missing right header which perhaps is included +implicitly in older compilers + +Upstream-Status: Pending +Signed-off-by: Khem Raj +Signed-off-by: Martin Jansa +--- + .../mojo/public/cpp/platform/named_platform_channel_posix.cc | 1 + + .../abseil-cpp/absl/synchronization/internal/graphcycles.cc | 1 + + .../perfetto/src/trace_processor/containers/string_pool.h | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/chromium/mojo/public/cpp/platform/named_platform_channel_posix.cc b/chromium/mojo/public/cpp/platform/named_platform_channel_posix.cc +index 9082ac4da59..d039ff83a35 100644 +--- a/chromium/mojo/public/cpp/platform/named_platform_channel_posix.cc ++++ b/chromium/mojo/public/cpp/platform/named_platform_channel_posix.cc +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + + #include "base/files/file_util.h" + #include "base/files/scoped_file.h" +diff --git a/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc b/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +index 19f9aab5b1a..ab9d7f80bc7 100644 +--- a/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc ++++ b/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +@@ -36,6 +36,7 @@ + #include "absl/synchronization/internal/graphcycles.h" + + #include ++#include + #include + #include "absl/base/internal/hide_ptr.h" + #include "absl/base/internal/raw_logging.h" +diff --git a/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h b/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h +index 11ae91cfeca..558ff00e8fe 100644 +--- a/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h ++++ b/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h +@@ -20,6 +20,7 @@ + #include + #include + ++#include + #include + #include + diff --git a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-abseil-cpp-perfetto-fix-build-with-gcc-11.patch b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-abseil-cpp-perfetto-fix-build-with-gcc-11.patch deleted file mode 100644 index 9388c767..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-abseil-cpp-perfetto-fix-build-with-gcc-11.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 504691a6e2ab928115cde1f6163661158151636b Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Thu, 29 Apr 2021 11:11:51 +0200 -Subject: [PATCH] chromium: abseil-cpp, perfetto: fix build with gcc-11 - -* fixes abseil-cpp: -FAILED: obj/third_party/abseil-cpp/absl/synchronization/graphcycles_internal/graphcycles.o -/OE/build/luneos-honister/webos-ports/tmp-glibc/work/core2-64-webos-linux/qtwebengine/5.15.3+gitAUTOINC+0930b350d7_687d322fae-r0/recipe-sysroot-native/usr/bin/x86_64-webos-linux/x86_64-webos-linux-g++ -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=/OE/build/luneos-honister/webos-ports/tmp-glibc/work/core2-64-webos-linux/qtwebengine/5.15.3+gitAUTOINC+0930b350d7_687d322fae-r0/recipe-sysroot -MMD -MF obj/third_party/abseil-cpp/absl/synchronization/graphcycles_internal/graphcycles.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -DCR_SYSROOT_HASH=5f64b417e1018dcf8fcc81dc2714e0f264b9b911 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DABSL_ALLOCATOR_NOTHROW=1 -Igen -I../../../../git/src/3rdparty/chromium -I../../../../git/src/3rdparty/chromium/third_party/abseil-cpp -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pipe -pthread -m64 -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g1 -fvisibility=hidden -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-packed-not-aligned -Wno-dangling-else -Wno-missing-field-initializers -Wno-unused-parameter -std=gnu++14 -fno-exceptions -fno-rtti --sysroot=../../../../recipe-sysroot -fvisibility-inlines-hidden -Wno-narrowing -Wno-class-memaccess -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -Wno-invalid-offsetof -Wno-return-type -Wno-deprecated-copy -c ../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc -o obj/third_party/abseil-cpp/absl/synchronization/graphcycles_internal/graphcycles.o -../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc: In member function 'void absl::synchronization_internal::GraphCycles::RemoveNode(void*)': -../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc:451:26: error: 'numeric_limits' is not a member of 'std' - 451 | if (x->version == std::numeric_limits::max()) { - | ^~~~~~~~~~~~~~ -../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc:451:49: error: expected primary-expression before '>' token - 451 | if (x->version == std::numeric_limits::max()) { - | ^ -../../../../git/src/3rdparty/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc:451:52: error: '::max' has not been declared; did you mean 'std::max'? - 451 | if (x->version == std::numeric_limits::max()) { - | ^~~ - | std::max - -* and perfetto: -../../../../git/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h:256:34: error: no member named 'numeric_limits' in namespace 'std' - PERFETTO_DCHECK(value < std::numeric_limits::max()); - -This is because its missing right header which perhaps is included -implicitly in older compilers - -Upstream-Status: Pending -Signed-off-by: Khem Raj -Signed-off-by: Martin Jansa ---- - .../abseil-cpp/absl/synchronization/internal/graphcycles.cc | 1 + - .../perfetto/src/trace_processor/containers/string_pool.h | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc b/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc -index 19f9aab5b1a..ab9d7f80bc7 100644 ---- a/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc -+++ b/chromium/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc -@@ -36,6 +36,7 @@ - #include "absl/synchronization/internal/graphcycles.h" - - #include -+#include - #include - #include "absl/base/internal/hide_ptr.h" - #include "absl/base/internal/raw_logging.h" -diff --git a/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h b/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h -index 11ae91cfeca..558ff00e8fe 100644 ---- a/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h -+++ b/chromium/third_party/perfetto/src/trace_processor/containers/string_pool.h -@@ -20,6 +20,7 @@ - #include - #include - -+#include - #include - #include - -- cgit v1.2.3