diff options
Diffstat (limited to 'meta/recipes-qt/qt5/qtwebengine')
20 files changed, 749 insertions, 0 deletions
diff --git a/meta/recipes-qt/qt5/qtwebengine/0001-WebEngine-qquickwebengineview_p_p.h-add-include-QCol.patch b/meta/recipes-qt/qt5/qtwebengine/0001-WebEngine-qquickwebengineview_p_p.h-add-include-QCol.patch new file mode 100644 index 0000000000..a324dc6450 --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0001-WebEngine-qquickwebengineview_p_p.h-add-include-QCol.patch @@ -0,0 +1,23 @@ +From a70b6d2183934e4d9a3ad00167acfaf0a78a90a9 Mon Sep 17 00:00:00 2001 +From: Cleiton Bueno <cleitonrbueno@gmail.com> +Date: Fri, 25 Dec 2015 18:16:05 -0200 +Subject: [PATCH] WebEngine qquickwebengineview_p_p.h add include QColor + +Signed-off-by: Cleiton Bueno <cleitonrbueno@gmail.com> +--- + src/webengine/api/qquickwebengineview_p_p.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h +index 1b8edc8..03d6558 100644 +--- a/src/webengine/api/qquickwebengineview_p_p.h ++++ b/src/webengine/api/qquickwebengineview_p_p.h +@@ -59,6 +59,8 @@ + #include <QString> + #include <QtCore/qcompilerdetection.h> + #include <QtGui/qaccessibleobject.h> ++#include <QColor> ++ + + namespace QtWebEngineCore { + class WebContentsAdapter; diff --git a/meta/recipes-qt/qt5/qtwebengine/0001-chromium-Force-host-toolchain-configuration.patch b/meta/recipes-qt/qt5/qtwebengine/0001-chromium-Force-host-toolchain-configuration.patch new file mode 100644 index 0000000000..69e05660b3 --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0001-chromium-Force-host-toolchain-configuration.patch @@ -0,0 +1,33 @@ +From d760fcdd764985f05a480ba475855f92844a6f0d Mon Sep 17 00:00:00 2001 +From: Samuli Piippo <samuli.piippo@qt.io> +Date: Wed, 15 Mar 2017 13:53:28 +0200 +Subject: [PATCH] chromium: Force host toolchain configuration + +Force gcc/g++ to be used for parts using host toolchain, since +the option(host_build) does not work in yocto builds. + +Upstream-Status: Inappropriate [OE specific] +Signed-off-by: Samuli Piippo <samuli.piippo@qt.io> +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +--- + chromium/tools/gn/bootstrap/bootstrap.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/chromium/tools/gn/bootstrap/bootstrap.py b/chromium/tools/gn/bootstrap/bootstrap.py +index b1ff7e7..bccabbb 100755 +--- a/chromium/tools/gn/bootstrap/bootstrap.py ++++ b/chromium/tools/gn/bootstrap/bootstrap.py +@@ -318,10 +318,10 @@ def write_gn_ninja(path, root_gen_dir, options): + ld = os.environ.get('LD', cxx) + ar = os.environ.get('AR', 'ar -X64') + else: +- cc = os.environ.get('CC', 'cc') +- cxx = os.environ.get('CXX', 'c++') ++ cc = os.environ.get('CC_host', 'gcc') ++ cxx = os.environ.get('CXX_host', 'g++') + ld = cxx +- ar = os.environ.get('AR', 'ar') ++ ar = os.environ.get('AR_host', 'ar') + + # QTBUG-64759 + # cflags = os.environ.get('CFLAGS', '').split() diff --git a/meta/recipes-qt/qt5/qtwebengine/0002-Include-dependency-to-QCoreApplication-translate.patch b/meta/recipes-qt/qt5/qtwebengine/0002-Include-dependency-to-QCoreApplication-translate.patch new file mode 100644 index 0000000000..e41636a315 --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0002-Include-dependency-to-QCoreApplication-translate.patch @@ -0,0 +1,23 @@ +From 838bb0afe93321ae3d225988728a5736cd4844fc Mon Sep 17 00:00:00 2001 +From: Cleiton Bueno <cleitonrbueno@gmail.com> +Date: Thu, 24 Dec 2015 15:59:51 -0200 +Subject: [PATCH] Include dependency to QCoreApplication::translate() + +Signed-off-by: Cleiton Bueno <cleitonrbueno@gmail.com> +--- + src/core/media_capture_devices_dispatcher.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/core/media_capture_devices_dispatcher.h b/src/core/media_capture_devices_dispatcher.h +index 579d159..0904c46 100644 +--- a/src/core/media_capture_devices_dispatcher.h ++++ b/src/core/media_capture_devices_dispatcher.h +@@ -45,6 +45,8 @@ + #include <list> + #include <map> + ++#include <QCoreApplication> ++ + #include "web_contents_adapter_client.h" + + #include "base/callback.h" diff --git a/meta/recipes-qt/qt5/qtwebengine/0002-chromium-workaround-for-too-long-.rps-file-name.patch b/meta/recipes-qt/qt5/qtwebengine/0002-chromium-workaround-for-too-long-.rps-file-name.patch new file mode 100644 index 0000000000..592a30f37a --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0002-chromium-workaround-for-too-long-.rps-file-name.patch @@ -0,0 +1,42 @@ +From d76853bd469881625bedc85afabc69d36ecb05ed Mon Sep 17 00:00:00 2001 +From: Samuli Piippo <samuli.piippo@qt.io> +Date: Thu, 30 Mar 2017 11:37:24 +0300 +Subject: [PATCH] chromium: workaround for too long .rps file name + +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 +--- + chromium/tools/gn/ninja_action_target_writer.cc | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/chromium/tools/gn/ninja_action_target_writer.cc b/chromium/tools/gn/ninja_action_target_writer.cc +index eaf1b3d..ddf456e 100644 +--- a/chromium/tools/gn/ninja_action_target_writer.cc ++++ b/chromium/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() > 251 && (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/meta/recipes-qt/qt5/qtwebengine/0003-Force-host-toolchain-configuration.patch b/meta/recipes-qt/qt5/qtwebengine/0003-Force-host-toolchain-configuration.patch new file mode 100644 index 0000000000..84e430b732 --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0003-Force-host-toolchain-configuration.patch @@ -0,0 +1,71 @@ +From 36657d556e4f97d06aa44d874d7256c970cdad3c Mon Sep 17 00:00:00 2001 +From: Samuli Piippo <samuli.piippo@qt.io> +Date: Wed, 15 Mar 2017 13:53:28 +0200 +Subject: [PATCH] Force host toolchain configuration + +Force gcc/g++ to be used for parts using host toolchain, since +the option(host_build) does not work in yocto builds. + +Don't use QT_ARCH for the host architecture, since that's always +the target architecture in bitbake builds, instead ask specifically +for the qmakes's host architecture. + +Upstream-Status: Inappropriate [OE specific] +Signed-off-by: Samuli Piippo <samuli.piippo@qt.io> +--- + src/buildtools/configure_host.pro | 14 +++++++------- + src/core/config/linux.pri | 2 +- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/src/buildtools/configure_host.pro b/src/buildtools/configure_host.pro +index dd0d3e3..70161c8 100644 +--- a/src/buildtools/configure_host.pro ++++ b/src/buildtools/configure_host.pro +@@ -4,7 +4,7 @@ TEMPLATE = aux + # Pick up the host toolchain + option(host_build) + +-GN_HOST_CPU = $$gnArch($$QT_ARCH) ++GN_HOST_CPU = $$gnArch($$QMAKE_HOST.arch) + !isEmpty(QT_TARGET_ARCH): GN_TARGET_CPU = $$gnArch($$QT_TARGET_ARCH) + else: GN_TARGET_CPU = $$GN_HOST_CPU + GN_OS = $$gnOS() +@@ -31,9 +31,9 @@ GN_CONTENTS = \ + "import(\"//build/config/sysroot.gni\")" \ + "import(\"//build/toolchain/gcc_toolchain.gni\")" \ + "gcc_toolchain(\"host\") {" \ +-" cc = \"$$which($$QMAKE_CC)\" " \ +-" cxx = \"$$which($$QMAKE_CXX)\" " \ +-" ld = \"$$which($$QMAKE_LINK)\" " \ ++" cc = \"$$which(gcc)\" " \ ++" cxx = \"$$which(g++)\" " \ ++" ld = \"$$which(g++)\" " \ + " ar = \"$$which(ar)\" " \ + " nm = \"$$which(nm)\" " \ + " extra_cppflags = \"$$GN_HOST_EXTRA_CPPFLAGS\" " \ +@@ -45,9 +45,9 @@ GN_CONTENTS = \ + " } " \ + "}" \ + "gcc_toolchain(\"v8_snapshot\") {" \ +-" cc = \"$$which($$QMAKE_CC)\" " \ +-" cxx = \"$$which($$QMAKE_CXX)\" " \ +-" ld = \"$$which($$QMAKE_LINK)\" " \ ++" cc = \"$$which(gcc)\" " \ ++" cxx = \"$$which(g++)\" " \ ++" ld = \"$$which(g++)\" " \ + " ar = \"$$which(ar)\" " \ + " nm = \"$$which(nm)\" " \ + " toolchain_args = { " \ +diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri +index 1ce3ea8..23d0793 100644 +--- a/src/core/config/linux.pri ++++ b/src/core/config/linux.pri +@@ -91,7 +91,7 @@ contains(QT_ARCH, "mips") { + + host_build { + gn_args += custom_toolchain=\"$$QTWEBENGINE_OUT_ROOT/src/toolchain:host\" +- GN_HOST_CPU = $$gnArch($$QT_ARCH) ++ GN_HOST_CPU = $$gnArch($$QMAKE_HOST.arch) + gn_args += host_cpu=\"$$GN_HOST_CPU\" + # Don't bother trying to use system libraries in this case + gn_args += use_glib=false diff --git a/meta/recipes-qt/qt5/qtwebengine/0003-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch b/meta/recipes-qt/qt5/qtwebengine/0003-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch new file mode 100644 index 0000000000..1fb85fb337 --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0003-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch @@ -0,0 +1,33 @@ +From c6e7171bf8f5ecb8b82d911581a45defe93854e1 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 7 Jul 2017 14:01:12 -0700 +Subject: [PATCH] chromium: musl: sandbox: Define TEMP_FAILURE_RETRY if not + defined + +Musl does not define this Macro + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + 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 66f68ef..9284d0d 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/meta/recipes-qt/qt5/qtwebengine/0004-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch b/meta/recipes-qt/qt5/qtwebengine/0004-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch new file mode 100644 index 0000000000..5dbd07f10a --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0004-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch @@ -0,0 +1,67 @@ +From 104d93f24a44dc4a1939d6e2c99f346526a5a7d9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 7 Jul 2017 14:09:06 -0700 +Subject: [PATCH] chromium: musl: Avoid mallinfo() APIs on non-glibc/linux + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + chromium/base/process/process_metrics_posix.cc | 4 ++-- + chromium/base/trace_event/malloc_dump_provider.cc | 3 ++- + chromium/content/child/content_child_helpers.cc | 2 +- + 3 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/chromium/base/process/process_metrics_posix.cc b/chromium/base/process/process_metrics_posix.cc +index 0eb5c1f..8af7799 100644 +--- a/chromium/base/process/process_metrics_posix.cc ++++ b/chromium/base/process/process_metrics_posix.cc +@@ -94,14 +94,14 @@ size_t ProcessMetrics::GetMallocUsage() { + 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 14ba0a2..e5d9581 100644 +--- a/chromium/base/trace_event/malloc_dump_provider.cc ++++ b/chromium/base/trace_event/malloc_dump_provider.cc +@@ -197,6 +197,7 @@ MallocDumpProvider::~MallocDumpProvider() {} + // the current process. + bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, + ProcessMemoryDump* pmd) { ++#if defined(__GLIBC__) + size_t total_virtual_size = 0; + size_t resident_size = 0; + size_t allocated_objects_size = 0; +@@ -317,7 +318,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, + pmd->DumpHeapUsage(metrics_by_context, overhead, "malloc"); + } + tid_dumping_heap_ = kInvalidThreadId; +- ++#endif // __GLIBC__ + return true; + } + +diff --git a/chromium/content/child/content_child_helpers.cc b/chromium/content/child/content_child_helpers.cc +index 7ddeb4d..b8c73b0 100644 +--- a/chromium/content/child/content_child_helpers.cc ++++ b/chromium/content/child/content_child_helpers.cc +@@ -25,7 +25,7 @@ namespace content { + // though, this provides only a partial and misleading value. + // Unfortunately some telemetry benchmark rely on it and these need to + // be refactored before getting rid of this. See crbug.com/581365 . +-#if defined(OS_LINUX) || defined(OS_ANDROID) ++#if defined(__GLIBC__) || defined(OS_ANDROID) + size_t GetMemoryUsageKB() { + struct mallinfo minfo = mallinfo(); + uint64_t mem_usage = diff --git a/meta/recipes-qt/qt5/qtwebengine/0004-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch b/meta/recipes-qt/qt5/qtwebengine/0004-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch new file mode 100644 index 0000000000..76160d16ba --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0004-musl-don-t-use-pvalloc-as-it-s-not-available-on-musl.patch @@ -0,0 +1,37 @@ +From 1a23cb4027692535aeace4c6070864af672de70d Mon Sep 17 00:00:00 2001 +From: Samuli Piippo <samuli.piippo@qt.io> +Date: Tue, 12 Dec 2017 16:06:14 +0200 +Subject: [PATCH] musl: don't use pvalloc as it's not available on musl + +Change-Id: I7145463ac7b9560e7459d3384a3db108bd727403 +Signed-off-by: Samuli Piippo <samuli.piippo@qt.io> +--- + src/core/api/qtbug-61521.cpp | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/src/core/api/qtbug-61521.cpp b/src/core/api/qtbug-61521.cpp +index 002a1af..8fd2da3 100644 +--- a/src/core/api/qtbug-61521.cpp ++++ b/src/core/api/qtbug-61521.cpp +@@ -74,10 +74,6 @@ SHIM_SYMBOL_VERSION(valloc); + void* __valloc(size_t size) + SHIM_ALIAS_SYMBOL(ShimValloc); + +-SHIM_SYMBOL_VERSION(pvalloc); +-void* __pvalloc(size_t size) +- SHIM_ALIAS_SYMBOL(ShimPvalloc); +- + SHIM_SYMBOL_VERSION(posix_memalign); + int __posix_memalign(void** r, size_t a, size_t s) + SHIM_ALIAS_SYMBOL(ShimPosixMemalign); +@@ -110,10 +106,6 @@ SHIM_HIDDEN void* ShimValloc(size_t size) { + return valloc(size); + } + +-SHIM_HIDDEN void* ShimPvalloc(size_t size) { +- return pvalloc(size); +-} +- + SHIM_HIDDEN int ShimPosixMemalign(void** r, size_t a, size_t s) { + return posix_memalign(r,a,s); + } diff --git a/meta/recipes-qt/qt5/qtwebengine/0005-chromium-musl-include-fcntl.h-for-loff_t.patch b/meta/recipes-qt/qt5/qtwebengine/0005-chromium-musl-include-fcntl.h-for-loff_t.patch new file mode 100644 index 0000000000..e0a3f80486 --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0005-chromium-musl-include-fcntl.h-for-loff_t.patch @@ -0,0 +1,22 @@ +From 1e51c5e3a299213b632dd2d448c86dabf45b2258 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 7 Jul 2017 14:37:49 -0700 +Subject: [PATCH] chromium: musl: include fcntl.h for loff_t + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + chromium/third_party/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 b29ec2d..91f77dd 100644 +--- a/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h ++++ b/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h +@@ -150,6 +150,7 @@ extern "C" { + #include <stddef.h> + #include <stdint.h> + #include <string.h> ++#include <fcntl.h> + #include <sys/ptrace.h> + #include <sys/resource.h> + #include <sys/time.h> diff --git a/meta/recipes-qt/qt5/qtwebengine/0005-musl-link-against-libexecinfo.patch b/meta/recipes-qt/qt5/qtwebengine/0005-musl-link-against-libexecinfo.patch new file mode 100644 index 0000000000..45a45f9baa --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0005-musl-link-against-libexecinfo.patch @@ -0,0 +1,24 @@ +From e735b0adfa9b1dcaa93e3ce65d9cc01255ab340b Mon Sep 17 00:00:00 2001 +From: Samuli Piippo <samuli.piippo@qt.io> +Date: Thu, 14 Dec 2017 11:28:10 +0200 +Subject: [PATCH] musl: link against libexecinfo + +Change-Id: Ifada60f9c72691973612850121f6fb152d70839a +Signed-off-by: Samuli Piippo <samuli.piippo@qt.io> +--- + src/core/core_module.pro | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/core/core_module.pro b/src/core/core_module.pro +index d21985e..eeebeb4 100644 +--- a/src/core/core_module.pro ++++ b/src/core/core_module.pro +@@ -54,7 +54,7 @@ linux { + POST_TARGETDEPS += $$NINJA_TARGETDEPS + + +-LIBS_PRIVATE += -L$$api_library_path ++LIBS_PRIVATE += -L$$api_library_path -lexecinfo + CONFIG *= no_smart_library_merge + osx { + LIBS_PRIVATE += -Wl,-force_load,$${api_library_path}$${QMAKE_DIR_SEP}lib$${api_library_name}.a diff --git a/meta/recipes-qt/qt5/qtwebengine/0006-chromium-musl-use-off64_t-instead-of-the-internal-__.patch b/meta/recipes-qt/qt5/qtwebengine/0006-chromium-musl-use-off64_t-instead-of-the-internal-__.patch new file mode 100644 index 0000000000..f8c4150a7d --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0006-chromium-musl-use-off64_t-instead-of-the-internal-__.patch @@ -0,0 +1,62 @@ +From f0fba131a285144c5d71dad8b98ff0f15ce454ad Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 7 Jul 2017 14:38:37 -0700 +Subject: [PATCH] chromium: musl: use off64_t instead of the internal __off64_t + +- 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 <raj.khem@gmail.com> +--- + .../third_party/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 715c045..edc8cf2 100644 +--- a/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h ++++ b/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h +@@ -77,7 +77,7 @@ typedef off64_t __off64_t; + + 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); +@@ -90,7 +90,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 +@@ -161,7 +161,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 +@@ -178,7 +178,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( +@@ -189,7 +189,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/meta/recipes-qt/qt5/qtwebengine/0007-chromium-musl-linux-glibc-make-the-distinction.patch b/meta/recipes-qt/qt5/qtwebengine/0007-chromium-musl-linux-glibc-make-the-distinction.patch new file mode 100644 index 0000000000..fbff28830d --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0007-chromium-musl-linux-glibc-make-the-distinction.patch @@ -0,0 +1,23 @@ +From 42a0586aa7040caef931db8657b2ac8d345e4dd3 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 7 Jul 2017 14:54:38 -0700 +Subject: [PATCH] chromium: musl: linux != glibc, make the distinction + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + 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 9cd5d22..1e70095 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/meta/recipes-qt/qt5/qtwebengine/0008-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch b/meta/recipes-qt/qt5/qtwebengine/0008-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch new file mode 100644 index 0000000000..d040057a40 --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0008-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch @@ -0,0 +1,24 @@ +From ff7af7ff21d259cfc580541b931d478e3d604f01 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 7 Jul 2017 15:09:02 -0700 +Subject: [PATCH] chromium: musl: allocator: Do not include glibc_weak_symbols + for musl + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + 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 41adbf8..091971e 100644 +--- a/chromium/base/allocator/allocator_shim.cc ++++ b/chromium/base/allocator/allocator_shim.cc +@@ -319,7 +319,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/meta/recipes-qt/qt5/qtwebengine/0009-chromium-musl-Use-correct-member-name-__si_fields-fr.patch b/meta/recipes-qt/qt5/qtwebengine/0009-chromium-musl-Use-correct-member-name-__si_fields-fr.patch new file mode 100644 index 0000000000..c2a9c8a0cb --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0009-chromium-musl-Use-correct-member-name-__si_fields-fr.patch @@ -0,0 +1,24 @@ +From 74171f47edb76dc89edcc7116cd33d234e0e0490 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 7 Jul 2017 15:12:39 -0700 +Subject: [PATCH] chromium: musl: Use correct member name __si_fields from + LinuxSigInfo + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + 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 003708d..0fef314 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/meta/recipes-qt/qt5/qtwebengine/0010-chromium-musl-Match-syscalls-to-match-musl.patch b/meta/recipes-qt/qt5/qtwebengine/0010-chromium-musl-Match-syscalls-to-match-musl.patch new file mode 100644 index 0000000000..7be83c55c6 --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0010-chromium-musl-Match-syscalls-to-match-musl.patch @@ -0,0 +1,44 @@ +From ce23b6a6e5a5ebae15dedeebf7044ac9a0249a80 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 7 Jul 2017 15:24:49 -0700 +Subject: [PATCH] chromium: musl: Match syscalls to match musl + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + chromium/third_party/lss/linux_syscall_support.h | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/chromium/third_party/lss/linux_syscall_support.h b/chromium/third_party/lss/linux_syscall_support.h +index 80a3e56..1e57b1a 100644 +--- a/chromium/third_party/lss/linux_syscall_support.h ++++ b/chromium/third_party/lss/linux_syscall_support.h +@@ -794,6 +794,14 @@ struct kernel_statfs { + #endif + + ++#undef stat64 ++#undef fstat64 ++ ++#ifndef __NR_fstatat ++#define __NR_fstatat __NR_fstatat64 ++#endif ++ ++ + #if defined(__x86_64__) + #ifndef ARCH_SET_GS + #define ARCH_SET_GS 0x1001 +@@ -1211,6 +1219,14 @@ struct kernel_statfs { + #ifndef __NR_fallocate + #define __NR_fallocate 285 + #endif ++ ++#ifndef __NR_pread ++#define __NR_pread __NR_pread64 ++#endif ++#ifndef __NR_pwrite ++#define __NR_pwrite __NR_pwrite64 ++#endif ++ + /* End of x86-64 definitions */ + #elif defined(__mips__) + #if _MIPS_SIM == _MIPS_SIM_ABI32 diff --git a/meta/recipes-qt/qt5/qtwebengine/0011-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch b/meta/recipes-qt/qt5/qtwebengine/0011-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch new file mode 100644 index 0000000000..9b2749134e --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0011-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch @@ -0,0 +1,79 @@ +From 1781911655bddf8a8352f9bd0a7ce4867df6981b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 7 Jul 2017 15:27:50 -0700 +Subject: [PATCH] chromium: musl: Define res_ninit and res_nclose for non-glibc + platforms + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + 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 088fb9b..98d0a35 100644 +--- a/chromium/net/dns/dns_config_service_posix.cc ++++ b/chromium/net/dns/dns_config_service_posix.cc +@@ -26,6 +26,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 322c8a5..72ff40d 100644 +--- a/chromium/net/dns/dns_reloader.cc ++++ b/chromium/net/dns/dns_reloader.cc +@@ -9,6 +9,10 @@ + + #include <resolv.h> + ++#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 0000000..4f0e852 +--- /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 <string.h> ++ ++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/meta/recipes-qt/qt5/qtwebengine/0012-chromium-musl-Do-not-define-__sbrk-on-musl.patch b/meta/recipes-qt/qt5/qtwebengine/0012-chromium-musl-Do-not-define-__sbrk-on-musl.patch new file mode 100644 index 0000000000..e6863251f4 --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0012-chromium-musl-Do-not-define-__sbrk-on-musl.patch @@ -0,0 +1,26 @@ +From a968ea31e3ac6a007fd157c61faf9f6f632d8230 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 7 Jul 2017 15:39:57 -0700 +Subject: [PATCH] chromium: musl: Do not define __sbrk on musl + +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 <raj.khem@gmail.com> +--- + chromium/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 edc8cf2..a868b50 100644 +--- a/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h ++++ b/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h +@@ -233,7 +233,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, + } + + // Don't hook sbrk() in Android, since it doesn't expose __sbrk. +-#if !defined(__ANDROID__) ++#if !defined(__ANDROID__) && defined(__GLIBC__) + // libc's version: + extern "C" void* __sbrk(ptrdiff_t increment); + diff --git a/meta/recipes-qt/qt5/qtwebengine/0013-chromium-musl-Adjust-default-pthread-stack-size.patch b/meta/recipes-qt/qt5/qtwebengine/0013-chromium-musl-Adjust-default-pthread-stack-size.patch new file mode 100644 index 0000000000..c1d6ec32ae --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0013-chromium-musl-Adjust-default-pthread-stack-size.patch @@ -0,0 +1,47 @@ +From a56debd9f26bacf76f0d734e98191485deba03fa Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 7 Jul 2017 16:41:23 -0700 +Subject: [PATCH] chromium: musl: Adjust default pthread stack size + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + chromium/base/threading/platform_thread_linux.cc | 3 ++- + chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp | 4 ++-- + 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 8d411ed..4b56cf3 100644 +--- a/chromium/base/threading/platform_thread_linux.cc ++++ b/chromium/base/threading/platform_thread_linux.cc +@@ -175,7 +175,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/WebKit/Source/platform/wtf/StackUtil.cpp b/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp +index 13c3f90..07308e0 100644 +--- a/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp ++++ b/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp +@@ -28,7 +28,7 @@ size_t GetUnderestimatedStackSize() { + // 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/meta/recipes-qt/qt5/qtwebengine/0014-chromium-musl-include-asm-generic-ioctl.h-for-TCGETS.patch b/meta/recipes-qt/qt5/qtwebengine/0014-chromium-musl-include-asm-generic-ioctl.h-for-TCGETS.patch new file mode 100644 index 0000000000..81e71e7db8 --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0014-chromium-musl-include-asm-generic-ioctl.h-for-TCGETS.patch @@ -0,0 +1,22 @@ +From 5809e73146cdf43d13aa1b3789bfc7ff2ff723af Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 7 Jul 2017 17:15:34 -0700 +Subject: [PATCH] chromium: musl: include asm-generic/ioctl.h for TCGETS2 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + chromium/device/serial/serial_io_handler_posix.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/chromium/device/serial/serial_io_handler_posix.cc b/chromium/device/serial/serial_io_handler_posix.cc +index 8ffba12..82fb09f 100644 +--- a/chromium/device/serial/serial_io_handler_posix.cc ++++ b/chromium/device/serial/serial_io_handler_posix.cc +@@ -6,6 +6,7 @@ + + #include <sys/ioctl.h> + #include <termios.h> ++#include <asm-generic/ioctls.h> + + #include "base/files/file_util.h" + #include "base/posix/eintr_wrapper.h" diff --git a/meta/recipes-qt/qt5/qtwebengine/0015-chromium-musl-tcmalloc-Use-off64_t-insread-of-__off6.patch b/meta/recipes-qt/qt5/qtwebengine/0015-chromium-musl-tcmalloc-Use-off64_t-insread-of-__off6.patch new file mode 100644 index 0000000000..03aa77a048 --- /dev/null +++ b/meta/recipes-qt/qt5/qtwebengine/0015-chromium-musl-tcmalloc-Use-off64_t-insread-of-__off6.patch @@ -0,0 +1,23 @@ +From 0aca8610a03cc100464d0d52a2c5425c52ab1e66 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 8 Jul 2017 09:08:23 -0700 +Subject: [PATCH] chromium: musl: tcmalloc: Use off64_t insread of __off64_t + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h b/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h +index 91f77dd..bb84a0b 100644 +--- a/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h ++++ b/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h +@@ -1929,7 +1929,7 @@ typedef unsigned long int ulong; + #if defined(__x86_64__) + /* Need to make sure __off64_t isn't truncated to 32-bits under x32. */ + LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, +- __off64_t o) { ++ off64_t o) { + LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l), + LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f), + LSS_SYSCALL_ARG(d), (uint64_t)(o)); |