aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-09-25 14:10:03 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2018-09-25 23:34:28 +0000
commit1ed9bcb1751df5e61f558bcb9172308de182fb3e (patch)
tree297623788fa086e3f410a58ea192cd80c225467d
parent24d6fc29ab806daadb5e4aa93b768b3cc76c2fc4 (diff)
qtwebengine: Add patches to fix breakpad in new webengine release on musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch65
-rw-r--r--recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch54
-rw-r--r--recipes-qt/qt5/qtwebengine_git.bb2
3 files changed, 121 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch
new file mode 100644
index 00000000..2be0cb07
--- /dev/null
+++ b/recipes-qt/qt5/qtwebengine/chromium/0016-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch
@@ -0,0 +1,65 @@
+From cd92f771ac37ae41d7a1abfd6fcc9d50aa7529d8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 25 Sep 2018 12:35:07 -0700
+Subject: [PATCH] Use _fpstate instead of _libc_fpstate on linux
+
+glibc defines both. musl libc only the former.
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ .../src/client/linux/dump_writer_common/ucontext_reader.cc | 4 ++--
+ .../src/client/linux/dump_writer_common/ucontext_reader.h | 2 +-
+ .../src/client/linux/minidump_writer/minidump_writer.h | 2 +-
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc b/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
+index 052ce37cb4..95b0fb44e1 100644
+--- a/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
++++ b/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
+@@ -49,7 +49,7 @@ uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+ }
+
+ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+- const struct _libc_fpstate* fp) {
++ const struct _fpstate* fp) {
+ const greg_t* regs = uc->uc_mcontext.gregs;
+
+ out->context_flags = MD_CONTEXT_X86_FULL |
+@@ -97,7 +97,7 @@ uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
+ }
+
+ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+- const struct _libc_fpstate* fpregs) {
++ const struct _fpstate* fpregs) {
+ const greg_t* regs = uc->uc_mcontext.gregs;
+
+ out->context_flags = MD_CONTEXT_AMD64_FULL;
+diff --git a/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h b/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
+index f830618f24..f3dde1f4df 100644
+--- a/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
++++ b/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
+@@ -50,7 +50,7 @@ struct UContextReader {
+ // info: the collection of register structures.
+ #if defined(__i386__) || defined(__x86_64)
+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+- const struct _libc_fpstate* fp);
++ const struct _fpstate* fp);
+ #elif defined(__aarch64__)
+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
+ const struct fpsimd_context* fpregs);
+diff --git a/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h b/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
+index d1dc331215..d1cc5624cd 100644
+--- a/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
++++ b/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
+@@ -48,7 +48,7 @@ class ExceptionHandler;
+ #if defined(__aarch64__)
+ typedef struct fpsimd_context fpstate_t;
+ #elif !defined(__ARM_EABI__) && !defined(__mips__)
+-typedef struct _libc_fpstate fpstate_t;
++typedef struct _fpstate fpstate_t;
+ #endif
+
+ // These entries store a list of memory regions that the client wants included
+--
+2.19.0
+
diff --git a/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch
new file mode 100644
index 00000000..6f34473d
--- /dev/null
+++ b/recipes-qt/qt5/qtwebengine/chromium/0017-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch
@@ -0,0 +1,54 @@
+From 986bf2ecd7b450dceff5cb0f3f76fe886b58d884 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 25 Sep 2018 12:59:05 -0700
+Subject: [PATCH] elf_reader.cc: include <sys/reg.h> to get __WORDSIZE on musl
+ libc
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ chromium/third_party/breakpad/breakpad/configure.ac | 2 +-
+ .../breakpad/breakpad/src/common/dwarf/elf_reader.cc | 5 ++++-
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+Index: 3rdparty/chromium/third_party/breakpad/breakpad/configure.ac
+===================================================================
+--- 3rdparty.orig/chromium/third_party/breakpad/breakpad/configure.ac
++++ 3rdparty/chromium/third_party/breakpad/breakpad/configure.ac
+@@ -72,7 +72,7 @@ AC_ARG_ENABLE(m32,
+ AC_HEADER_STDC
+ AC_SYS_LARGEFILE
+ AX_PTHREAD
+-AC_CHECK_HEADERS([a.out.h sys/random.h])
++AC_CHECK_HEADERS([a.out.h sys/random.h sys/reg.h])
+ AC_CHECK_FUNCS([arc4random getrandom])
+
+ AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
+Index: 3rdparty/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc
+===================================================================
+--- 3rdparty.orig/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc
++++ 3rdparty/chromium/third_party/breakpad/breakpad/src/common/dwarf/elf_reader.cc
+@@ -29,10 +29,11 @@
+ #ifndef _GNU_SOURCE
+ #define _GNU_SOURCE // needed for pread()
+ #endif
+-
++#include <config.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/mman.h>
++#include <sys/reg.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <string.h>
+Index: 3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h
+===================================================================
+--- 3rdparty.orig/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h
++++ 3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h
+@@ -33,6 +33,7 @@
+ #ifndef COMMON_LINUX_ELF_CORE_DUMP_H_
+ #define COMMON_LINUX_ELF_CORE_DUMP_H_
+
++#include <sys/reg.h>
+ #include <elf.h>
+ #include <link.h>
+ #include <stddef.h>
diff --git a/recipes-qt/qt5/qtwebengine_git.bb b/recipes-qt/qt5/qtwebengine_git.bb
index 44d224b1..a4469183 100644
--- a/recipes-qt/qt5/qtwebengine_git.bb
+++ b/recipes-qt/qt5/qtwebengine_git.bb
@@ -170,6 +170,8 @@ SRC_URI_append_libc-musl = "\
file://chromium/0013-chromium-musl-Adjust-default-pthread-stack-size.patch;patchdir=src/3rdparty \
file://chromium/0014-chromium-musl-include-asm-generic-ioctl.h-for-TCGETS.patch;patchdir=src/3rdparty \
file://chromium/0015-chromium-musl-tcmalloc-Use-off64_t-insread-of-__off6.patch;patchdir=src/3rdparty \
+ file://chromium/0016-chromium-musl-Use-_fpstate-instead-of-_libc_fpstate-on-linux.patch;patchdir=src/3rdparty \
+ file://chromium/0017-chromium-musl-elf_reader.cc-include-sys-reg.h-to-get-__WORDSIZE-on.patch;patchdir=src/3rdparty \
"
SRCREV_qtwebengine = "89afebb830f616a6e8c43dd37bf34551f243b264"