From 8d2e1b401987d743ebdf964927c03f41e8f60328 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Wed, 3 Jul 2019 15:01:08 +0300 Subject: qt5: Upgrade to Qt 5.13.0 Update recipes for Qt 5.13.0, add new recipes for Qt modules qtcoap and qtlottie, and remove qtcanvas3d. Signed-off-by: Samuli Piippo --- recipes-qt/qt5/qtwebengine_git.bb | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'recipes-qt/qt5/qtwebengine_git.bb') diff --git a/recipes-qt/qt5/qtwebengine_git.bb b/recipes-qt/qt5/qtwebengine_git.bb index 84fcfbfb..a281cba2 100644 --- a/recipes-qt/qt5/qtwebengine_git.bb +++ b/recipes-qt/qt5/qtwebengine_git.bb @@ -132,7 +132,7 @@ RDEPENDS_${PN}-examples += " \ qtdeclarative-qmlplugins \ " -QT_MODULE_BRANCH_CHROMIUM = "69-based" +QT_MODULE_BRANCH_CHROMIUM = "73-based" # Patches from https://github.com/meta-qt5/qtwebengine/commits/b5.12 # 5.12.meta-qt5.4 @@ -148,12 +148,9 @@ SRC_URI_append_libc-musl = "\ # Patches from https://github.com/meta-qt5/qtwebengine-chromium/commits/69-based # 69-based.meta-qt5.4 SRC_URI += " \ - file://chromium/0001-chromium-Force-host-toolchain-configuration.patch;patchdir=src/3rdparty \ file://chromium/0002-chromium-workaround-for-too-long-.rps-file-name.patch;patchdir=src/3rdparty \ - file://chromium/0003-chromium-Fix-build-with-gcc8.patch;patchdir=src/3rdparty \ file://chromium/0004-chromium-stack-pointer-clobber.patch;patchdir=src/3rdparty \ file://chromium/0019-chromium-fix-build-with-clang.patch;patchdir=src/3rdparty \ - file://chromium/0020-chromium-Check-for-__ARM_FP-2-before-using-__fp16.patch;patchdir=src/3rdparty \ file://chromium/0021-chromium-Exclude-CRC32-for-32bit-arm.patch;patchdir=src/3rdparty \ file://chromium/0022-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch;patchdir=src/3rdparty \ " @@ -175,8 +172,8 @@ SRC_URI_append_libc-musl = "\ file://chromium/0018-chromium-musl-pread-pwrite.patch;patchdir=src/3rdparty \ " -SRCREV_qtwebengine = "c7b8d6d87809253241913c595902a11ea506b2b7" -SRCREV_chromium = "4c7ecce30045daf172dceaeeb86351f60cc91990" +SRCREV_qtwebengine = "5d4bac57a0191287a2fc345f6b398fb1f5d08517" +SRCREV_chromium = "8a28c0bb19fc8627812cb7c3154408b71ff2bf5e" SRCREV = "${SRCREV_qtwebengine}" SRCREV_FORMAT = "qtwebengine_chromium" -- cgit v1.2.3-54-g00ecf From c8b3085aa4b0030d6ef07b4703763692c2c58ec0 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Tue, 16 Jul 2019 10:22:32 +0000 Subject: qtwebengine: refresh the patches to apply * 4 musl patches didn't apply at all * 0015-chromium-musl-include-asm-generic-ioctl.h-for-TCGETS.patch is dropped, because whole chromium/device/serial/serial_io_handler_posix.cc was removed in upgrade to 73: commit 38a9a29f4f9436cace7f0e7abf9c586057df8a4e Author: Allan Sandfeld Jensen Date: Wed Feb 13 16:23:34 2019 +0100 Subject: BASELINE: Update Chromium to 73.0.3683.37 Signed-off-by: Martin Jansa --- .../0001-Force-host-toolchain-configuration.patch | 8 +- ...use-pvalloc-as-it-s-not-available-on-musl.patch | 2 +- .../0003-musl-link-against-libexecinfo.patch | 6 +- ...um-workaround-for-too-long-.rps-file-name.patch | 42 ++++++++++ .../0002-chromium-stack-pointer-clobber.patch | 67 ++++++++++++++++ ...um-workaround-for-too-long-.rps-file-name.patch | 42 ---------- .../0003-chromium-fix-build-with-clang.patch | 91 ++++++++++++++++++++++ ...0004-chromium-Exclude-CRC32-for-32bit-arm.patch | 33 ++++++++ .../0004-chromium-stack-pointer-clobber.patch | 67 ---------------- ...-not-try-to-set-the-guessed-values-for-ma.patch | 38 +++++++++ ...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-Use-correct-member-name-__si_fields-fr.patch | 24 ------ ...sl-allocator-Do-not-include-glibc_weak_sy.patch | 24 ++++++ ...sl-Define-res_ninit-and-res_nclose-for-no.patch | 79 ------------------- ...sl-Use-correct-member-name-__si_fields-fr.patch | 24 ++++++ ...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-include-asm-generic-ioctl.h-for-TCGETS.patch | 22 ------ ...sl-Use-_fpstate-instead-of-_libc_fpstate-.patch | 4 +- ...sl-elf_reader.cc-include-sys-reg.h-to-get.patch | 2 +- .../chromium/0018-chromium-musl-pread-pwrite.patch | 2 +- .../0019-chromium-fix-build-with-clang.patch | 91 ---------------------- ...0021-chromium-Exclude-CRC32-for-32bit-arm.patch | 33 -------- ...-not-try-to-set-the-guessed-values-for-ma.patch | 41 ---------- recipes-qt/qt5/qtwebengine_git.bb | 39 +++++----- 38 files changed, 694 insertions(+), 720 deletions(-) create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0001-chromium-workaround-for-too-long-.rps-file-name.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0002-chromium-stack-pointer-clobber.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0002-chromium-workaround-for-too-long-.rps-file-name.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0003-chromium-fix-build-with-clang.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Exclude-CRC32-for-32bit-arm.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0004-chromium-stack-pointer-clobber.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0005-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0006-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0006-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-include-fcntl.h-for-loff_t.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-include-fcntl.h-for-loff_t.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-use-off64_t-instead-of-the-internal-__.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-linux-glibc-make-the-distinction.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-use-off64_t-instead-of-the-internal-__.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-linux-glibc-make-the-distinction.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-Use-correct-member-name-__si_fields-fr.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Use-correct-member-name-__si_fields-fr.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Do-not-define-__sbrk-on-musl.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-Adjust-default-pthread-stack-size.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-Do-not-define-__sbrk-on-musl.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-Adjust-default-pthread-stack-size.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-include-asm-generic-ioctl.h-for-TCGETS.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0019-chromium-fix-build-with-clang.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0021-chromium-Exclude-CRC32-for-32bit-arm.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0022-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch (limited to 'recipes-qt/qt5/qtwebengine_git.bb') 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 d15af51e..610b703f 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 eb0b90b8809a8d8bd76999056d74d433a6c23184 Mon Sep 17 00:00:00 2001 +From 468ed461a955cc1ab3d890178546b79b9d001de9 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 @@ -58,7 +58,7 @@ index dd0d3e32..6312c867 100644 " nm = \"$$which(nm)\" " \ " toolchain_args = { " \ diff --git a/src/buildtools/gn.pro b/src/buildtools/gn.pro -index b6bf9cf..ae419b1 100644 +index b6bf9cfc..ae419b1a 100644 --- a/src/buildtools/gn.pro +++ b/src/buildtools/gn.pro @@ -19,8 +19,8 @@ build_pass|!debug_and_release { @@ -73,10 +73,10 @@ index b6bf9cf..ae419b1 100644 msvc:!clang_cl: gn_gen_args += --use-lto diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri -index 95b7a4b..db0658e 100644 +index fcce4c31..e3384e58 100644 --- a/src/core/config/linux.pri +++ b/src/core/config/linux.pri -@@ -116,7 +116,7 @@ contains(QT_ARCH, "mips") { +@@ -117,7 +117,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 07092012..96c9d101 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 b3125c1b3f32915aa80acf58a9d1eeab4e260b17 Mon Sep 17 00:00:00 2001 +From cdebd3f7775cfae7ac797774c63478d55d5b60ea 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 6dc7f0cb..e3d3c9bb 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 983ba7f8f80165ade5347544f1e975bd6b67549e Mon Sep 17 00:00:00 2001 +From 7b2e6cae9afa28571ccdc2a9224fb86caa88cd29 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,10 +10,10 @@ 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 3b5d37f2..0882d5fd 100644 +index 2bfbc65b..7134a5d7 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro -@@ -51,7 +51,7 @@ linux { +@@ -52,7 +52,7 @@ linux { POST_TARGETDEPS += $$NINJA_TARGETDEPS 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 new file mode 100644 index 00000000..97b09e70 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0001-chromium-workaround-for-too-long-.rps-file-name.patch @@ -0,0 +1,42 @@ +From f3345ad713ae81e4f914084b089ca7983bb76581 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 + +Ninja may fail when the build directory is too long: + +ninja: error: WriteFile(__third_party_WebKit_Source_bindings_modules_\ +interfaces_info_individual_modules__home_qt_work_build_build-nitrogen\ +6x_tmp_work_cortexa9hf-neon-mx6qdl-poky-linux-gnueabi_qtwebengine_5.9\ +.0_gitAUTOINC_29afdb0a34_049134677a-r0_build_src_toolchain_target__ru\ +le.rsp): Unable to create file. File name too long + +Task-number: QTBUG-59769 +Change-Id: I73c5e64ae5174412be2a675e35b0b6047f2bf4c1 +--- + gn/tools/gn/ninja_action_target_writer.cc | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/gn/tools/gn/ninja_action_target_writer.cc b/gn/tools/gn/ninja_action_target_writer.cc +index 7e945c0de0e..3deb587668c 100644 +--- a/gn/tools/gn/ninja_action_target_writer.cc ++++ b/gn/tools/gn/ninja_action_target_writer.cc +@@ -118,9 +118,18 @@ std::string NinjaActionTargetWriter::WriteRuleDefinition() { + // strictly necessary for regular one-shot actions, but it's easier to + // just always define unique_name. + std::string rspfile = custom_rule_name; ++ ++ //quick workaround if filename length > 255 - ".rsp", just cut the dirs starting from the end ++ //please note ".$unique_name" is not used at the moment ++ int pos = 0; ++ std::string delimiter("_"); ++ while (rspfile.length() > 250 && (pos = rspfile.find_last_of(delimiter)) != std::string::npos) ++ rspfile = rspfile.substr(0,pos); ++ + if (!target_->sources().empty()) + rspfile += ".$unique_name"; + rspfile += ".rsp"; ++ + out_ << " rspfile = " << rspfile << std::endl; + + // Response file contents. 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 new file mode 100644 index 00000000..295b18e0 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-stack-pointer-clobber.patch @@ -0,0 +1,67 @@ +From 079403c8f4e9fc5e1ea81dcd7fa126b351c91094 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 | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/chromium/third_party/lss/linux_syscall_support.h b/chromium/third_party/lss/linux_syscall_support.h +index 5d9c2e8582f..e19e51dd304 100644 +--- a/chromium/third_party/lss/linux_syscall_support.h ++++ b/chromium/third_party/lss/linux_syscall_support.h +@@ -1964,7 +1964,7 @@ struct kernel_statfs { + __asm__ volatile(LSS_ENTRYPOINT \ + : "=a" (__res) \ + : "0" (__NR_##name) \ +- : "esp", "memory"); \ ++ : "memory"); \ + LSS_RETURN(type,__res); \ + } + #undef _syscall1 +@@ -2012,7 +2012,7 @@ struct kernel_statfs { + : "i" (__NR_##name), "ri" ((long)(arg1)), \ + "c" ((long)(arg2)), "d" ((long)(arg3)), \ + "S" ((long)(arg4)), "D" ((long)(arg5)) \ +- : "esp", "memory"); \ ++ : "memory"); \ + LSS_RETURN(type,__res); \ + } + #undef _syscall6 +@@ -2034,7 +2034,7 @@ struct kernel_statfs { + : "i" (__NR_##name), "0" ((long)(&__s)), \ + "c" ((long)(arg2)), "d" ((long)(arg3)), \ + "S" ((long)(arg4)), "D" ((long)(arg5)) \ +- : "esp", "memory"); \ ++ : "memory"); \ + LSS_RETURN(type,__res); \ + } + LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, +@@ -2120,7 +2120,7 @@ struct kernel_statfs { + : "0"(-EINVAL), "i"(__NR_clone), + "m"(fn), "m"(child_stack), "m"(flags), "m"(arg), + "m"(parent_tidptr), "m"(newtls), "m"(child_tidptr) +- : "esp", "memory", "ecx", "edx", "esi", "edi"); ++ : "memory", "ecx", "edx", "esi", "edi"); + LSS_RETURN(int, __res); + } + +@@ -2405,7 +2405,7 @@ struct kernel_statfs { + "d"(LSS_SYSCALL_ARG(parent_tidptr)), + "r"(LSS_SYSCALL_ARG(newtls)), + "r"(LSS_SYSCALL_ARG(child_tidptr)) +- : "rsp", "memory", "r8", "r10", "r11", "rcx"); ++ : "memory", "r8", "r10", "r11", "rcx"); + } + LSS_RETURN(int, __res); + } diff --git a/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-workaround-for-too-long-.rps-file-name.patch b/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-workaround-for-too-long-.rps-file-name.patch deleted file mode 100644 index 0b4c1a33..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-workaround-for-too-long-.rps-file-name.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 0bf810937f9340c19d1a085eed04d4a209c17d23 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 - -Ninja may fail when the build directory is too long: - -ninja: error: WriteFile(__third_party_WebKit_Source_bindings_modules_\ -interfaces_info_individual_modules__home_qt_work_build_build-nitrogen\ -6x_tmp_work_cortexa9hf-neon-mx6qdl-poky-linux-gnueabi_qtwebengine_5.9\ -.0_gitAUTOINC_29afdb0a34_049134677a-r0_build_src_toolchain_target__ru\ -le.rsp): Unable to create file. File name too long - -Task-number: QTBUG-59769 -Change-Id: I73c5e64ae5174412be2a675e35b0b6047f2bf4c1 ---- - gn/tools/gn/ninja_action_target_writer.cc | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/gn/tools/gn/ninja_action_target_writer.cc b/gn/tools/gn/ninja_action_target_writer.cc -index 7e945c0de0e..3deb587668c 100644 ---- a/gn/tools/gn/ninja_action_target_writer.cc -+++ b/gn/tools/gn/ninja_action_target_writer.cc -@@ -118,9 +118,18 @@ std::string NinjaActionTargetWriter::WriteRuleDefinition() { - // strictly necessary for regular one-shot actions, but it's easier to - // just always define unique_name. - std::string rspfile = custom_rule_name; -+ -+ //quick workaround if filename length > 255 - ".rsp", just cut the dirs starting from the end -+ //please note ".$unique_name" is not used at the moment -+ int pos = 0; -+ std::string delimiter("_"); -+ while (rspfile.length() > 250 && (pos = rspfile.find_last_of(delimiter)) != std::string::npos) -+ rspfile = rspfile.substr(0,pos); -+ - if (!target_->sources().empty()) - rspfile += ".$unique_name"; - rspfile += ".rsp"; -+ - out_ << " rspfile = " << rspfile << std::endl; - - // Response file contents. 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 new file mode 100644 index 00000000..cc534fad --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-fix-build-with-clang.patch @@ -0,0 +1,91 @@ +From f290da1132af09f4cba13d5e551c75621b623247 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 dbf94c9ab6b..6f2eff6f5ef 100644 +--- a/chromium/build/config/compiler/BUILD.gn ++++ b/chromium/build/config/compiler/BUILD.gn +@@ -570,13 +570,6 @@ config("compiler") { + } + } + +- # Tells the compiler not to use absolute paths when passing the default +- # paths to the tools it invokes. We don't want this because we don't +- # really need it and it can mess up the goma cache entries. +- if (is_clang && !is_nacl) { +- cflags += [ "-no-canonical-prefixes" ] +- } +- + # C11/C++11 compiler flags setup. + # --------------------------- + if (is_linux || is_android || (is_nacl && is_clang) || current_os == "aix") { +@@ -815,8 +808,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 += [ +@@ -829,8 +820,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" ] +@@ -839,9 +828,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" ] +@@ -920,10 +906,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" ] + } +@@ -970,9 +953,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 += [ +@@ -1029,10 +1009,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", 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 new file mode 100644 index 00000000..e54cdc6b --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-Exclude-CRC32-for-32bit-arm.patch @@ -0,0 +1,33 @@ +From 3cacf1082e11c8047a42eb74dfa0e34f37995d92 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 458f428b7ce..18b4f23f769 100644 +--- a/chromium/third_party/zlib/BUILD.gn ++++ b/chromium/third_party/zlib/BUILD.gn +@@ -74,8 +74,11 @@ if (use_arm_neon_optimizations) { + # implement the CRC32* instructions. These are optional in ARMv8.0." + # - Fuchsia just added a syscall for feature detection. + # TODO(cavalcantii): crbug.com/810125. ++ defines = [] + if (is_clang && (!is_ios && !is_fuchsia)) { +- 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/0004-chromium-stack-pointer-clobber.patch b/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-stack-pointer-clobber.patch deleted file mode 100644 index 8490ed7c..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-stack-pointer-clobber.patch +++ /dev/null @@ -1,67 +0,0 @@ -From a355be3c293984932bd6d858b5773e511a18fcf4 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 | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/chromium/third_party/lss/linux_syscall_support.h b/chromium/third_party/lss/linux_syscall_support.h -index 5d9c2e8582f..e19e51dd304 100644 ---- a/chromium/third_party/lss/linux_syscall_support.h -+++ b/chromium/third_party/lss/linux_syscall_support.h -@@ -1964,7 +1964,7 @@ struct kernel_statfs { - __asm__ volatile(LSS_ENTRYPOINT \ - : "=a" (__res) \ - : "0" (__NR_##name) \ -- : "esp", "memory"); \ -+ : "memory"); \ - LSS_RETURN(type,__res); \ - } - #undef _syscall1 -@@ -2012,7 +2012,7 @@ struct kernel_statfs { - : "i" (__NR_##name), "ri" ((long)(arg1)), \ - "c" ((long)(arg2)), "d" ((long)(arg3)), \ - "S" ((long)(arg4)), "D" ((long)(arg5)) \ -- : "esp", "memory"); \ -+ : "memory"); \ - LSS_RETURN(type,__res); \ - } - #undef _syscall6 -@@ -2034,7 +2034,7 @@ struct kernel_statfs { - : "i" (__NR_##name), "0" ((long)(&__s)), \ - "c" ((long)(arg2)), "d" ((long)(arg3)), \ - "S" ((long)(arg4)), "D" ((long)(arg5)) \ -- : "esp", "memory"); \ -+ : "memory"); \ - LSS_RETURN(type,__res); \ - } - LSS_INLINE int LSS_NAME(clone)(int (*fn)(void *), void *child_stack, -@@ -2120,7 +2120,7 @@ struct kernel_statfs { - : "0"(-EINVAL), "i"(__NR_clone), - "m"(fn), "m"(child_stack), "m"(flags), "m"(arg), - "m"(parent_tidptr), "m"(newtls), "m"(child_tidptr) -- : "esp", "memory", "ecx", "edx", "esi", "edi"); -+ : "memory", "ecx", "edx", "esi", "edi"); - LSS_RETURN(int, __res); - } - -@@ -2405,7 +2405,7 @@ struct kernel_statfs { - "d"(LSS_SYSCALL_ARG(parent_tidptr)), - "r"(LSS_SYSCALL_ARG(newtls)), - "r"(LSS_SYSCALL_ARG(child_tidptr)) -- : "rsp", "memory", "r8", "r10", "r11", "rcx"); -+ : "memory", "r8", "r10", "r11", "rcx"); - } - LSS_RETURN(int, __res); - } 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 new file mode 100644 index 00000000..d8eca0c6 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch @@ -0,0 +1,38 @@ +From 27d1c407b98979445e216c6fd105e78014e928b1 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 6f2eff6f5ef..57a950a435a 100644 +--- a/chromium/build/config/compiler/BUILD.gn ++++ b/chromium/build/config/compiler/BUILD.gn +@@ -809,15 +809,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-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch b/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch deleted file mode 100644 index 3389d69b..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 2297089fdb32aca352802b1c7b044d0441f54165 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 66f68ef1387..9284d0d4fc5 100644 ---- a/chromium/sandbox/linux/suid/sandbox.c -+++ b/chromium/sandbox/linux/suid/sandbox.c -@@ -44,6 +44,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/0006-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch b/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch deleted file mode 100644 index 45c8c8d0..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 80cf8eb756140011f358522378d640587600976a Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 7 Jul 2017 14:09:06 -0700 -Subject: [PATCH] chromium: musl: Avoid mallinfo() APIs on non-glibc/linux - -Signed-off-by: Khem Raj ---- - chromium/base/process/process_metrics_posix.cc | 4 ++-- - chromium/base/trace_event/malloc_dump_provider.cc | 2 ++ - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/chromium/base/process/process_metrics_posix.cc b/chromium/base/process/process_metrics_posix.cc -index a09bbf2c56e..b309f6b694e 100644 ---- a/chromium/base/process/process_metrics_posix.cc -+++ b/chromium/base/process/process_metrics_posix.cc -@@ -100,14 +100,14 @@ size_t ProcessMetrics::GetMallocUsage() { - malloc_statistics_t stats = {0}; - malloc_zone_statistics(nullptr, &stats); - return stats.size_in_use; --#elif defined(OS_LINUX) || defined(OS_ANDROID) -+#elif defined(__GLIBC__) || defined(OS_ANDROID) - struct mallinfo minfo = mallinfo(); - #if defined(USE_TCMALLOC) - return minfo.uordblks; - #else - return minfo.hblkhd + minfo.arena; - #endif --#elif defined(OS_FUCHSIA) -+#else - // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. - return 0; - #endif -diff --git a/chromium/base/trace_event/malloc_dump_provider.cc b/chromium/base/trace_event/malloc_dump_provider.cc -index 46fdb3e2146..27936e6b200 100644 ---- a/chromium/base/trace_event/malloc_dump_provider.cc -+++ b/chromium/base/trace_event/malloc_dump_provider.cc -@@ -77,6 +77,7 @@ MallocDumpProvider::~MallocDumpProvider() = default; - // the current process. - bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, - ProcessMemoryDump* pmd) { -+#if defined(__GLIBC__) - { - base::AutoLock auto_lock(emit_metrics_on_memory_dump_lock_); - if (!emit_metrics_on_memory_dump_) -@@ -172,6 +173,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, - MemoryAllocatorDump::kUnitsBytes, - resident_size - allocated_objects_size); - } -+#endif // __GLIBC__ - return true; - } - diff --git a/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch b/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch new file mode 100644 index 00000000..2972dc6b --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch @@ -0,0 +1,33 @@ +From c665cc484556b07aec52fcb1d6851881b646450d 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/0007-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch b/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch new file mode 100644 index 00000000..d3e168f2 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch @@ -0,0 +1,52 @@ +From 136539399b9c3c9d2b52a0f789c045ca215682e2 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 14:09:06 -0700 +Subject: [PATCH] chromium: musl: Avoid mallinfo() APIs on non-glibc/linux + +Signed-off-by: Khem Raj +--- + chromium/base/process/process_metrics_posix.cc | 4 ++-- + chromium/base/trace_event/malloc_dump_provider.cc | 2 ++ + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/chromium/base/process/process_metrics_posix.cc b/chromium/base/process/process_metrics_posix.cc +index a09bbf2c56e..b309f6b694e 100644 +--- a/chromium/base/process/process_metrics_posix.cc ++++ b/chromium/base/process/process_metrics_posix.cc +@@ -100,14 +100,14 @@ size_t ProcessMetrics::GetMallocUsage() { + malloc_statistics_t stats = {0}; + malloc_zone_statistics(nullptr, &stats); + return stats.size_in_use; +-#elif defined(OS_LINUX) || defined(OS_ANDROID) ++#elif defined(__GLIBC__) || defined(OS_ANDROID) + struct mallinfo minfo = mallinfo(); + #if defined(USE_TCMALLOC) + return minfo.uordblks; + #else + return minfo.hblkhd + minfo.arena; + #endif +-#elif defined(OS_FUCHSIA) ++#else + // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. + return 0; + #endif +diff --git a/chromium/base/trace_event/malloc_dump_provider.cc b/chromium/base/trace_event/malloc_dump_provider.cc +index 0077d8b0aec..c69f893f4e9 100644 +--- a/chromium/base/trace_event/malloc_dump_provider.cc ++++ b/chromium/base/trace_event/malloc_dump_provider.cc +@@ -77,6 +77,7 @@ MallocDumpProvider::~MallocDumpProvider() = default; + // the current process. + bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, + ProcessMemoryDump* pmd) { ++#if defined(__GLIBC__) + { + base::AutoLock auto_lock(emit_metrics_on_memory_dump_lock_); + if (!emit_metrics_on_memory_dump_) +@@ -172,6 +173,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, + MemoryAllocatorDump::kUnitsBytes, + resident_size - allocated_objects_size); + } ++#endif // __GLIBC__ + return true; + } + diff --git a/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-include-fcntl.h-for-loff_t.patch b/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-include-fcntl.h-for-loff_t.patch deleted file mode 100644 index 557aa1ee..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-include-fcntl.h-for-loff_t.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 479ba4a1be5e24b1b2292554d5a9cbc519b41759 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 7 Jul 2017 14:37:49 -0700 -Subject: [PATCH] chromium: musl: include fcntl.h for loff_t - -Signed-off-by: Khem Raj ---- - .../tcmalloc/chromium/src/base/linux_syscall_support.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h b/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h -index 13aa415e250..9d1309b836f 100644 ---- a/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h -+++ b/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h -@@ -154,6 +154,7 @@ extern "C" { - #include - #include - #include -+#include - #include - #include - #include diff --git a/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-include-fcntl.h-for-loff_t.patch b/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-include-fcntl.h-for-loff_t.patch new file mode 100644 index 00000000..6c2a4bf7 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-include-fcntl.h-for-loff_t.patch @@ -0,0 +1,22 @@ +From 16488c99dd7d8f05cde58ca39df13c4a54c13d4a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 14:37:49 -0700 +Subject: [PATCH] chromium: musl: include fcntl.h for loff_t + +Signed-off-by: Khem Raj +--- + .../tcmalloc/chromium/src/base/linux_syscall_support.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h b/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h +index 13aa415e250..9d1309b836f 100644 +--- a/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h ++++ b/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h +@@ -154,6 +154,7 @@ extern "C" { + #include + #include + #include ++#include + #include + #include + #include diff --git a/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-use-off64_t-instead-of-the-internal-__.patch b/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-use-off64_t-instead-of-the-internal-__.patch deleted file mode 100644 index 7fef5e0f..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-use-off64_t-instead-of-the-internal-__.patch +++ /dev/null @@ -1,62 +0,0 @@ -From d4869cfc2ab0acdd81926346c1aa4fb067063ad3 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 2f6116fa45c..7486a05a272 100755 ---- 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 { - return sys_mmap(start, length, prot, flags, fd, offset); - } - -@@ -71,7 +71,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 -@@ -142,7 +142,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 -@@ -157,7 +157,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( -@@ -168,7 +168,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/0009-chromium-musl-linux-glibc-make-the-distinction.patch b/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-linux-glibc-make-the-distinction.patch deleted file mode 100644 index ff414d58..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-linux-glibc-make-the-distinction.patch +++ /dev/null @@ -1,23 +0,0 @@ -From bc9f2d7094ad59da25d0ca58a170ef4a8e448559 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 a17ff217331..9f6175ad1de 100644 ---- a/chromium/base/allocator/allocator_check.cc -+++ b/chromium/base/allocator/allocator_check.cc -@@ -27,7 +27,7 @@ bool IsAllocatorInitialized() { - // Set by allocator_shim_override_ucrt_symbols_win.h when the - // shimmed _set_new_mode() is called. - return g_is_win_shim_layer_initialized; --#elif defined(OS_LINUX) && defined(USE_TCMALLOC) && \ -+#elif defined(__GLIBC__) && defined(USE_TCMALLOC) && \ - !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) - // From third_party/tcmalloc/chromium/src/gperftools/tcmalloc.h. - // TODO(primiano): replace with an include once base can depend on allocator. diff --git a/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-use-off64_t-instead-of-the-internal-__.patch b/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-use-off64_t-instead-of-the-internal-__.patch new file mode 100644 index 00000000..7c86f5d3 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-use-off64_t-instead-of-the-internal-__.patch @@ -0,0 +1,62 @@ +From 1f00a9e4b43c742768da46b7580c1d134f5beb37 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/0010-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch b/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch deleted file mode 100644 index 705d0d75..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch +++ /dev/null @@ -1,24 +0,0 @@ -From ea19d6ef223ed875c5db4e71167fc7a5349105aa 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 e919f094c37..414a21d32ad 100644 ---- a/chromium/base/allocator/allocator_shim.cc -+++ b/chromium/base/allocator/allocator_shim.cc -@@ -302,7 +302,7 @@ ALWAYS_INLINE void ShimFreeDefiniteSize(void* ptr, size_t size, void* context) { - // In the case of tcmalloc we also want to plumb into the glibc hooks - // to avoid that allocations made in glibc itself (e.g., strdup()) get - // accidentally performed on the glibc heap instead of the tcmalloc one. --#if defined(USE_TCMALLOC) -+#if defined(USE_TCMALLOC) && defined(__GLIBC__) - #include "base/allocator/allocator_shim_override_glibc_weak_symbols.h" - #endif - diff --git a/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-linux-glibc-make-the-distinction.patch b/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-linux-glibc-make-the-distinction.patch new file mode 100644 index 00000000..34d5456c --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-linux-glibc-make-the-distinction.patch @@ -0,0 +1,23 @@ +From 1e3a7fcca67a13bc79761d27c8abb5cd3bdb52a7 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 14:54:38 -0700 +Subject: [PATCH] chromium: musl: linux != glibc, make the distinction + +Signed-off-by: Khem Raj +--- + chromium/base/allocator/allocator_check.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/chromium/base/allocator/allocator_check.cc b/chromium/base/allocator/allocator_check.cc +index 5fb86467dde..9864858eb67 100644 +--- a/chromium/base/allocator/allocator_check.cc ++++ b/chromium/base/allocator/allocator_check.cc +@@ -27,7 +27,7 @@ bool IsAllocatorInitialized() { + // Set by allocator_shim_override_ucrt_symbols_win.h when the + // shimmed _set_new_mode() is called. + return g_is_win_shim_layer_initialized; +-#elif defined(OS_LINUX) && defined(USE_TCMALLOC) && \ ++#elif defined(__GLIBC__) && defined(USE_TCMALLOC) && \ + !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) + // From third_party/tcmalloc/chromium/src/gperftools/tcmalloc.h. + // TODO(primiano): replace with an include once base can depend on allocator. diff --git a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-Use-correct-member-name-__si_fields-fr.patch b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-Use-correct-member-name-__si_fields-fr.patch deleted file mode 100644 index be1cbeb9..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-Use-correct-member-name-__si_fields-fr.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 4070d0bee442e479c90f932162c3398c8f9e2328 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/0011-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch new file mode 100644 index 00000000..0ea63ea3 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch @@ -0,0 +1,24 @@ +From c67e75a89f9e5216eeb9e351b9a6b864f1d992ab Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 15:09:02 -0700 +Subject: [PATCH] chromium: musl: allocator: Do not include glibc_weak_symbols + for musl + +Signed-off-by: Khem Raj +--- + chromium/base/allocator/allocator_shim.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/chromium/base/allocator/allocator_shim.cc b/chromium/base/allocator/allocator_shim.cc +index 1233ae2a8aa..6f1b3e87224 100644 +--- a/chromium/base/allocator/allocator_shim.cc ++++ b/chromium/base/allocator/allocator_shim.cc +@@ -351,7 +351,7 @@ ALWAYS_INLINE void ShimAlignedFree(void* address, void* context) { + // In the case of tcmalloc we also want to plumb into the glibc hooks + // to avoid that allocations made in glibc itself (e.g., strdup()) get + // accidentally performed on the glibc heap instead of the tcmalloc one. +-#if defined(USE_TCMALLOC) ++#if defined(USE_TCMALLOC) && defined(__GLIBC__) + #include "base/allocator/allocator_shim_override_glibc_weak_symbols.h" + #endif + diff --git a/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch deleted file mode 100644 index 984ceeed..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch +++ /dev/null @@ -1,79 +0,0 @@ -From 399c5fee7c38d80c43211fc75dc4486527097fa2 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 06e9d7969c0..8e18a297a96 100644 ---- a/chromium/net/dns/dns_config_service_posix.cc -+++ b/chromium/net/dns/dns_config_service_posix.cc -@@ -27,6 +27,10 @@ - #include "net/dns/notify_watcher_mac.h" - #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 ad96f681ccd..334ff59ad75 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/0012-chromium-musl-Use-correct-member-name-__si_fields-fr.patch b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Use-correct-member-name-__si_fields-fr.patch new file mode 100644 index 00000000..1d25ed8c --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Use-correct-member-name-__si_fields-fr.patch @@ -0,0 +1,24 @@ +From 705bb6693c207516b9b96d217f9d417b8360c952 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/0013-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch new file mode 100644 index 00000000..2a162fec --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch @@ -0,0 +1,79 @@ +From f236c935f90cc338c8c8db68c08aa8fc2ca13406 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 15:27:50 -0700 +Subject: [PATCH] chromium: musl: Define res_ninit and res_nclose for non-glibc + platforms + +Signed-off-by: Khem Raj +--- + chromium/net/dns/dns_config_service_posix.cc | 4 +++ + chromium/net/dns/dns_reloader.cc | 4 +++ + chromium/net/dns/resolv_compat.h | 29 ++++++++++++++++++++ + 3 files changed, 37 insertions(+) + create mode 100644 chromium/net/dns/resolv_compat.h + +diff --git a/chromium/net/dns/dns_config_service_posix.cc b/chromium/net/dns/dns_config_service_posix.cc +index 31c564faeee..222ff65b6e1 100644 +--- a/chromium/net/dns/dns_config_service_posix.cc ++++ b/chromium/net/dns/dns_config_service_posix.cc +@@ -29,6 +29,10 @@ + #include "net/dns/public/dns_protocol.h" + #include "net/dns/serial_worker.h" + ++#if defined(OS_LINUX) && !defined(__GLIBC__) ++#include "net/dns/resolv_compat.h" ++#endif ++ + #if defined(OS_MACOSX) && !defined(OS_IOS) + #include "net/dns/dns_config_watcher_mac.h" + #endif +diff --git a/chromium/net/dns/dns_reloader.cc b/chromium/net/dns/dns_reloader.cc +index 03e248c9878..9ccda82c7e9 100644 +--- a/chromium/net/dns/dns_reloader.cc ++++ b/chromium/net/dns/dns_reloader.cc +@@ -9,6 +9,10 @@ + + #include + ++#if defined(OS_LINUX) && !defined(__GLIBC__) ++#include "net/dns/resolv_compat.h" ++#endif ++ + #include "base/lazy_instance.h" + #include "base/logging.h" + #include "base/macros.h" +diff --git a/chromium/net/dns/resolv_compat.h b/chromium/net/dns/resolv_compat.h +new file mode 100644 +index 00000000000..4f0e852a19d +--- /dev/null ++++ b/chromium/net/dns/resolv_compat.h +@@ -0,0 +1,29 @@ ++#if !defined(__GLIBC__) ++/*************************************************************************** ++ * resolv_compat.h ++ * ++ * Mimick GLIBC's res_ninit() and res_nclose() for musl libc ++ * Note: res_init() is actually deprecated according to ++ * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html ++ **************************************************************************/ ++#include ++ ++static inline int res_ninit(res_state statp) ++{ ++ int rc = res_init(); ++ if (statp != &_res) { ++ memcpy(statp, &_res, sizeof(*statp)); ++ } ++ return rc; ++} ++ ++static inline int res_nclose(res_state statp) ++{ ++ if (!statp) ++ return -1; ++ if (statp != &_res) { ++ memset(statp, 0, sizeof(*statp)); ++ } ++ return 0; ++} ++#endif diff --git a/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Do-not-define-__sbrk-on-musl.patch b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Do-not-define-__sbrk-on-musl.patch deleted file mode 100644 index 497382cc..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Do-not-define-__sbrk-on-musl.patch +++ /dev/null @@ -1,26 +0,0 @@ -From cb81d0f57b4ceb0f3ff0600fb72f4b53360c11f2 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 7486a05a272..610a10b659a 100755 ---- a/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h -+++ b/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h -@@ -206,7 +206,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/0014-chromium-musl-Adjust-default-pthread-stack-size.patch b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-Adjust-default-pthread-stack-size.patch deleted file mode 100644 index 4124f656..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-Adjust-default-pthread-stack-size.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 51a9cff6d78c2a744b6cbf77678aebb8dde7540c 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 190acedf7c5..343e1a8c61d 100644 ---- a/chromium/base/threading/platform_thread_linux.cc -+++ b/chromium/base/threading/platform_thread_linux.cc -@@ -173,7 +173,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 10f1c0df11f..8e86a2eb1e9 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. - --#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ - defined(OS_FUCHSIA) - // pthread_getattr_np() can fail if the thread is not invoked by - // pthread_create() (e.g., the main thread of webkit_unit_tests). -@@ -96,7 +96,7 @@ size_t GetUnderestimatedStackSize() { - } - - 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/0014-chromium-musl-Do-not-define-__sbrk-on-musl.patch b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-Do-not-define-__sbrk-on-musl.patch new file mode 100644 index 00000000..9cbb933c --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-Do-not-define-__sbrk-on-musl.patch @@ -0,0 +1,26 @@ +From b297eebffe2350a76945191e374f6012d1f0fc16 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/0015-chromium-musl-Adjust-default-pthread-stack-size.patch b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-Adjust-default-pthread-stack-size.patch new file mode 100644 index 00000000..b92235f8 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-Adjust-default-pthread-stack-size.patch @@ -0,0 +1,47 @@ +From b40a99156402f483f6defb234542f71234ab8ab4 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 277a7e9338d..2a6e060fa32 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 248f93968a6..4bc5ac692af 100644 +--- a/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc ++++ b/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc +@@ -30,7 +30,7 @@ size_t GetUnderestimatedStackSize() { + // FIXME: On Mac OSX and Linux, this method cannot estimate stack size + // correctly for the main thread. + +-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ + defined(OS_FUCHSIA) + // pthread_getattr_np() can fail if the thread is not invoked by + // pthread_create() (e.g., the main thread of webkit_unit_tests). +@@ -98,7 +98,7 @@ size_t GetUnderestimatedStackSize() { + } + + 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/0015-chromium-musl-include-asm-generic-ioctl.h-for-TCGETS.patch b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-include-asm-generic-ioctl.h-for-TCGETS.patch deleted file mode 100644 index c2127809..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-include-asm-generic-ioctl.h-for-TCGETS.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 57200f491a8a103fc6c33d1041cc6d12180b0a24 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 7 Jul 2017 17:15:34 -0700 -Subject: [PATCH] chromium: musl: include asm-generic/ioctl.h for TCGETS2 - -Signed-off-by: Khem Raj ---- - chromium/device/serial/serial_io_handler_posix.cc | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/chromium/device/serial/serial_io_handler_posix.cc b/chromium/device/serial/serial_io_handler_posix.cc -index d6ed5e1f889..b550f895ef5 100644 ---- a/chromium/device/serial/serial_io_handler_posix.cc -+++ b/chromium/device/serial/serial_io_handler_posix.cc -@@ -6,6 +6,7 @@ - - #include - #include -+#include - - #include "base/files/file_util.h" - #include "base/posix/eintr_wrapper.h" diff --git a/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch index d84bacab..c03fddc2 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch @@ -1,4 +1,4 @@ -From 40e96bb47b906ba3bd9a8b554124c8c3c6bebf86 Mon Sep 17 00:00:00 2001 +From 7def3e9107a6ba742936e038a4dd747613bcf1b6 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 @@ -14,7 +14,7 @@ Signed-off-by: Khem Raj 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc b/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc -index 052ce37cb44..95b0fb44e12 100644 +index 6ee6cc1e4cd..a8f9ccc72ac 100644 --- a/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc +++ b/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc @@ -49,7 +49,7 @@ uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { diff --git a/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch index 87849bc4..f2d39138 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch @@ -1,4 +1,4 @@ -From 1cc81d323479a164f5f64033b284658ef9c49e0b Mon Sep 17 00:00:00 2001 +From e5c0314a43a30f2cef8bb72560e2cec0ed603e01 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 diff --git a/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-pread-pwrite.patch b/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-pread-pwrite.patch index 4483ab1c..3d041d8a 100644 --- a/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-pread-pwrite.patch +++ b/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-pread-pwrite.patch @@ -1,4 +1,4 @@ -From d32ababfc7cfe3783c7600474487fba1ba4b805e Mon Sep 17 00:00:00 2001 +From f446867c2a65d20a62caf69248b48465b58d4046 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 diff --git a/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-fix-build-with-clang.patch b/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-fix-build-with-clang.patch deleted file mode 100644 index 7823482b..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-fix-build-with-clang.patch +++ /dev/null @@ -1,91 +0,0 @@ -From 249b99b4b54468b428a156f33e2a72066c82e9c2 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 d223a4f6fd4..1c42c49ea4a 100644 ---- a/chromium/build/config/compiler/BUILD.gn -+++ b/chromium/build/config/compiler/BUILD.gn -@@ -561,13 +561,6 @@ config("compiler") { - } - } - -- # Tells the compiler not to use absolute paths when passing the default -- # paths to the tools it invokes. We don't want this because we don't -- # really need it and it can mess up the goma cache entries. -- if (is_clang && !is_nacl) { -- cflags += [ "-no-canonical-prefixes" ] -- } -- - # C11/C++11 compiler flags setup. - # --------------------------- - if (is_linux || is_android || (is_nacl && is_clang) || current_os == "aix") { -@@ -799,8 +792,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 += [ -@@ -813,8 +804,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" ] -@@ -823,9 +812,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" ] -@@ -904,10 +890,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" ] - } -@@ -954,9 +937,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 += [ -@@ -1013,10 +993,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", diff --git a/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-Exclude-CRC32-for-32bit-arm.patch b/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-Exclude-CRC32-for-32bit-arm.patch deleted file mode 100644 index 9a080207..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0021-chromium-Exclude-CRC32-for-32bit-arm.patch +++ /dev/null @@ -1,33 +0,0 @@ -From b882013421036a05ea8c909292cc38d05fc29c89 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 05907b481ac..dbc4be143cd 100644 ---- a/chromium/third_party/zlib/BUILD.gn -+++ b/chromium/third_party/zlib/BUILD.gn -@@ -74,8 +74,11 @@ if (use_arm_neon_optimizations) { - # implement the CRC32* instructions. These are optional in ARMv8.0." - # - Fuchsia just added a syscall for feature detection. - # TODO(cavalcantii): crbug.com/810125. -+ defines = [] - if (is_clang && (!is_ios && !is_fuchsia)) { -- 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/0022-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch b/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch deleted file mode 100644 index 1e3f2c15..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0022-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 058158c568698f79c905c19e5ef32ca714f8223e Mon Sep 17 00:00:00 2001 -From: Johannes Pointner -Date: Fri, 3 May 2019 09:12:38 +0200 -Subject: [PATCH 1/1] 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 1c42c49ea4..e919e157d7 100644 ---- a/chromium/build/config/compiler/BUILD.gn -+++ b/chromium/build/config/compiler/BUILD.gn -@@ -742,15 +742,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) { - } --- -2.21.0 - diff --git a/recipes-qt/qt5/qtwebengine_git.bb b/recipes-qt/qt5/qtwebengine_git.bb index a281cba2..a0179059 100644 --- a/recipes-qt/qt5/qtwebengine_git.bb +++ b/recipes-qt/qt5/qtwebengine_git.bb @@ -134,8 +134,8 @@ RDEPENDS_${PN}-examples += " \ QT_MODULE_BRANCH_CHROMIUM = "73-based" -# Patches from https://github.com/meta-qt5/qtwebengine/commits/b5.12 -# 5.12.meta-qt5.4 +# Patches from https://github.com/meta-qt5/qtwebengine/commits/b5.13 +# 5.13.meta-qt5.1 SRC_URI += " \ ${QT_GIT}/qtwebengine-chromium.git;name=chromium;branch=${QT_MODULE_BRANCH_CHROMIUM};protocol=${QT_GIT_PROTOCOL};destsuffix=git/src/3rdparty \ file://0001-Force-host-toolchain-configuration.patch \ @@ -145,28 +145,27 @@ SRC_URI_append_libc-musl = "\ file://0003-musl-link-against-libexecinfo.patch \ " -# Patches from https://github.com/meta-qt5/qtwebengine-chromium/commits/69-based -# 69-based.meta-qt5.4 +# Patches from https://github.com/meta-qt5/qtwebengine-chromium/commits/73-based +# 73-based.meta-qt5.1 SRC_URI += " \ - file://chromium/0002-chromium-workaround-for-too-long-.rps-file-name.patch;patchdir=src/3rdparty \ - file://chromium/0004-chromium-stack-pointer-clobber.patch;patchdir=src/3rdparty \ - file://chromium/0019-chromium-fix-build-with-clang.patch;patchdir=src/3rdparty \ - file://chromium/0021-chromium-Exclude-CRC32-for-32bit-arm.patch;patchdir=src/3rdparty \ - file://chromium/0022-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch;patchdir=src/3rdparty \ + file://chromium/0001-chromium-workaround-for-too-long-.rps-file-name.patch;patchdir=src/3rdparty \ + file://chromium/0002-chromium-stack-pointer-clobber.patch;patchdir=src/3rdparty \ + file://chromium/0003-chromium-fix-build-with-clang.patch;patchdir=src/3rdparty \ + file://chromium/0004-chromium-Exclude-CRC32-for-32bit-arm.patch;patchdir=src/3rdparty \ + file://chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch;patchdir=src/3rdparty \ " SRC_URI_append_libc-musl = "\ - file://chromium/0005-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch;patchdir=src/3rdparty \ - file://chromium/0006-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch;patchdir=src/3rdparty \ - file://chromium/0007-chromium-musl-include-fcntl.h-for-loff_t.patch;patchdir=src/3rdparty \ - file://chromium/0008-chromium-musl-use-off64_t-instead-of-the-internal-__.patch;patchdir=src/3rdparty \ - file://chromium/0009-chromium-musl-linux-glibc-make-the-distinction.patch;patchdir=src/3rdparty \ - file://chromium/0010-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch;patchdir=src/3rdparty \ - file://chromium/0011-chromium-musl-Use-correct-member-name-__si_fields-fr.patch;patchdir=src/3rdparty \ - file://chromium/0012-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch;patchdir=src/3rdparty \ - file://chromium/0013-chromium-musl-Do-not-define-__sbrk-on-musl.patch;patchdir=src/3rdparty \ - file://chromium/0014-chromium-musl-Adjust-default-pthread-stack-size.patch;patchdir=src/3rdparty \ - file://chromium/0015-chromium-musl-include-asm-generic-ioctl.h-for-TCGETS.patch;patchdir=src/3rdparty \ + file://chromium/0006-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch;patchdir=src/3rdparty \ + file://chromium/0007-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch;patchdir=src/3rdparty \ + file://chromium/0008-chromium-musl-include-fcntl.h-for-loff_t.patch;patchdir=src/3rdparty \ + file://chromium/0009-chromium-musl-use-off64_t-instead-of-the-internal-__.patch;patchdir=src/3rdparty \ + file://chromium/0010-chromium-musl-linux-glibc-make-the-distinction.patch;patchdir=src/3rdparty \ + file://chromium/0011-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch;patchdir=src/3rdparty \ + file://chromium/0012-chromium-musl-Use-correct-member-name-__si_fields-fr.patch;patchdir=src/3rdparty \ + file://chromium/0013-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch;patchdir=src/3rdparty \ + file://chromium/0014-chromium-musl-Do-not-define-__sbrk-on-musl.patch;patchdir=src/3rdparty \ + file://chromium/0015-chromium-musl-Adjust-default-pthread-stack-size.patch;patchdir=src/3rdparty \ file://chromium/0016-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch;patchdir=src/3rdparty \ file://chromium/0017-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch;patchdir=src/3rdparty \ file://chromium/0018-chromium-musl-pread-pwrite.patch;patchdir=src/3rdparty \ -- cgit v1.2.3-54-g00ecf From 8f0e74102237fc3d2eeb5012e8fd4ed28ff33503 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 16 Jul 2019 12:44:19 -0700 Subject: qtwebengine: Fix build on aarch64 adapt a patch from meta-browser to get aarch64 going Signed-off-by: Khem Raj Signed-off-by: Martin Jansa --- .../0006-chromium-aarch64-skia-build-fix.patch | 62 +++++++++++++++++ ...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-Use-correct-member-name-__si_fields-fr.patch | 24 ------- ...sl-allocator-Do-not-include-glibc_weak_sy.patch | 24 +++++++ ...sl-Define-res_ninit-and-res_nclose-for-no.patch | 79 ---------------------- ...sl-Use-correct-member-name-__si_fields-fr.patch | 24 +++++++ ...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-Use-_fpstate-instead-of-_libc_fpstate-.patch | 63 ----------------- ...sl-Use-_fpstate-instead-of-_libc_fpstate-.patch | 63 +++++++++++++++++ ...sl-elf_reader.cc-include-sys-reg.h-to-get.patch | 56 --------------- ...sl-elf_reader.cc-include-sys-reg.h-to-get.patch | 56 +++++++++++++++ .../chromium/0018-chromium-musl-pread-pwrite.patch | 31 --------- .../chromium/0019-chromium-musl-pread-pwrite.patch | 31 +++++++++ recipes-qt/qt5/qtwebengine_git.bb | 29 ++++---- 28 files changed, 619 insertions(+), 556 deletions(-) create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0006-chromium-aarch64-skia-build-fix.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0006-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-include-fcntl.h-for-loff_t.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-include-fcntl.h-for-loff_t.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-use-off64_t-instead-of-the-internal-__.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-linux-glibc-make-the-distinction.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-use-off64_t-instead-of-the-internal-__.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-linux-glibc-make-the-distinction.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Use-correct-member-name-__si_fields-fr.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Use-correct-member-name-__si_fields-fr.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-Do-not-define-__sbrk-on-musl.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-Adjust-default-pthread-stack-size.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-Do-not-define-__sbrk-on-musl.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Adjust-default-pthread-stack-size.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch delete mode 100644 recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-pread-pwrite.patch create mode 100644 recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-pread-pwrite.patch (limited to 'recipes-qt/qt5/qtwebengine_git.bb') 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 new file mode 100644 index 00000000..b97b2dca --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-aarch64-skia-build-fix.patch @@ -0,0 +1,62 @@ +From 564eb25c70160f6b3f20a6eb5727427efc78b695 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 | 15 ++------------- + 1 file changed, 2 insertions(+), 13 deletions(-) + +diff --git a/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h b/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h +index de14e65b94e..b8be7852086 100644 +--- a/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h ++++ b/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h +@@ -729,12 +729,7 @@ SI F approx_powf(F x, F y) { + } + + SI F from_half(U16 h) { +-#if 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 +@@ -751,13 +746,7 @@ SI F from_half(U16 h) { + } + + SI U16 to_half(F f) { +-#if 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/0006-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch b/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch deleted file mode 100644 index 2972dc6b..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch +++ /dev/null @@ -1,33 +0,0 @@ -From c665cc484556b07aec52fcb1d6851881b646450d 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/0007-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch b/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch deleted file mode 100644 index d3e168f2..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 136539399b9c3c9d2b52a0f789c045ca215682e2 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 7 Jul 2017 14:09:06 -0700 -Subject: [PATCH] chromium: musl: Avoid mallinfo() APIs on non-glibc/linux - -Signed-off-by: Khem Raj ---- - chromium/base/process/process_metrics_posix.cc | 4 ++-- - chromium/base/trace_event/malloc_dump_provider.cc | 2 ++ - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/chromium/base/process/process_metrics_posix.cc b/chromium/base/process/process_metrics_posix.cc -index a09bbf2c56e..b309f6b694e 100644 ---- a/chromium/base/process/process_metrics_posix.cc -+++ b/chromium/base/process/process_metrics_posix.cc -@@ -100,14 +100,14 @@ size_t ProcessMetrics::GetMallocUsage() { - malloc_statistics_t stats = {0}; - malloc_zone_statistics(nullptr, &stats); - return stats.size_in_use; --#elif defined(OS_LINUX) || defined(OS_ANDROID) -+#elif defined(__GLIBC__) || defined(OS_ANDROID) - struct mallinfo minfo = mallinfo(); - #if defined(USE_TCMALLOC) - return minfo.uordblks; - #else - return minfo.hblkhd + minfo.arena; - #endif --#elif defined(OS_FUCHSIA) -+#else - // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. - return 0; - #endif -diff --git a/chromium/base/trace_event/malloc_dump_provider.cc b/chromium/base/trace_event/malloc_dump_provider.cc -index 0077d8b0aec..c69f893f4e9 100644 ---- a/chromium/base/trace_event/malloc_dump_provider.cc -+++ b/chromium/base/trace_event/malloc_dump_provider.cc -@@ -77,6 +77,7 @@ MallocDumpProvider::~MallocDumpProvider() = default; - // the current process. - bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, - ProcessMemoryDump* pmd) { -+#if defined(__GLIBC__) - { - base::AutoLock auto_lock(emit_metrics_on_memory_dump_lock_); - if (!emit_metrics_on_memory_dump_) -@@ -172,6 +173,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, - MemoryAllocatorDump::kUnitsBytes, - resident_size - allocated_objects_size); - } -+#endif // __GLIBC__ - return true; - } - diff --git a/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch b/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch new file mode 100644 index 00000000..c040504a --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch @@ -0,0 +1,33 @@ +From 34ab4deee6cffc8e6876e991ceabe6baf7308b6f 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/0008-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch b/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch new file mode 100644 index 00000000..14b469e1 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch @@ -0,0 +1,52 @@ +From 6eec3f3105b0f6b37fdb52efbb4b3820e1d25846 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 14:09:06 -0700 +Subject: [PATCH] chromium: musl: Avoid mallinfo() APIs on non-glibc/linux + +Signed-off-by: Khem Raj +--- + chromium/base/process/process_metrics_posix.cc | 4 ++-- + chromium/base/trace_event/malloc_dump_provider.cc | 2 ++ + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/chromium/base/process/process_metrics_posix.cc b/chromium/base/process/process_metrics_posix.cc +index a09bbf2c56e..b309f6b694e 100644 +--- a/chromium/base/process/process_metrics_posix.cc ++++ b/chromium/base/process/process_metrics_posix.cc +@@ -100,14 +100,14 @@ size_t ProcessMetrics::GetMallocUsage() { + malloc_statistics_t stats = {0}; + malloc_zone_statistics(nullptr, &stats); + return stats.size_in_use; +-#elif defined(OS_LINUX) || defined(OS_ANDROID) ++#elif defined(__GLIBC__) || defined(OS_ANDROID) + struct mallinfo minfo = mallinfo(); + #if defined(USE_TCMALLOC) + return minfo.uordblks; + #else + return minfo.hblkhd + minfo.arena; + #endif +-#elif defined(OS_FUCHSIA) ++#else + // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. + return 0; + #endif +diff --git a/chromium/base/trace_event/malloc_dump_provider.cc b/chromium/base/trace_event/malloc_dump_provider.cc +index 0077d8b0aec..c69f893f4e9 100644 +--- a/chromium/base/trace_event/malloc_dump_provider.cc ++++ b/chromium/base/trace_event/malloc_dump_provider.cc +@@ -77,6 +77,7 @@ MallocDumpProvider::~MallocDumpProvider() = default; + // the current process. + bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, + ProcessMemoryDump* pmd) { ++#if defined(__GLIBC__) + { + base::AutoLock auto_lock(emit_metrics_on_memory_dump_lock_); + if (!emit_metrics_on_memory_dump_) +@@ -172,6 +173,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, + MemoryAllocatorDump::kUnitsBytes, + resident_size - allocated_objects_size); + } ++#endif // __GLIBC__ + return true; + } + diff --git a/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-include-fcntl.h-for-loff_t.patch b/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-include-fcntl.h-for-loff_t.patch deleted file mode 100644 index 6c2a4bf7..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-include-fcntl.h-for-loff_t.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 16488c99dd7d8f05cde58ca39df13c4a54c13d4a Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 7 Jul 2017 14:37:49 -0700 -Subject: [PATCH] chromium: musl: include fcntl.h for loff_t - -Signed-off-by: Khem Raj ---- - .../tcmalloc/chromium/src/base/linux_syscall_support.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h b/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h -index 13aa415e250..9d1309b836f 100644 ---- a/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h -+++ b/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h -@@ -154,6 +154,7 @@ extern "C" { - #include - #include - #include -+#include - #include - #include - #include diff --git a/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-include-fcntl.h-for-loff_t.patch b/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-include-fcntl.h-for-loff_t.patch new file mode 100644 index 00000000..f6c23b0e --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-include-fcntl.h-for-loff_t.patch @@ -0,0 +1,22 @@ +From 87a8cb561129701c8ba94dc927c45cbbb9f5c75b Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 14:37:49 -0700 +Subject: [PATCH] chromium: musl: include fcntl.h for loff_t + +Signed-off-by: Khem Raj +--- + .../tcmalloc/chromium/src/base/linux_syscall_support.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h b/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h +index 13aa415e250..9d1309b836f 100644 +--- a/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h ++++ b/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h +@@ -154,6 +154,7 @@ extern "C" { + #include + #include + #include ++#include + #include + #include + #include diff --git a/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-use-off64_t-instead-of-the-internal-__.patch b/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-use-off64_t-instead-of-the-internal-__.patch deleted file mode 100644 index 7c86f5d3..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-use-off64_t-instead-of-the-internal-__.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 1f00a9e4b43c742768da46b7580c1d134f5beb37 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/0010-chromium-musl-linux-glibc-make-the-distinction.patch b/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-linux-glibc-make-the-distinction.patch deleted file mode 100644 index 34d5456c..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-linux-glibc-make-the-distinction.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 1e3a7fcca67a13bc79761d27c8abb5cd3bdb52a7 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 7 Jul 2017 14:54:38 -0700 -Subject: [PATCH] chromium: musl: linux != glibc, make the distinction - -Signed-off-by: Khem Raj ---- - chromium/base/allocator/allocator_check.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/chromium/base/allocator/allocator_check.cc b/chromium/base/allocator/allocator_check.cc -index 5fb86467dde..9864858eb67 100644 ---- a/chromium/base/allocator/allocator_check.cc -+++ b/chromium/base/allocator/allocator_check.cc -@@ -27,7 +27,7 @@ bool IsAllocatorInitialized() { - // Set by allocator_shim_override_ucrt_symbols_win.h when the - // shimmed _set_new_mode() is called. - return g_is_win_shim_layer_initialized; --#elif defined(OS_LINUX) && defined(USE_TCMALLOC) && \ -+#elif defined(__GLIBC__) && defined(USE_TCMALLOC) && \ - !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) - // From third_party/tcmalloc/chromium/src/gperftools/tcmalloc.h. - // TODO(primiano): replace with an include once base can depend on allocator. diff --git a/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-use-off64_t-instead-of-the-internal-__.patch b/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-use-off64_t-instead-of-the-internal-__.patch new file mode 100644 index 00000000..ca31a456 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-use-off64_t-instead-of-the-internal-__.patch @@ -0,0 +1,62 @@ +From bf780e32b4de82b55368967642bc8f975a93d619 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/0011-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch deleted file mode 100644 index 0ea63ea3..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch +++ /dev/null @@ -1,24 +0,0 @@ -From c67e75a89f9e5216eeb9e351b9a6b864f1d992ab Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 7 Jul 2017 15:09:02 -0700 -Subject: [PATCH] chromium: musl: allocator: Do not include glibc_weak_symbols - for musl - -Signed-off-by: Khem Raj ---- - chromium/base/allocator/allocator_shim.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/chromium/base/allocator/allocator_shim.cc b/chromium/base/allocator/allocator_shim.cc -index 1233ae2a8aa..6f1b3e87224 100644 ---- a/chromium/base/allocator/allocator_shim.cc -+++ b/chromium/base/allocator/allocator_shim.cc -@@ -351,7 +351,7 @@ ALWAYS_INLINE void ShimAlignedFree(void* address, void* context) { - // In the case of tcmalloc we also want to plumb into the glibc hooks - // to avoid that allocations made in glibc itself (e.g., strdup()) get - // accidentally performed on the glibc heap instead of the tcmalloc one. --#if defined(USE_TCMALLOC) -+#if defined(USE_TCMALLOC) && defined(__GLIBC__) - #include "base/allocator/allocator_shim_override_glibc_weak_symbols.h" - #endif - diff --git a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-linux-glibc-make-the-distinction.patch b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-linux-glibc-make-the-distinction.patch new file mode 100644 index 00000000..8ca842eb --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-linux-glibc-make-the-distinction.patch @@ -0,0 +1,23 @@ +From 0dbb65a8a1633a8fe1704ddc0f299799998cc9b0 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 14:54:38 -0700 +Subject: [PATCH] chromium: musl: linux != glibc, make the distinction + +Signed-off-by: Khem Raj +--- + chromium/base/allocator/allocator_check.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/chromium/base/allocator/allocator_check.cc b/chromium/base/allocator/allocator_check.cc +index 5fb86467dde..9864858eb67 100644 +--- a/chromium/base/allocator/allocator_check.cc ++++ b/chromium/base/allocator/allocator_check.cc +@@ -27,7 +27,7 @@ bool IsAllocatorInitialized() { + // Set by allocator_shim_override_ucrt_symbols_win.h when the + // shimmed _set_new_mode() is called. + return g_is_win_shim_layer_initialized; +-#elif defined(OS_LINUX) && defined(USE_TCMALLOC) && \ ++#elif defined(__GLIBC__) && defined(USE_TCMALLOC) && \ + !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) + // From third_party/tcmalloc/chromium/src/gperftools/tcmalloc.h. + // TODO(primiano): replace with an include once base can depend on allocator. diff --git a/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Use-correct-member-name-__si_fields-fr.patch b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Use-correct-member-name-__si_fields-fr.patch deleted file mode 100644 index 1d25ed8c..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Use-correct-member-name-__si_fields-fr.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 705bb6693c207516b9b96d217f9d417b8360c952 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/0012-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch new file mode 100644 index 00000000..f995676a --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch @@ -0,0 +1,24 @@ +From a74e3dd8323dedb012bce6cf5995ae2a78efd5de Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 15:09:02 -0700 +Subject: [PATCH] chromium: musl: allocator: Do not include glibc_weak_symbols + for musl + +Signed-off-by: Khem Raj +--- + chromium/base/allocator/allocator_shim.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/chromium/base/allocator/allocator_shim.cc b/chromium/base/allocator/allocator_shim.cc +index 1233ae2a8aa..6f1b3e87224 100644 +--- a/chromium/base/allocator/allocator_shim.cc ++++ b/chromium/base/allocator/allocator_shim.cc +@@ -351,7 +351,7 @@ ALWAYS_INLINE void ShimAlignedFree(void* address, void* context) { + // In the case of tcmalloc we also want to plumb into the glibc hooks + // to avoid that allocations made in glibc itself (e.g., strdup()) get + // accidentally performed on the glibc heap instead of the tcmalloc one. +-#if defined(USE_TCMALLOC) ++#if defined(USE_TCMALLOC) && defined(__GLIBC__) + #include "base/allocator/allocator_shim_override_glibc_weak_symbols.h" + #endif + diff --git a/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch deleted file mode 100644 index 2a162fec..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch +++ /dev/null @@ -1,79 +0,0 @@ -From f236c935f90cc338c8c8db68c08aa8fc2ca13406 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 7 Jul 2017 15:27:50 -0700 -Subject: [PATCH] chromium: musl: Define res_ninit and res_nclose for non-glibc - platforms - -Signed-off-by: Khem Raj ---- - chromium/net/dns/dns_config_service_posix.cc | 4 +++ - chromium/net/dns/dns_reloader.cc | 4 +++ - chromium/net/dns/resolv_compat.h | 29 ++++++++++++++++++++ - 3 files changed, 37 insertions(+) - create mode 100644 chromium/net/dns/resolv_compat.h - -diff --git a/chromium/net/dns/dns_config_service_posix.cc b/chromium/net/dns/dns_config_service_posix.cc -index 31c564faeee..222ff65b6e1 100644 ---- a/chromium/net/dns/dns_config_service_posix.cc -+++ b/chromium/net/dns/dns_config_service_posix.cc -@@ -29,6 +29,10 @@ - #include "net/dns/public/dns_protocol.h" - #include "net/dns/serial_worker.h" - -+#if defined(OS_LINUX) && !defined(__GLIBC__) -+#include "net/dns/resolv_compat.h" -+#endif -+ - #if defined(OS_MACOSX) && !defined(OS_IOS) - #include "net/dns/dns_config_watcher_mac.h" - #endif -diff --git a/chromium/net/dns/dns_reloader.cc b/chromium/net/dns/dns_reloader.cc -index 03e248c9878..9ccda82c7e9 100644 ---- a/chromium/net/dns/dns_reloader.cc -+++ b/chromium/net/dns/dns_reloader.cc -@@ -9,6 +9,10 @@ - - #include - -+#if defined(OS_LINUX) && !defined(__GLIBC__) -+#include "net/dns/resolv_compat.h" -+#endif -+ - #include "base/lazy_instance.h" - #include "base/logging.h" - #include "base/macros.h" -diff --git a/chromium/net/dns/resolv_compat.h b/chromium/net/dns/resolv_compat.h -new file mode 100644 -index 00000000000..4f0e852a19d ---- /dev/null -+++ b/chromium/net/dns/resolv_compat.h -@@ -0,0 +1,29 @@ -+#if !defined(__GLIBC__) -+/*************************************************************************** -+ * resolv_compat.h -+ * -+ * Mimick GLIBC's res_ninit() and res_nclose() for musl libc -+ * Note: res_init() is actually deprecated according to -+ * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html -+ **************************************************************************/ -+#include -+ -+static inline int res_ninit(res_state statp) -+{ -+ int rc = res_init(); -+ if (statp != &_res) { -+ memcpy(statp, &_res, sizeof(*statp)); -+ } -+ return rc; -+} -+ -+static inline int res_nclose(res_state statp) -+{ -+ if (!statp) -+ return -1; -+ if (statp != &_res) { -+ memset(statp, 0, sizeof(*statp)); -+ } -+ return 0; -+} -+#endif diff --git a/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Use-correct-member-name-__si_fields-fr.patch b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Use-correct-member-name-__si_fields-fr.patch new file mode 100644 index 00000000..c4e6ce02 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Use-correct-member-name-__si_fields-fr.patch @@ -0,0 +1,24 @@ +From 1a11d644434ace1eaf72d2cc8bb3dec350655db5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 15:12:39 -0700 +Subject: [PATCH] chromium: musl: Use correct member name __si_fields from + LinuxSigInfo + +Signed-off-by: Khem Raj +--- + chromium/sandbox/linux/seccomp-bpf/trap.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/chromium/sandbox/linux/seccomp-bpf/trap.cc b/chromium/sandbox/linux/seccomp-bpf/trap.cc +index 003708d2c89..0fef3148f9d 100644 +--- a/chromium/sandbox/linux/seccomp-bpf/trap.cc ++++ b/chromium/sandbox/linux/seccomp-bpf/trap.cc +@@ -168,7 +168,7 @@ void Trap::SigSys(int nr, LinuxSigInfo* info, ucontext_t* ctx) { + // most versions of glibc don't include this information in siginfo_t. So, + // we need to explicitly copy it into a arch_sigsys structure. + struct arch_sigsys sigsys; +- memcpy(&sigsys, &info->_sifields, sizeof(sigsys)); ++ memcpy(&sigsys, &info->__si_fields, sizeof(sigsys)); + + #if defined(__mips__) + // When indirect syscall (syscall(__NR_foo, ...)) is made on Mips, the diff --git a/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch new file mode 100644 index 00000000..9f1f2b10 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch @@ -0,0 +1,79 @@ +From 319b50c1cb9ab3beaf52d5119feb9ba2283aaa13 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 15:27:50 -0700 +Subject: [PATCH] chromium: musl: Define res_ninit and res_nclose for non-glibc + platforms + +Signed-off-by: Khem Raj +--- + chromium/net/dns/dns_config_service_posix.cc | 4 +++ + chromium/net/dns/dns_reloader.cc | 4 +++ + chromium/net/dns/resolv_compat.h | 29 ++++++++++++++++++++ + 3 files changed, 37 insertions(+) + create mode 100644 chromium/net/dns/resolv_compat.h + +diff --git a/chromium/net/dns/dns_config_service_posix.cc b/chromium/net/dns/dns_config_service_posix.cc +index 31c564faeee..222ff65b6e1 100644 +--- a/chromium/net/dns/dns_config_service_posix.cc ++++ b/chromium/net/dns/dns_config_service_posix.cc +@@ -29,6 +29,10 @@ + #include "net/dns/public/dns_protocol.h" + #include "net/dns/serial_worker.h" + ++#if defined(OS_LINUX) && !defined(__GLIBC__) ++#include "net/dns/resolv_compat.h" ++#endif ++ + #if defined(OS_MACOSX) && !defined(OS_IOS) + #include "net/dns/dns_config_watcher_mac.h" + #endif +diff --git a/chromium/net/dns/dns_reloader.cc b/chromium/net/dns/dns_reloader.cc +index 03e248c9878..9ccda82c7e9 100644 +--- a/chromium/net/dns/dns_reloader.cc ++++ b/chromium/net/dns/dns_reloader.cc +@@ -9,6 +9,10 @@ + + #include + ++#if defined(OS_LINUX) && !defined(__GLIBC__) ++#include "net/dns/resolv_compat.h" ++#endif ++ + #include "base/lazy_instance.h" + #include "base/logging.h" + #include "base/macros.h" +diff --git a/chromium/net/dns/resolv_compat.h b/chromium/net/dns/resolv_compat.h +new file mode 100644 +index 00000000000..4f0e852a19d +--- /dev/null ++++ b/chromium/net/dns/resolv_compat.h +@@ -0,0 +1,29 @@ ++#if !defined(__GLIBC__) ++/*************************************************************************** ++ * resolv_compat.h ++ * ++ * Mimick GLIBC's res_ninit() and res_nclose() for musl libc ++ * Note: res_init() is actually deprecated according to ++ * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html ++ **************************************************************************/ ++#include ++ ++static inline int res_ninit(res_state statp) ++{ ++ int rc = res_init(); ++ if (statp != &_res) { ++ memcpy(statp, &_res, sizeof(*statp)); ++ } ++ return rc; ++} ++ ++static inline int res_nclose(res_state statp) ++{ ++ if (!statp) ++ return -1; ++ if (statp != &_res) { ++ memset(statp, 0, sizeof(*statp)); ++ } ++ return 0; ++} ++#endif diff --git a/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-Do-not-define-__sbrk-on-musl.patch b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-Do-not-define-__sbrk-on-musl.patch deleted file mode 100644 index 9cbb933c..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-Do-not-define-__sbrk-on-musl.patch +++ /dev/null @@ -1,26 +0,0 @@ -From b297eebffe2350a76945191e374f6012d1f0fc16 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/0015-chromium-musl-Adjust-default-pthread-stack-size.patch b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-Adjust-default-pthread-stack-size.patch deleted file mode 100644 index b92235f8..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-Adjust-default-pthread-stack-size.patch +++ /dev/null @@ -1,47 +0,0 @@ -From b40a99156402f483f6defb234542f71234ab8ab4 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 277a7e9338d..2a6e060fa32 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 248f93968a6..4bc5ac692af 100644 ---- a/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc -+++ b/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc -@@ -30,7 +30,7 @@ size_t GetUnderestimatedStackSize() { - // FIXME: On Mac OSX and Linux, this method cannot estimate stack size - // correctly for the main thread. - --#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ -+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ - defined(OS_FUCHSIA) - // pthread_getattr_np() can fail if the thread is not invoked by - // pthread_create() (e.g., the main thread of webkit_unit_tests). -@@ -98,7 +98,7 @@ size_t GetUnderestimatedStackSize() { - } - - 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/0015-chromium-musl-Do-not-define-__sbrk-on-musl.patch b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-Do-not-define-__sbrk-on-musl.patch new file mode 100644 index 00000000..2bb6d115 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-Do-not-define-__sbrk-on-musl.patch @@ -0,0 +1,26 @@ +From da261d4402fac21694aeca82247974f4043934bc Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 7 Jul 2017 15:39:57 -0700 +Subject: [PATCH] chromium: musl: Do not define __sbrk on musl + +musl libc does not have sbrk. on musl libc will only work when called with 0 as +argument, so we just let it out for now + +Signed-off-by: Khem Raj +--- + .../third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h b/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h +index 59c1b6fb5f6..10f0786d829 100644 +--- a/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h ++++ b/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h +@@ -213,7 +213,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, + return result; + } + +-#ifndef __UCLIBC__ ++#if !defined(__UCLIBC__) && defined(__GLIBC__) + // libc's version: + extern "C" void* __sbrk(intptr_t increment); + diff --git a/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Adjust-default-pthread-stack-size.patch b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Adjust-default-pthread-stack-size.patch new file mode 100644 index 00000000..e1754c1a --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Adjust-default-pthread-stack-size.patch @@ -0,0 +1,47 @@ +From 9f526ef03263867d7fb305d5fc91f95e2c9564ea 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 277a7e9338d..2a6e060fa32 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 248f93968a6..4bc5ac692af 100644 +--- a/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc ++++ b/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc +@@ -30,7 +30,7 @@ size_t GetUnderestimatedStackSize() { + // FIXME: On Mac OSX and Linux, this method cannot estimate stack size + // correctly for the main thread. + +-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ ++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ + defined(OS_FUCHSIA) + // pthread_getattr_np() can fail if the thread is not invoked by + // pthread_create() (e.g., the main thread of webkit_unit_tests). +@@ -98,7 +98,7 @@ size_t GetUnderestimatedStackSize() { + } + + 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/0016-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch deleted file mode 100644 index c03fddc2..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 7def3e9107a6ba742936e038a4dd747613bcf1b6 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/0017-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch new file mode 100644 index 00000000..16c958c9 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch @@ -0,0 +1,63 @@ +From 295afaa918bafc70df23c2c6740e0ef3cc3a7ba5 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/0017-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch deleted file mode 100644 index f2d39138..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch +++ /dev/null @@ -1,56 +0,0 @@ -From e5c0314a43a30f2cef8bb72560e2cec0ed603e01 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Tue, 25 Sep 2018 12:59:05 -0700 -Subject: [PATCH] chromium: musl: elf_reader.cc: include to get - __WORDSIZE on musl libc - -Signed-off-by: Khem Raj -Signed-off-by: Martin Jansa ---- - chromium/third_party/breakpad/breakpad/configure.ac | 2 +- - .../breakpad/breakpad/src/common/dwarf/elf_reader.cc | 3 ++- - .../breakpad/breakpad/src/common/linux/elf_core_dump.h | 1 + - 3 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/chromium/third_party/breakpad/breakpad/configure.ac b/chromium/third_party/breakpad/breakpad/configure.ac -index 9cca5aa069c..04139a728cc 100644 ---- a/chromium/third_party/breakpad/breakpad/configure.ac -+++ b/chromium/third_party/breakpad/breakpad/configure.ac -@@ -72,7 +72,7 @@ AC_ARG_ENABLE(m32, - AC_HEADER_STDC - AC_SYS_LARGEFILE - AX_PTHREAD --AC_CHECK_HEADERS([a.out.h sys/random.h]) -+AC_CHECK_HEADERS([a.out.h sys/random.h sys/reg.h]) - AC_CHECK_FUNCS([arc4random getrandom]) - - AX_CXX_COMPILE_STDCXX(11, noext, mandatory) -diff --git a/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc b/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc -index 4135a51a980..be92b792d3c 100644 ---- a/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc -+++ b/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc -@@ -29,10 +29,11 @@ - #ifndef _GNU_SOURCE - #define _GNU_SOURCE // needed for pread() - #endif -- -+#include - #include - #include - #include -+#include - #include - #include - #include -diff --git a/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h b/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h -index d03c7a88d38..28b55ab6300 100644 ---- a/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h -+++ b/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h -@@ -33,6 +33,7 @@ - #ifndef COMMON_LINUX_ELF_CORE_DUMP_H_ - #define COMMON_LINUX_ELF_CORE_DUMP_H_ - -+#include - #include - #include - #include diff --git a/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch b/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch new file mode 100644 index 00000000..287ef7e6 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch @@ -0,0 +1,56 @@ +From 73406a38f36c4d5a408b575efdf30f52bf38f75e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 25 Sep 2018 12:59:05 -0700 +Subject: [PATCH] chromium: musl: elf_reader.cc: include to get + __WORDSIZE on musl libc + +Signed-off-by: Khem Raj +Signed-off-by: Martin Jansa +--- + chromium/third_party/breakpad/breakpad/configure.ac | 2 +- + .../breakpad/breakpad/src/common/dwarf/elf_reader.cc | 3 ++- + .../breakpad/breakpad/src/common/linux/elf_core_dump.h | 1 + + 3 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/chromium/third_party/breakpad/breakpad/configure.ac b/chromium/third_party/breakpad/breakpad/configure.ac +index 9cca5aa069c..04139a728cc 100644 +--- a/chromium/third_party/breakpad/breakpad/configure.ac ++++ b/chromium/third_party/breakpad/breakpad/configure.ac +@@ -72,7 +72,7 @@ AC_ARG_ENABLE(m32, + AC_HEADER_STDC + AC_SYS_LARGEFILE + AX_PTHREAD +-AC_CHECK_HEADERS([a.out.h sys/random.h]) ++AC_CHECK_HEADERS([a.out.h sys/random.h sys/reg.h]) + AC_CHECK_FUNCS([arc4random getrandom]) + + AX_CXX_COMPILE_STDCXX(11, noext, mandatory) +diff --git a/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc b/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc +index 4135a51a980..be92b792d3c 100644 +--- a/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc ++++ b/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc +@@ -29,10 +29,11 @@ + #ifndef _GNU_SOURCE + #define _GNU_SOURCE // needed for pread() + #endif +- ++#include + #include + #include + #include ++#include + #include + #include + #include +diff --git a/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h b/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h +index d03c7a88d38..28b55ab6300 100644 +--- a/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h ++++ b/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h +@@ -33,6 +33,7 @@ + #ifndef COMMON_LINUX_ELF_CORE_DUMP_H_ + #define COMMON_LINUX_ELF_CORE_DUMP_H_ + ++#include + #include + #include + #include diff --git a/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-pread-pwrite.patch b/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-pread-pwrite.patch deleted file mode 100644 index 3d041d8a..00000000 --- a/recipes-qt/qt5/qtwebengine/chromium/0018-chromium-musl-pread-pwrite.patch +++ /dev/null @@ -1,31 +0,0 @@ -From f446867c2a65d20a62caf69248b48465b58d4046 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sun, 23 Dec 2018 16:58:04 -0800 -Subject: [PATCH] chromium: musl: pread pwrite - -Redefine pread/pwrite in terms of 64bit variants on musl -since 32bit variants don't exist and aliases are not defined in -libc either - -Upstream-Status: Submitted [https://codereview.chromium.org/1743093002/] -Signed-off-by: Khem Raj ---- - chromium/third_party/lss/linux_syscall_support.h | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/chromium/third_party/lss/linux_syscall_support.h b/chromium/third_party/lss/linux_syscall_support.h -index e19e51dd304..5c661949d1e 100644 ---- a/chromium/third_party/lss/linux_syscall_support.h -+++ b/chromium/third_party/lss/linux_syscall_support.h -@@ -1239,6 +1239,11 @@ struct kernel_statfs { - #ifndef __NR_fallocate - #define __NR_fallocate 285 - #endif -+#undef __NR_pread -+#define __NR_pread __NR_pread64 -+#undef __NR_pwrite -+#define __NR_pwrite __NR_pwrite64 -+ - /* End of x86-64 definitions */ - #elif defined(__mips__) - #if _MIPS_SIM == _MIPS_SIM_ABI32 diff --git a/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-pread-pwrite.patch b/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-pread-pwrite.patch new file mode 100644 index 00000000..71d76413 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0019-chromium-musl-pread-pwrite.patch @@ -0,0 +1,31 @@ +From 43c53d6afde5183bc2da3b5b698314d050b2ff5d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 23 Dec 2018 16:58:04 -0800 +Subject: [PATCH] chromium: musl: pread pwrite + +Redefine pread/pwrite in terms of 64bit variants on musl +since 32bit variants don't exist and aliases are not defined in +libc either + +Upstream-Status: Submitted [https://codereview.chromium.org/1743093002/] +Signed-off-by: Khem Raj +--- + chromium/third_party/lss/linux_syscall_support.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/chromium/third_party/lss/linux_syscall_support.h b/chromium/third_party/lss/linux_syscall_support.h +index e19e51dd304..5c661949d1e 100644 +--- a/chromium/third_party/lss/linux_syscall_support.h ++++ b/chromium/third_party/lss/linux_syscall_support.h +@@ -1239,6 +1239,11 @@ struct kernel_statfs { + #ifndef __NR_fallocate + #define __NR_fallocate 285 + #endif ++#undef __NR_pread ++#define __NR_pread __NR_pread64 ++#undef __NR_pwrite ++#define __NR_pwrite __NR_pwrite64 ++ + /* End of x86-64 definitions */ + #elif defined(__mips__) + #if _MIPS_SIM == _MIPS_SIM_ABI32 diff --git a/recipes-qt/qt5/qtwebengine_git.bb b/recipes-qt/qt5/qtwebengine_git.bb index a0179059..1444d41d 100644 --- a/recipes-qt/qt5/qtwebengine_git.bb +++ b/recipes-qt/qt5/qtwebengine_git.bb @@ -146,29 +146,30 @@ SRC_URI_append_libc-musl = "\ " # Patches from https://github.com/meta-qt5/qtwebengine-chromium/commits/73-based -# 73-based.meta-qt5.1 +# 73-based.meta-qt5.2 SRC_URI += " \ file://chromium/0001-chromium-workaround-for-too-long-.rps-file-name.patch;patchdir=src/3rdparty \ file://chromium/0002-chromium-stack-pointer-clobber.patch;patchdir=src/3rdparty \ file://chromium/0003-chromium-fix-build-with-clang.patch;patchdir=src/3rdparty \ file://chromium/0004-chromium-Exclude-CRC32-for-32bit-arm.patch;patchdir=src/3rdparty \ file://chromium/0005-chromium-Do-not-try-to-set-the-guessed-values-for-ma.patch;patchdir=src/3rdparty \ + file://chromium/0006-chromium-aarch64-skia-build-fix.patch;patchdir=src/3rdparty \ " SRC_URI_append_libc-musl = "\ - file://chromium/0006-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch;patchdir=src/3rdparty \ - file://chromium/0007-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch;patchdir=src/3rdparty \ - file://chromium/0008-chromium-musl-include-fcntl.h-for-loff_t.patch;patchdir=src/3rdparty \ - file://chromium/0009-chromium-musl-use-off64_t-instead-of-the-internal-__.patch;patchdir=src/3rdparty \ - file://chromium/0010-chromium-musl-linux-glibc-make-the-distinction.patch;patchdir=src/3rdparty \ - file://chromium/0011-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch;patchdir=src/3rdparty \ - file://chromium/0012-chromium-musl-Use-correct-member-name-__si_fields-fr.patch;patchdir=src/3rdparty \ - file://chromium/0013-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch;patchdir=src/3rdparty \ - file://chromium/0014-chromium-musl-Do-not-define-__sbrk-on-musl.patch;patchdir=src/3rdparty \ - file://chromium/0015-chromium-musl-Adjust-default-pthread-stack-size.patch;patchdir=src/3rdparty \ - file://chromium/0016-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch;patchdir=src/3rdparty \ - file://chromium/0017-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch;patchdir=src/3rdparty \ - file://chromium/0018-chromium-musl-pread-pwrite.patch;patchdir=src/3rdparty \ + file://chromium/0007-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch;patchdir=src/3rdparty \ + file://chromium/0008-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch;patchdir=src/3rdparty \ + file://chromium/0009-chromium-musl-include-fcntl.h-for-loff_t.patch;patchdir=src/3rdparty \ + file://chromium/0010-chromium-musl-use-off64_t-instead-of-the-internal-__.patch;patchdir=src/3rdparty \ + file://chromium/0011-chromium-musl-linux-glibc-make-the-distinction.patch;patchdir=src/3rdparty \ + file://chromium/0012-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch;patchdir=src/3rdparty \ + file://chromium/0013-chromium-musl-Use-correct-member-name-__si_fields-fr.patch;patchdir=src/3rdparty \ + file://chromium/0014-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch;patchdir=src/3rdparty \ + file://chromium/0015-chromium-musl-Do-not-define-__sbrk-on-musl.patch;patchdir=src/3rdparty \ + file://chromium/0016-chromium-musl-Adjust-default-pthread-stack-size.patch;patchdir=src/3rdparty \ + file://chromium/0017-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-.patch;patchdir=src/3rdparty \ + file://chromium/0018-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get.patch;patchdir=src/3rdparty \ + file://chromium/0019-chromium-musl-pread-pwrite.patch;patchdir=src/3rdparty \ " SRCREV_qtwebengine = "5d4bac57a0191287a2fc345f6b398fb1f5d08517" -- cgit v1.2.3-54-g00ecf