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 --- ...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 ---------- 34 files changed, 667 insertions(+), 692 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/chromium') 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 - -- cgit v1.2.3-54-g00ecf