diff options
author | Mikko Gronoff <mikko.gronoff@qt.io> | 2018-06-26 12:42:33 +0300 |
---|---|---|
committer | Mikko Gronoff <mikko.gronoff@qt.io> | 2018-06-27 12:03:36 +0000 |
commit | 6765cbe6a255771cc1d06e5d3878c7e705769fc3 (patch) | |
tree | 377c10e198c33bb5ffa509f24748891a7e341a02 /recipes-qt/qt5/qtwebengine/chromium | |
parent | b84881444814a361fcc17e7eb34407fb175541da (diff) | |
parent | 40054db1de152d85c22aefdae50b136ca56967c5 (diff) | |
download | meta-qt5-6765cbe6a255771cc1d06e5d3878c7e705769fc3.tar.gz |
Merge remote-tracking branch 'qtyocto/upstream/master' into 5.11
* qtyocto/upstream/master:
40054db qt5: qtbase: Upgrade Double-Conversion
dd1ce3c README: Rework to start using GitHub for development
ef5f5d9 qt5: upgrade to 5.11.1
820f3ef qt5: add common PACKAGECONFIG for QtQuickCompiler
e199d80 python-pyqt5: update recipe to 5.10.1
65db89e qtbase: don't pass empty filename to function
3b27896 nativesdk-qtbase: add quotes to CC and CXX in environment file
a36cc5f libvcard: add recipe
1ac92b6 qtbase: Add packageconfigs for renameat2 and getentropy use
557aabd qttranslations: remove qtquick1 translation package
00aafa0 qt5-creator: Remove qtquick1 dependency
731334a qtwebengine: fix build with plugins as well as ozone enabled
70ce980 qtwebengine: add -fpermissive
33f58ff qtwebengine: fix build with gcc8, part II
267a38f qtwebengine: fix build with gcc8
7193a7f qtquick1: remove recipe and all references
29445f6 qtwebkit: do not skip build - use cmake as build system
dde9b55 qt5: refresh the patches and update them on meta-qt5 repositories
e0a4e23 qt5: Update to Qt 5.11.0
73f99f2 gstreamer1.0-plugins-{good,bad}: move the qt5 PACKAGECONFIG from bad to good bbappend
Change-Id: Ib58d0e103bda0b58338989c00f1fa80bd699534c
Diffstat (limited to 'recipes-qt/qt5/qtwebengine/chromium')
15 files changed, 577 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0001-chromium-Force-host-toolchain-configuration.patch b/recipes-qt/qt5/qtwebengine/chromium/0001-chromium-Force-host-toolchain-configuration.patch new file mode 100644 index 00000000..32efcf99 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0001-chromium-Force-host-toolchain-configuration.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 761754d5edf129d526e87ed5ace71d24f30e9618 Mon Sep 17 00:00:00 2001 | ||
2 | From: Samuli Piippo <samuli.piippo@qt.io> | ||
3 | Date: Wed, 15 Mar 2017 13:53:28 +0200 | ||
4 | Subject: [PATCH] chromium: Force host toolchain configuration | ||
5 | |||
6 | Force gcc/g++ to be used for parts using host toolchain, since | ||
7 | the option(host_build) does not work in yocto builds. | ||
8 | |||
9 | Upstream-Status: Inappropriate [OE specific] | ||
10 | Signed-off-by: Samuli Piippo <samuli.piippo@qt.io> | ||
11 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
12 | --- | ||
13 | chromium/tools/gn/bootstrap/bootstrap.py | 6 +++--- | ||
14 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
15 | |||
16 | diff --git a/chromium/tools/gn/bootstrap/bootstrap.py b/chromium/tools/gn/bootstrap/bootstrap.py | ||
17 | index 93c6446f28..0fe7e6737d 100755 | ||
18 | --- a/chromium/tools/gn/bootstrap/bootstrap.py | ||
19 | +++ b/chromium/tools/gn/bootstrap/bootstrap.py | ||
20 | @@ -352,10 +352,10 @@ def write_gn_ninja(path, root_gen_dir, options): | ||
21 | ld = os.environ.get('LD', cxx) | ||
22 | ar = os.environ.get('AR', 'ar -X64') | ||
23 | else: | ||
24 | - cc = os.environ.get('CC', 'cc') | ||
25 | - cxx = os.environ.get('CXX', 'c++') | ||
26 | + cc = os.environ.get('CC_host', 'gcc') | ||
27 | + cxx = os.environ.get('CXX_host', 'g++') | ||
28 | ld = cxx | ||
29 | - ar = os.environ.get('AR', 'ar') | ||
30 | + ar = os.environ.get('AR_host', 'ar') | ||
31 | |||
32 | # QTBUG-64759 | ||
33 | # cflags = os.environ.get('CFLAGS', '').split() | ||
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 new file mode 100644 index 00000000..b5c6c5de --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0002-chromium-workaround-for-too-long-.rps-file-name.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 108bc7caf7544b47a392aac690f0d616f1c6c42e Mon Sep 17 00:00:00 2001 | ||
2 | From: Samuli Piippo <samuli.piippo@qt.io> | ||
3 | Date: Thu, 30 Mar 2017 11:37:24 +0300 | ||
4 | Subject: [PATCH] chromium: workaround for too long .rps file name | ||
5 | |||
6 | Ninja may fail when the build directory is too long: | ||
7 | |||
8 | ninja: error: WriteFile(__third_party_WebKit_Source_bindings_modules_\ | ||
9 | interfaces_info_individual_modules__home_qt_work_build_build-nitrogen\ | ||
10 | 6x_tmp_work_cortexa9hf-neon-mx6qdl-poky-linux-gnueabi_qtwebengine_5.9\ | ||
11 | .0_gitAUTOINC_29afdb0a34_049134677a-r0_build_src_toolchain_target__ru\ | ||
12 | le.rsp): Unable to create file. File name too long | ||
13 | |||
14 | Task-number: QTBUG-59769 | ||
15 | Change-Id: I73c5e64ae5174412be2a675e35b0b6047f2bf4c1 | ||
16 | --- | ||
17 | chromium/tools/gn/ninja_action_target_writer.cc | 9 +++++++++ | ||
18 | 1 file changed, 9 insertions(+) | ||
19 | |||
20 | diff --git a/chromium/tools/gn/ninja_action_target_writer.cc b/chromium/tools/gn/ninja_action_target_writer.cc | ||
21 | index bab07c5d2b..8f889aebc1 100644 | ||
22 | --- a/chromium/tools/gn/ninja_action_target_writer.cc | ||
23 | +++ b/chromium/tools/gn/ninja_action_target_writer.cc | ||
24 | @@ -117,9 +117,18 @@ std::string NinjaActionTargetWriter::WriteRuleDefinition() { | ||
25 | // strictly necessary for regular one-shot actions, but it's easier to | ||
26 | // just always define unique_name. | ||
27 | std::string rspfile = custom_rule_name; | ||
28 | + | ||
29 | + //quick workaround if filename length > 255 - ".rsp", just cut the dirs starting from the end | ||
30 | + //please note ".$unique_name" is not used at the moment | ||
31 | + int pos = 0; | ||
32 | + std::string delimiter("_"); | ||
33 | + while (rspfile.length() > 251 && (pos = rspfile.find_last_of(delimiter)) != std::string::npos) | ||
34 | + rspfile = rspfile.substr(0,pos); | ||
35 | + | ||
36 | if (!target_->sources().empty()) | ||
37 | rspfile += ".$unique_name"; | ||
38 | rspfile += ".rsp"; | ||
39 | + | ||
40 | out_ << " rspfile = " << rspfile << std::endl; | ||
41 | |||
42 | // Response file contents. | ||
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-Fix-build-with-gcc8.patch b/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-Fix-build-with-gcc8.patch new file mode 100644 index 00000000..f2747330 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0003-chromium-Fix-build-with-gcc8.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | From d16d04ea5c47974f038c4434011e69dbfc23c797 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Tue, 5 Jun 2018 13:58:16 +0000 | ||
4 | Subject: [PATCH] chromium: Fix build with gcc8 | ||
5 | |||
6 | --- | ||
7 | chromium/mojo/public/c/system/buffer.h | 2 +- | ||
8 | chromium/mojo/public/c/system/data_pipe.h | 2 +- | ||
9 | chromium/mojo/public/c/system/message_pipe.h | 2 +- | ||
10 | 3 files changed, 3 insertions(+), 3 deletions(-) | ||
11 | |||
12 | diff --git a/chromium/mojo/public/c/system/buffer.h b/chromium/mojo/public/c/system/buffer.h | ||
13 | index 09f6d285f3..e516a09e49 100644 | ||
14 | --- a/chromium/mojo/public/c/system/buffer.h | ||
15 | +++ b/chromium/mojo/public/c/system/buffer.h | ||
16 | @@ -35,7 +35,7 @@ const MojoCreateSharedBufferOptionsFlags | ||
17 | ((MojoCreateSharedBufferOptionsFlags)0) | ||
18 | #endif | ||
19 | |||
20 | -MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment"); | ||
21 | +MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 4 || MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment"); | ||
22 | struct MOJO_ALIGNAS(8) MojoCreateSharedBufferOptions { | ||
23 | uint32_t struct_size; | ||
24 | MojoCreateSharedBufferOptionsFlags flags; | ||
25 | diff --git a/chromium/mojo/public/c/system/data_pipe.h b/chromium/mojo/public/c/system/data_pipe.h | ||
26 | index 62adbea1ea..76225858ba 100644 | ||
27 | --- a/chromium/mojo/public/c/system/data_pipe.h | ||
28 | +++ b/chromium/mojo/public/c/system/data_pipe.h | ||
29 | @@ -46,7 +46,7 @@ const MojoCreateDataPipeOptionsFlags MOJO_CREATE_DATA_PIPE_OPTIONS_FLAG_NONE = | ||
30 | ((MojoCreateDataPipeOptionsFlags)0) | ||
31 | #endif | ||
32 | |||
33 | -MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment"); | ||
34 | +MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 4 || MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment"); | ||
35 | struct MOJO_ALIGNAS(8) MojoCreateDataPipeOptions { | ||
36 | MOJO_ALIGNAS(4) uint32_t struct_size; | ||
37 | MOJO_ALIGNAS(4) MojoCreateDataPipeOptionsFlags flags; | ||
38 | diff --git a/chromium/mojo/public/c/system/message_pipe.h b/chromium/mojo/public/c/system/message_pipe.h | ||
39 | index f0f69d1025..364a02971e 100644 | ||
40 | --- a/chromium/mojo/public/c/system/message_pipe.h | ||
41 | +++ b/chromium/mojo/public/c/system/message_pipe.h | ||
42 | @@ -44,7 +44,7 @@ const MojoCreateMessagePipeOptionsFlags | ||
43 | ((MojoCreateMessagePipeOptionsFlags)0) | ||
44 | #endif | ||
45 | |||
46 | -MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment"); | ||
47 | +MOJO_STATIC_ASSERT(MOJO_ALIGNOF(int64_t) == 4 || MOJO_ALIGNOF(int64_t) == 8, "int64_t has weird alignment"); | ||
48 | struct MOJO_ALIGNAS(8) MojoCreateMessagePipeOptions { | ||
49 | uint32_t struct_size; | ||
50 | MojoCreateMessagePipeOptionsFlags flags; | ||
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch b/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch new file mode 100644 index 00000000..8aeba5f1 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0004-chromium-musl-sandbox-Define-TEMP_FAILURE_RETRY-if-n.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 48bcb9e0efa3d67543cc755a2fc0f97b6514cbab Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 7 Jul 2017 14:01:12 -0700 | ||
4 | Subject: [PATCH] chromium: musl: sandbox: Define TEMP_FAILURE_RETRY if not | ||
5 | defined | ||
6 | |||
7 | Musl does not define this Macro | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | chromium/sandbox/linux/suid/sandbox.c | 9 +++++++++ | ||
12 | 1 file changed, 9 insertions(+) | ||
13 | |||
14 | diff --git a/chromium/sandbox/linux/suid/sandbox.c b/chromium/sandbox/linux/suid/sandbox.c | ||
15 | index 66f68ef138..9284d0d4fc 100644 | ||
16 | --- a/chromium/sandbox/linux/suid/sandbox.c | ||
17 | +++ b/chromium/sandbox/linux/suid/sandbox.c | ||
18 | @@ -44,6 +44,15 @@ static bool DropRoot(); | ||
19 | |||
20 | #define HANDLE_EINTR(x) TEMP_FAILURE_RETRY(x) | ||
21 | |||
22 | +#ifndef TEMP_FAILURE_RETRY | ||
23 | +# define TEMP_FAILURE_RETRY(expression) \ | ||
24 | + (__extension__ \ | ||
25 | + ({ long int __result; \ | ||
26 | + do __result = (long int) (expression); \ | ||
27 | + while (__result == -1L && errno == EINTR); \ | ||
28 | + __result; })) | ||
29 | +#endif | ||
30 | + | ||
31 | static void FatalError(const char* msg, ...) | ||
32 | __attribute__((noreturn, format(printf, 1, 2))); | ||
33 | |||
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch b/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch new file mode 100644 index 00000000..9a0b3370 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0005-chromium-musl-Avoid-mallinfo-APIs-on-non-glibc-linux.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | From 913e3c0834dd0371ee62ab91b71428fc2b77b3c4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 7 Jul 2017 14:09:06 -0700 | ||
4 | Subject: [PATCH] chromium: musl: Avoid mallinfo() APIs on non-glibc/linux | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | chromium/base/process/process_metrics_posix.cc | 4 ++-- | ||
9 | chromium/base/trace_event/malloc_dump_provider.cc | 3 ++- | ||
10 | chromium/content/child/content_child_helpers.cc | 2 +- | ||
11 | 3 files changed, 5 insertions(+), 4 deletions(-) | ||
12 | |||
13 | diff --git a/chromium/base/process/process_metrics_posix.cc b/chromium/base/process/process_metrics_posix.cc | ||
14 | index 73a52d6210..4867198a50 100644 | ||
15 | --- a/chromium/base/process/process_metrics_posix.cc | ||
16 | +++ b/chromium/base/process/process_metrics_posix.cc | ||
17 | @@ -94,14 +94,14 @@ size_t ProcessMetrics::GetMallocUsage() { | ||
18 | malloc_statistics_t stats = {0}; | ||
19 | malloc_zone_statistics(nullptr, &stats); | ||
20 | return stats.size_in_use; | ||
21 | -#elif defined(OS_LINUX) || defined(OS_ANDROID) | ||
22 | +#elif defined(__GLIBC__) || defined(OS_ANDROID) | ||
23 | struct mallinfo minfo = mallinfo(); | ||
24 | #if defined(USE_TCMALLOC) | ||
25 | return minfo.uordblks; | ||
26 | #else | ||
27 | return minfo.hblkhd + minfo.arena; | ||
28 | #endif | ||
29 | -#elif defined(OS_FUCHSIA) | ||
30 | +#else | ||
31 | // TODO(fuchsia): Not currently exposed. https://crbug.com/735087. | ||
32 | return 0; | ||
33 | #endif | ||
34 | diff --git a/chromium/base/trace_event/malloc_dump_provider.cc b/chromium/base/trace_event/malloc_dump_provider.cc | ||
35 | index ffd519133c..0c9131e98e 100644 | ||
36 | --- a/chromium/base/trace_event/malloc_dump_provider.cc | ||
37 | +++ b/chromium/base/trace_event/malloc_dump_provider.cc | ||
38 | @@ -197,6 +197,7 @@ MallocDumpProvider::~MallocDumpProvider() = default; | ||
39 | // the current process. | ||
40 | bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, | ||
41 | ProcessMemoryDump* pmd) { | ||
42 | +#if defined(__GLIBC__) | ||
43 | { | ||
44 | base::AutoLock auto_lock(emit_metrics_on_memory_dump_lock_); | ||
45 | if (!emit_metrics_on_memory_dump_) | ||
46 | @@ -322,7 +323,7 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDumpArgs& args, | ||
47 | pmd->DumpHeapUsage(metrics_by_context, overhead, "malloc"); | ||
48 | } | ||
49 | tid_dumping_heap_ = kInvalidThreadId; | ||
50 | - | ||
51 | +#endif // __GLIBC__ | ||
52 | return true; | ||
53 | } | ||
54 | |||
55 | diff --git a/chromium/content/child/content_child_helpers.cc b/chromium/content/child/content_child_helpers.cc | ||
56 | index 7ddeb4d16a..b8c73b09c5 100644 | ||
57 | --- a/chromium/content/child/content_child_helpers.cc | ||
58 | +++ b/chromium/content/child/content_child_helpers.cc | ||
59 | @@ -25,7 +25,7 @@ namespace content { | ||
60 | // though, this provides only a partial and misleading value. | ||
61 | // Unfortunately some telemetry benchmark rely on it and these need to | ||
62 | // be refactored before getting rid of this. See crbug.com/581365 . | ||
63 | -#if defined(OS_LINUX) || defined(OS_ANDROID) | ||
64 | +#if defined(__GLIBC__) || defined(OS_ANDROID) | ||
65 | size_t GetMemoryUsageKB() { | ||
66 | struct mallinfo minfo = mallinfo(); | ||
67 | uint64_t mem_usage = | ||
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-musl-include-fcntl.h-for-loff_t.patch b/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-musl-include-fcntl.h-for-loff_t.patch new file mode 100644 index 00000000..a57d74ec --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0006-chromium-musl-include-fcntl.h-for-loff_t.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | From 5547d8bcd9241726f2ea01ada0204c4a4a4e922b Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 7 Jul 2017 14:37:49 -0700 | ||
4 | Subject: [PATCH] chromium: musl: include fcntl.h for loff_t | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | .../tcmalloc/chromium/src/base/linux_syscall_support.h | 1 + | ||
9 | 1 file changed, 1 insertion(+) | ||
10 | |||
11 | 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 | ||
12 | index b29ec2d29a..91f77dd88d 100644 | ||
13 | --- a/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h | ||
14 | +++ b/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h | ||
15 | @@ -150,6 +150,7 @@ extern "C" { | ||
16 | #include <stddef.h> | ||
17 | #include <stdint.h> | ||
18 | #include <string.h> | ||
19 | +#include <fcntl.h> | ||
20 | #include <sys/ptrace.h> | ||
21 | #include <sys/resource.h> | ||
22 | #include <sys/time.h> | ||
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-use-off64_t-instead-of-the-internal-__.patch b/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-use-off64_t-instead-of-the-internal-__.patch new file mode 100644 index 00000000..26fe1bd4 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0007-chromium-musl-use-off64_t-instead-of-the-internal-__.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | From 69905bc0ef6576240b3b72c7a00e041b2512fea2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 7 Jul 2017 14:38:37 -0700 | ||
4 | Subject: [PATCH] chromium: musl: use off64_t instead of the internal __off64_t | ||
5 | |||
6 | - only do the glibc 32-bit ABI check for mmap/mmap64 on gnu libc. musl | ||
7 | does not support the 32-bit ABI. | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | .../tcmalloc/chromium/src/malloc_hook_mmap_linux.h | 10 +++++----- | ||
12 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
13 | |||
14 | 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 | ||
15 | index 715c045f66..edc8cf2db7 100644 | ||
16 | --- a/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h | ||
17 | +++ b/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h | ||
18 | @@ -77,7 +77,7 @@ typedef off64_t __off64_t; | ||
19 | |||
20 | static inline void* do_mmap64(void *start, size_t length, | ||
21 | int prot, int flags, | ||
22 | - int fd, __off64_t offset) __THROW { | ||
23 | + int fd, off64_t offset) __THROW { | ||
24 | // The original gperftools uses sys_mmap() here. But, it is not allowed by | ||
25 | // Chromium's sandbox. | ||
26 | return (void *)syscall(SYS_mmap, start, length, prot, flags, fd, offset); | ||
27 | @@ -90,7 +90,7 @@ static inline void* do_mmap64(void *start, size_t length, | ||
28 | |||
29 | static inline void* do_mmap64(void *start, size_t length, | ||
30 | int prot, int flags, | ||
31 | - int fd, __off64_t offset) __THROW { | ||
32 | + int fd, off64_t offset) __THROW { | ||
33 | void *result; | ||
34 | |||
35 | // Try mmap2() unless it's not supported | ||
36 | @@ -161,7 +161,7 @@ static inline void* do_mmap64(void *start, size_t length, | ||
37 | |||
38 | extern "C" { | ||
39 | void* mmap64(void *start, size_t length, int prot, int flags, | ||
40 | - int fd, __off64_t offset ) __THROW | ||
41 | + int fd, off64_t offset ) __THROW | ||
42 | ATTRIBUTE_SECTION(malloc_hook); | ||
43 | void* mmap(void *start, size_t length,int prot, int flags, | ||
44 | int fd, off_t offset) __THROW | ||
45 | @@ -178,7 +178,7 @@ extern "C" { | ||
46 | } | ||
47 | |||
48 | extern "C" void* mmap64(void *start, size_t length, int prot, int flags, | ||
49 | - int fd, __off64_t offset) __THROW { | ||
50 | + int fd, off64_t offset) __THROW { | ||
51 | MallocHook::InvokePreMmapHook(start, length, prot, flags, fd, offset); | ||
52 | void *result; | ||
53 | if (!MallocHook::InvokeMmapReplacement( | ||
54 | @@ -189,7 +189,7 @@ extern "C" void* mmap64(void *start, size_t length, int prot, int flags, | ||
55 | return result; | ||
56 | } | ||
57 | |||
58 | -# if !defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH) | ||
59 | +# if defined(__GLIBC__) && (!defined(__USE_FILE_OFFSET64) || !defined(__REDIRECT_NTH)) | ||
60 | |||
61 | extern "C" void* mmap(void *start, size_t length, int prot, int flags, | ||
62 | int fd, off_t offset) __THROW { | ||
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-linux-glibc-make-the-distinction.patch b/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-linux-glibc-make-the-distinction.patch new file mode 100644 index 00000000..66e22bba --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0008-chromium-musl-linux-glibc-make-the-distinction.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | From 8f5a007da9926f411d7ced9d07fcd00e4acc750a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 7 Jul 2017 14:54:38 -0700 | ||
4 | Subject: [PATCH] chromium: musl: linux != glibc, make the distinction | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | chromium/base/allocator/allocator_check.cc | 2 +- | ||
9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
10 | |||
11 | diff --git a/chromium/base/allocator/allocator_check.cc b/chromium/base/allocator/allocator_check.cc | ||
12 | index 9cd5d2207d..1e70095648 100644 | ||
13 | --- a/chromium/base/allocator/allocator_check.cc | ||
14 | +++ b/chromium/base/allocator/allocator_check.cc | ||
15 | @@ -27,7 +27,7 @@ bool IsAllocatorInitialized() { | ||
16 | // Set by allocator_shim_override_ucrt_symbols_win.h when the | ||
17 | // shimmed _set_new_mode() is called. | ||
18 | return g_is_win_shim_layer_initialized; | ||
19 | -#elif defined(OS_LINUX) && defined(USE_TCMALLOC) && \ | ||
20 | +#elif defined(__GLIBC__) && defined(USE_TCMALLOC) && \ | ||
21 | !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) | ||
22 | // From third_party/tcmalloc/chromium/src/gperftools/tcmalloc.h. | ||
23 | // TODO(primiano): replace with an include once base can depend on allocator. | ||
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch b/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch new file mode 100644 index 00000000..d622ee53 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0009-chromium-musl-allocator-Do-not-include-glibc_weak_sy.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | From b93340f0e24d97015a62649616cc52c92473ac64 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 7 Jul 2017 15:09:02 -0700 | ||
4 | Subject: [PATCH] chromium: musl: allocator: Do not include glibc_weak_symbols | ||
5 | for musl | ||
6 | |||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | --- | ||
9 | chromium/base/allocator/allocator_shim.cc | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/chromium/base/allocator/allocator_shim.cc b/chromium/base/allocator/allocator_shim.cc | ||
13 | index 4b7de5e1a3..fe565223f2 100644 | ||
14 | --- a/chromium/base/allocator/allocator_shim.cc | ||
15 | +++ b/chromium/base/allocator/allocator_shim.cc | ||
16 | @@ -302,7 +302,7 @@ ALWAYS_INLINE void ShimFreeDefiniteSize(void* ptr, size_t size, void* context) { | ||
17 | // In the case of tcmalloc we also want to plumb into the glibc hooks | ||
18 | // to avoid that allocations made in glibc itself (e.g., strdup()) get | ||
19 | // accidentally performed on the glibc heap instead of the tcmalloc one. | ||
20 | -#if defined(USE_TCMALLOC) | ||
21 | +#if defined(USE_TCMALLOC) && defined(__GLIBC__) | ||
22 | #include "base/allocator/allocator_shim_override_glibc_weak_symbols.h" | ||
23 | #endif | ||
24 | |||
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-Use-correct-member-name-__si_fields-fr.patch b/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-Use-correct-member-name-__si_fields-fr.patch new file mode 100644 index 00000000..910c917e --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0010-chromium-musl-Use-correct-member-name-__si_fields-fr.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | From e43710f187e1263264fadefef991048d5bfb2fe9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 7 Jul 2017 15:12:39 -0700 | ||
4 | Subject: [PATCH] chromium: musl: Use correct member name __si_fields from | ||
5 | LinuxSigInfo | ||
6 | |||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | --- | ||
9 | chromium/sandbox/linux/seccomp-bpf/trap.cc | 2 +- | ||
10 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
11 | |||
12 | diff --git a/chromium/sandbox/linux/seccomp-bpf/trap.cc b/chromium/sandbox/linux/seccomp-bpf/trap.cc | ||
13 | index 003708d2c8..0fef3148f9 100644 | ||
14 | --- a/chromium/sandbox/linux/seccomp-bpf/trap.cc | ||
15 | +++ b/chromium/sandbox/linux/seccomp-bpf/trap.cc | ||
16 | @@ -168,7 +168,7 @@ void Trap::SigSys(int nr, LinuxSigInfo* info, ucontext_t* ctx) { | ||
17 | // most versions of glibc don't include this information in siginfo_t. So, | ||
18 | // we need to explicitly copy it into a arch_sigsys structure. | ||
19 | struct arch_sigsys sigsys; | ||
20 | - memcpy(&sigsys, &info->_sifields, sizeof(sigsys)); | ||
21 | + memcpy(&sigsys, &info->__si_fields, sizeof(sigsys)); | ||
22 | |||
23 | #if defined(__mips__) | ||
24 | // When indirect syscall (syscall(__NR_foo, ...)) is made on Mips, the | ||
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch new file mode 100644 index 00000000..cbe5d19b --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0011-chromium-musl-Define-res_ninit-and-res_nclose-for-no.patch | |||
@@ -0,0 +1,79 @@ | |||
1 | From 1567c7984f1d368cdf32033e801f5568c0855213 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 7 Jul 2017 15:27:50 -0700 | ||
4 | Subject: [PATCH] chromium: musl: Define res_ninit and res_nclose for non-glibc | ||
5 | platforms | ||
6 | |||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | --- | ||
9 | chromium/net/dns/dns_config_service_posix.cc | 4 +++ | ||
10 | chromium/net/dns/dns_reloader.cc | 4 +++ | ||
11 | chromium/net/dns/resolv_compat.h | 29 ++++++++++++++++++++ | ||
12 | 3 files changed, 37 insertions(+) | ||
13 | create mode 100644 chromium/net/dns/resolv_compat.h | ||
14 | |||
15 | diff --git a/chromium/net/dns/dns_config_service_posix.cc b/chromium/net/dns/dns_config_service_posix.cc | ||
16 | index f2e66331e3..6fe84dd66a 100644 | ||
17 | --- a/chromium/net/dns/dns_config_service_posix.cc | ||
18 | +++ b/chromium/net/dns/dns_config_service_posix.cc | ||
19 | @@ -27,6 +27,10 @@ | ||
20 | #include "net/dns/notify_watcher_mac.h" | ||
21 | #include "net/dns/serial_worker.h" | ||
22 | |||
23 | +#if defined(OS_LINUX) && !defined(__GLIBC__) | ||
24 | +#include "net/dns/resolv_compat.h" | ||
25 | +#endif | ||
26 | + | ||
27 | #if defined(OS_MACOSX) && !defined(OS_IOS) | ||
28 | #include "net/dns/dns_config_watcher_mac.h" | ||
29 | #endif | ||
30 | diff --git a/chromium/net/dns/dns_reloader.cc b/chromium/net/dns/dns_reloader.cc | ||
31 | index 322c8a5f0f..72ff40dbe1 100644 | ||
32 | --- a/chromium/net/dns/dns_reloader.cc | ||
33 | +++ b/chromium/net/dns/dns_reloader.cc | ||
34 | @@ -9,6 +9,10 @@ | ||
35 | |||
36 | #include <resolv.h> | ||
37 | |||
38 | +#if defined(OS_LINUX) && !defined(__GLIBC__) | ||
39 | +#include "net/dns/resolv_compat.h" | ||
40 | +#endif | ||
41 | + | ||
42 | #include "base/lazy_instance.h" | ||
43 | #include "base/logging.h" | ||
44 | #include "base/macros.h" | ||
45 | diff --git a/chromium/net/dns/resolv_compat.h b/chromium/net/dns/resolv_compat.h | ||
46 | new file mode 100644 | ||
47 | index 0000000000..4f0e852a19 | ||
48 | --- /dev/null | ||
49 | +++ b/chromium/net/dns/resolv_compat.h | ||
50 | @@ -0,0 +1,29 @@ | ||
51 | +#if !defined(__GLIBC__) | ||
52 | +/*************************************************************************** | ||
53 | + * resolv_compat.h | ||
54 | + * | ||
55 | + * Mimick GLIBC's res_ninit() and res_nclose() for musl libc | ||
56 | + * Note: res_init() is actually deprecated according to | ||
57 | + * http://docs.oracle.com/cd/E36784_01/html/E36875/res-nclose-3resolv.html | ||
58 | + **************************************************************************/ | ||
59 | +#include <string.h> | ||
60 | + | ||
61 | +static inline int res_ninit(res_state statp) | ||
62 | +{ | ||
63 | + int rc = res_init(); | ||
64 | + if (statp != &_res) { | ||
65 | + memcpy(statp, &_res, sizeof(*statp)); | ||
66 | + } | ||
67 | + return rc; | ||
68 | +} | ||
69 | + | ||
70 | +static inline int res_nclose(res_state statp) | ||
71 | +{ | ||
72 | + if (!statp) | ||
73 | + return -1; | ||
74 | + if (statp != &_res) { | ||
75 | + memset(statp, 0, sizeof(*statp)); | ||
76 | + } | ||
77 | + return 0; | ||
78 | +} | ||
79 | +#endif | ||
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Do-not-define-__sbrk-on-musl.patch b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Do-not-define-__sbrk-on-musl.patch new file mode 100644 index 00000000..e84290e3 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0012-chromium-musl-Do-not-define-__sbrk-on-musl.patch | |||
@@ -0,0 +1,26 @@ | |||
1 | From bc578326c48554e2123640869199d0d4505fa357 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 7 Jul 2017 15:39:57 -0700 | ||
4 | Subject: [PATCH] chromium: musl: Do not define __sbrk on musl | ||
5 | |||
6 | musl libc does not have sbrk. on musl libc will only work when called with 0 as | ||
7 | argument, so we just let it out for now | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | .../third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | 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 | ||
15 | index edc8cf2db7..a868b50d30 100644 | ||
16 | --- a/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h | ||
17 | +++ b/chromium/third_party/tcmalloc/chromium/src/malloc_hook_mmap_linux.h | ||
18 | @@ -233,7 +233,7 @@ extern "C" void* mremap(void* old_addr, size_t old_size, size_t new_size, | ||
19 | } | ||
20 | |||
21 | // Don't hook sbrk() in Android, since it doesn't expose __sbrk. | ||
22 | -#if !defined(__ANDROID__) | ||
23 | +#if !defined(__ANDROID__) && defined(__GLIBC__) | ||
24 | // libc's version: | ||
25 | extern "C" void* __sbrk(ptrdiff_t increment); | ||
26 | |||
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Adjust-default-pthread-stack-size.patch b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Adjust-default-pthread-stack-size.patch new file mode 100644 index 00000000..7fee0d61 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0013-chromium-musl-Adjust-default-pthread-stack-size.patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From c2bf9db1e3d32a756bcce69c1bc5ce38941b3cd4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 7 Jul 2017 16:41:23 -0700 | ||
4 | Subject: [PATCH] chromium: musl: Adjust default pthread stack size | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | chromium/base/threading/platform_thread_linux.cc | 3 ++- | ||
9 | chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp | 4 ++-- | ||
10 | 2 files changed, 4 insertions(+), 3 deletions(-) | ||
11 | |||
12 | diff --git a/chromium/base/threading/platform_thread_linux.cc b/chromium/base/threading/platform_thread_linux.cc | ||
13 | index 9917a7b1fd..cb406659b9 100644 | ||
14 | --- a/chromium/base/threading/platform_thread_linux.cc | ||
15 | +++ b/chromium/base/threading/platform_thread_linux.cc | ||
16 | @@ -173,7 +173,8 @@ void TerminateOnThread() {} | ||
17 | |||
18 | size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) { | ||
19 | #if !defined(THREAD_SANITIZER) | ||
20 | - return 0; | ||
21 | + // use 8mb like glibc to avoid running out of space | ||
22 | + return (1 << 23); | ||
23 | #else | ||
24 | // ThreadSanitizer bloats the stack heavily. Evidence has been that the | ||
25 | // default stack size isn't enough for some browser tests. | ||
26 | diff --git a/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp b/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp | ||
27 | index 13c3f907f8..07308e0835 100644 | ||
28 | --- a/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp | ||
29 | +++ b/chromium/third_party/WebKit/Source/platform/wtf/StackUtil.cpp | ||
30 | @@ -28,7 +28,7 @@ size_t GetUnderestimatedStackSize() { | ||
31 | // FIXME: On Mac OSX and Linux, this method cannot estimate stack size | ||
32 | // correctly for the main thread. | ||
33 | |||
34 | -#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ | ||
35 | +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ | ||
36 | defined(OS_FUCHSIA) | ||
37 | // pthread_getattr_np() can fail if the thread is not invoked by | ||
38 | // pthread_create() (e.g., the main thread of webkit_unit_tests). | ||
39 | @@ -96,7 +96,7 @@ size_t GetUnderestimatedStackSize() { | ||
40 | } | ||
41 | |||
42 | void* GetStackStart() { | ||
43 | -#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ | ||
44 | +#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \ | ||
45 | defined(OS_FUCHSIA) | ||
46 | pthread_attr_t attr; | ||
47 | int error; | ||
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-include-asm-generic-ioctl.h-for-TCGETS.patch b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-include-asm-generic-ioctl.h-for-TCGETS.patch new file mode 100644 index 00000000..bf4f362f --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0014-chromium-musl-include-asm-generic-ioctl.h-for-TCGETS.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | From 26bdd2d86b57adb8f87081f102431854a55c734a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 7 Jul 2017 17:15:34 -0700 | ||
4 | Subject: [PATCH] chromium: musl: include asm-generic/ioctl.h for TCGETS2 | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | chromium/device/serial/serial_io_handler_posix.cc | 1 + | ||
9 | 1 file changed, 1 insertion(+) | ||
10 | |||
11 | diff --git a/chromium/device/serial/serial_io_handler_posix.cc b/chromium/device/serial/serial_io_handler_posix.cc | ||
12 | index d6ed5e1f88..b550f895ef 100644 | ||
13 | --- a/chromium/device/serial/serial_io_handler_posix.cc | ||
14 | +++ b/chromium/device/serial/serial_io_handler_posix.cc | ||
15 | @@ -6,6 +6,7 @@ | ||
16 | |||
17 | #include <sys/ioctl.h> | ||
18 | #include <termios.h> | ||
19 | +#include <asm-generic/ioctls.h> | ||
20 | |||
21 | #include "base/files/file_util.h" | ||
22 | #include "base/posix/eintr_wrapper.h" | ||
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-tcmalloc-Use-off64_t-insread-of-__off6.patch b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-tcmalloc-Use-off64_t-insread-of-__off6.patch new file mode 100644 index 00000000..3d322708 --- /dev/null +++ b/recipes-qt/qt5/qtwebengine/chromium/0015-chromium-musl-tcmalloc-Use-off64_t-insread-of-__off6.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | From feabe4c75c5e86dbe2c624da9423f2ad82c6bfac Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 8 Jul 2017 09:08:23 -0700 | ||
4 | Subject: [PATCH] chromium: musl: tcmalloc: Use off64_t insread of __off64_t | ||
5 | |||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
7 | --- | ||
8 | .../tcmalloc/chromium/src/base/linux_syscall_support.h | 2 +- | ||
9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
10 | |||
11 | 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 | ||
12 | index 91f77dd88d..bb84a0b305 100644 | ||
13 | --- a/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h | ||
14 | +++ b/chromium/third_party/tcmalloc/chromium/src/base/linux_syscall_support.h | ||
15 | @@ -1929,7 +1929,7 @@ typedef unsigned long int ulong; | ||
16 | #if defined(__x86_64__) | ||
17 | /* Need to make sure __off64_t isn't truncated to 32-bits under x32. */ | ||
18 | LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, | ||
19 | - __off64_t o) { | ||
20 | + off64_t o) { | ||
21 | LSS_BODY(6, void*, mmap, LSS_SYSCALL_ARG(s), LSS_SYSCALL_ARG(l), | ||
22 | LSS_SYSCALL_ARG(p), LSS_SYSCALL_ARG(f), | ||
23 | LSS_SYSCALL_ARG(d), (uint64_t)(o)); | ||