Compare commits

...
Sign in to create a new pull request.

15 commits

Author SHA1 Message Date
Marcin Juszkiewicz
2edd5deed1 Update RISC-V patches
Signed-off-by: Marcin Juszkiewicz <mjuszkiewicz@redhat.com>
2025-11-28 11:08:48 +01:00
Dominik 'Rathann' Mierzejewski
d8d589ef92 Rebuilt for Qt5 5.15.18 2025-11-05 15:03:00 +01:00
Dominik 'Rathann' Mierzejewski
a6329afd83 Fixed build with FFmpeg 8 2025-11-05 12:44:41 +01:00
Jan Grulich
a97b9f56ee Rebuild (qt5) 2025-11-04 12:25:18 +01:00
Jan Grulich
9bb2f62e7c Apply glibc patch only on F43+ 2025-11-03 13:02:32 +01:00
Jan Grulich
f1f25a4efc 5.15.19 2025-11-03 11:02:05 +01:00
František Zatloukal
e6d9905e69 Rebuilt for icu 77.1 2025-08-06 09:57:24 +02:00
Fedora Release Engineering
6bede6fbc6 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 11:32:56 +00:00
Jan Grulich
7c85dd7504 Rebuild (qt5) 2025-05-26 15:51:18 +02:00
Jan Grulich
2823a4df8c Switch to ld.bfd 2025-02-26 15:17:34 +01:00
Jan Grulich
baeb80cbc3 Fix build against GCC 15 2025-01-22 18:38:55 +01:00
Fedora Release Engineering
065e534d19 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-18 21:36:57 +00:00
Zephyr Lykos
e03692d5ba
5.15.18 2025-01-11 09:42:27 +08:00
Fabio Valentini
ee1201719d
Rebuild for ffmpeg 7 2024-09-23 17:00:38 +02:00
Miroslav Suchý
4968dc2faa convert license to SPDX
This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4
2024-09-04 21:19:33 +02:00
14 changed files with 4361 additions and 2846 deletions

10
.gitignore vendored
View file

@ -1,10 +1,2 @@
/qtwebengine-everywhere-src-*.tar.xz
/pulseaudio-12.2-headers.tar.gz
/qtwebengine-everywhere-src-5.15.8-clean.tar.xz
/python2.7-2.7.18-19.el9.1.src.rpm
/python2.7-2.7.18-19.el9.1.aarch64.rpm
/python2.7-2.7.18-19.el9.1.x86_64.rpm
/qtwebengine-everywhere-src-5.15.9-clean.tar.xz
/qtwebengine-everywhere-src-5.15.10-clean.tar.xz
/qtwebengine-everywhere-src-5.15.12-clean.tar.xz
/qtwebengine-everywhere-src-5.15.16-clean.tar.xz
/qtwebengine-everywhere-src-5.15.17-clean.tar.xz

View file

@ -1,26 +0,0 @@
Description: stop using imp module which was removed in Python 3.12
Origin: upstream, commits
https://chromium.googlesource.com/chromium/src/+/9e0c89a3b5638ba2
https://chromium.googlesource.com/chromium/src/+/f5f6e361d037c316
Last-Update: 2024-03-17
--- a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/fileutil.py
+++ b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/fileutil.py
@@ -3,7 +3,6 @@
# found in the LICENSE file.
import errno
-import imp
import os.path
import sys
--- a/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/parse/lexer.py
+++ b/src/3rdparty/chromium/mojo/public/tools/mojom/mojom/parse/lexer.py
@@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import imp
import os.path
import sys

View file

@ -0,0 +1,113 @@
diff -up qtwebengine-everywhere-src-5.15.18/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc.ffmpeg8 qtwebengine-everywhere-src-5.15.18/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc
--- qtwebengine-everywhere-src-5.15.18/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc.ffmpeg8 2025-11-02 21:41:06.931797956 +0000
+++ qtwebengine-everywhere-src-5.15.18/src/3rdparty/chromium/media/ffmpeg/ffmpeg_common.cc 2025-11-02 23:06:28.874349338 +0000
@@ -237,22 +237,22 @@ AVCodecID VideoCodecToCodecID(VideoCodec
static VideoCodecProfile ProfileIDToVideoCodecProfile(int profile) {
// Clear out the CONSTRAINED & INTRA flags which are strict subsets of the
// corresponding profiles with which they're used.
- profile &= ~FF_PROFILE_H264_CONSTRAINED;
- profile &= ~FF_PROFILE_H264_INTRA;
+ profile &= ~AV_PROFILE_H264_CONSTRAINED;
+ profile &= ~AV_PROFILE_H264_INTRA;
switch (profile) {
- case FF_PROFILE_H264_BASELINE:
+ case AV_PROFILE_H264_BASELINE:
return H264PROFILE_BASELINE;
- case FF_PROFILE_H264_MAIN:
+ case AV_PROFILE_H264_MAIN:
return H264PROFILE_MAIN;
- case FF_PROFILE_H264_EXTENDED:
+ case AV_PROFILE_H264_EXTENDED:
return H264PROFILE_EXTENDED;
- case FF_PROFILE_H264_HIGH:
+ case AV_PROFILE_H264_HIGH:
return H264PROFILE_HIGH;
- case FF_PROFILE_H264_HIGH_10:
+ case AV_PROFILE_H264_HIGH_10:
return H264PROFILE_HIGH10PROFILE;
- case FF_PROFILE_H264_HIGH_422:
+ case AV_PROFILE_H264_HIGH_422:
return H264PROFILE_HIGH422PROFILE;
- case FF_PROFILE_H264_HIGH_444_PREDICTIVE:
+ case AV_PROFILE_H264_HIGH_444_PREDICTIVE:
return H264PROFILE_HIGH444PREDICTIVEPROFILE;
default:
DVLOG(1) << "Unknown profile id: " << profile;
@@ -263,23 +263,23 @@ static VideoCodecProfile ProfileIDToVide
static int VideoCodecProfileToProfileID(VideoCodecProfile profile) {
switch (profile) {
case H264PROFILE_BASELINE:
- return FF_PROFILE_H264_BASELINE;
+ return AV_PROFILE_H264_BASELINE;
case H264PROFILE_MAIN:
- return FF_PROFILE_H264_MAIN;
+ return AV_PROFILE_H264_MAIN;
case H264PROFILE_EXTENDED:
- return FF_PROFILE_H264_EXTENDED;
+ return AV_PROFILE_H264_EXTENDED;
case H264PROFILE_HIGH:
- return FF_PROFILE_H264_HIGH;
+ return AV_PROFILE_H264_HIGH;
case H264PROFILE_HIGH10PROFILE:
- return FF_PROFILE_H264_HIGH_10;
+ return AV_PROFILE_H264_HIGH_10;
case H264PROFILE_HIGH422PROFILE:
- return FF_PROFILE_H264_HIGH_422;
+ return AV_PROFILE_H264_HIGH_422;
case H264PROFILE_HIGH444PREDICTIVEPROFILE:
- return FF_PROFILE_H264_HIGH_444_PREDICTIVE;
+ return AV_PROFILE_H264_HIGH_444_PREDICTIVE;
default:
DVLOG(1) << "Unknown VideoCodecProfile: " << profile;
}
- return FF_PROFILE_UNKNOWN;
+ return AV_PROFILE_UNKNOWN;
}
SampleFormat AVSampleFormatToSampleFormat(AVSampleFormat sample_format,
@@ -415,7 +415,7 @@ bool AVCodecContextToAudioDecoderConfig(
// TODO(dalecurtis): Just use the profile from the codec context if ffmpeg
// ever starts supporting xHE-AAC.
constexpr uint8_t kXHEAAc = 41;
- if (codec == kCodecAAC && codec_context->profile == FF_PROFILE_UNKNOWN ||
+ if (codec == kCodecAAC && codec_context->profile == AV_PROFILE_UNKNOWN ||
codec_context->profile == kXHEAAc) {
// Errors aren't fatal here, so just drop any MediaLog messages.
NullMediaLog media_log;
@@ -537,16 +537,16 @@ bool AVStreamToVideoDecoderConfig(const
break;
case kCodecVP9:
switch (codec_context->profile) {
- case FF_PROFILE_VP9_0:
+ case AV_PROFILE_VP9_0:
profile = VP9PROFILE_PROFILE0;
break;
- case FF_PROFILE_VP9_1:
+ case AV_PROFILE_VP9_1:
profile = VP9PROFILE_PROFILE1;
break;
- case FF_PROFILE_VP9_2:
+ case AV_PROFILE_VP9_2:
profile = VP9PROFILE_PROFILE2;
break;
- case FF_PROFILE_VP9_3:
+ case AV_PROFILE_VP9_3:
profile = VP9PROFILE_PROFILE3;
break;
default:
@@ -645,9 +645,15 @@ bool AVStreamToVideoDecoderConfig(const
coded_size, visible_rect, natural_size, extra_data,
GetEncryptionScheme(stream));
+#if (LIBAVFORMAT_VERSION_MAJOR < 62)
if (stream->nb_side_data) {
for (int i = 0; i < stream->nb_side_data; ++i) {
AVPacketSideData side_data = stream->side_data[i];
+#else
+ if (stream->codecpar->nb_coded_side_data) {
+ for (int i = 0; i < stream->codecpar->nb_coded_side_data; ++i) {
+ const auto& side_data = stream->codecpar->coded_side_data[i];
+#endif
if (side_data.type != AV_PKT_DATA_MASTERING_DISPLAY_METADATA)
continue;

View file

@ -47,13 +47,14 @@
Summary: Qt5 - QtWebEngine components
Name: qt5-qtwebengine
Version: 5.15.17
Release: 9%{?dist}
Version: 5.15.19
Release: 5%{?dist}
# See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details
# See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html
# The other licenses are from Chromium and the code it bundles
License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2)
# Automatically converted from old format: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2) - review is highly recommended.
License: (LGPL-2.0-or-later WITH FLTK-exception OR LicenseRef-Callaway-GPLv3-with-exceptions) AND LicenseRef-Callaway-BSD AND LicenseRef-Callaway-LGPLv2+ AND Apache-2.0 AND IJG AND LicenseRef-Callaway-MIT AND GPL-2.0-or-later AND ISC AND OpenSSL AND (LicenseRef-Callaway-MPLv1.1 OR GPL-2.0-only OR LicenseRef-Callaway-LGPLv2)
URL: http://www.qt.io
# cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg
# ./qtwebengine-release.sh
@ -90,22 +91,31 @@ Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch
Patch32: qtwebengine-skia-missing-includes.patch
Patch34: qtwebengine-fix-build.patch
Patch35: qt5-qtwebengine-c99.patch
Patch36: qtwebengine-chromium-141-glibc-2.42-SYS_SECCOMP.patch
# Working with ffmpeg
Patch60: qtwebengine-ffmpeg5.patch
# Adapt for ffmpeg7 (from openSUSE)
Patch61: qt5-qtwebengine-ffmpeg7.patch
# Adapt for ffmpeg8
Patch62: qt5-qtwebengine-ffmpeg8.patch
# Fix build
Patch70: qtwebengine-5.15.13_p20240322-ninja1.12.patch
Patch71: fix_build_pdf_extension_util.patch
Patch72: python3.12-imp.patch
Patch73: python3.12-six.patch
Patch74: python3.13-pipes.patch
# riscv64 support patch from https://github.com/felixonmars/archriscv-packages/tree/master/qt5-webengine
Patch100: v8.patch
# Fix building with ICU 75
# https://gitlab.archlinux.org/archlinux/packaging/packages/qt5-webengine/-/blob/97c4d298f/qt5-webengine-icu-75.patch
Patch80: qtwebengine-icu75.patch
# riscv64 support patches taken from Opensuse:
# https://build.opensuse.org/package/show/openSUSE:Factory:RISCV/libqt5-qtwebengine?rev=110
Patch100: riscv-v8.patch
Patch101: riscv.patch
Patch102: riscv-breakpad.patch
Patch103: riscv-crashpad.patch
Patch104: riscv-sandbox.patch
## Upstream patches:
@ -131,7 +141,6 @@ BuildRequires: cmake
BuildRequires: bison
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: binutils-gold
# gn links statically (for now)
BuildRequires: libstdc++-static
BuildRequires: git-core
@ -380,21 +389,27 @@ popd
%patch -P24 -p1 -b .aarch64-new-stat
%patch -P32 -p1 -b .skia-missing-includes
%patch -P34 -p1 -b .fix-build
%patch -P35 -p1 -b .c99
%if 0%{?fedora} > 43
%patch -P36 -p1 -b .chromium-141-glibc-2.42-SYS_SECCOMP
%endif
%patch -P60 -p1
%patch -P61 -p1
%patch -P62 -p1 -b .ffmpeg8
%patch -P70 -p1
%patch -P71 -p1
%patch -P72 -p1
%patch -P73 -p1
%patch -P74 -p1
%ifarch riscv64
%patch -P80 -p1
# RISC-V support patches
%patch -P100 -p1 -b .riscv64-v8
%patch -P101 -p1 -b .riscv64
%endif
%patch -P102 -p1 -b .riscv64-breakpad
%patch -P103 -p1 -b .riscv64-crashpad
%patch -P104 -p1 -b .riscv64-sandbox
# delete all "toolprefix = " lines from build/toolchain/linux/BUILD.gn, as we
# never cross-compile in native Fedora RPMs, fixes ARM and aarch64 FTBFS
@ -422,11 +437,7 @@ export NINJA_PATH=%{__ninja}
%{qmake_qt5} \
%{?debug_config:CONFIG+="%{debug_config}}" \
%ifarch riscv64
CONFIG+="link_pulseaudio" \
%else
CONFIG+="link_pulseaudio use_gold_linker" \
%endif
QMAKE_EXTRA_ARGS+="-system-webengine-ffmpeg -system-webengine-webp -system-webengine-opus" \
QMAKE_EXTRA_ARGS+="-webengine-kerberos -webengine-python-version python3" \
%{?use_system_libicu:QMAKE_EXTRA_ARGS+="-system-webengine-icu"} \
@ -575,6 +586,45 @@ done
%{_qt5_examplesdir}/
%changelog
* Thu Nov 27 2025 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 5.15.19-5
- Update RISC-V patches
* Wed Nov 05 2025 Dominik Mierzejewski <dominik@greysector.net> - 5.15.19-4
- Rebuilt for Qt5 5.15.18
* Wed Nov 05 2025 Dominik Mierzejewski <dominik@greysector.net> - 5.15.19-3
- Fixed build with FFmpeg 8
* Tue Nov 04 2025 Jan Grulich <jgrulich@redhat.com> - 5.15.19-2
- Rebuild (qt5)
* Mon Nov 03 2025 Jan Grulich <jgrulich@redhat.com> - 5.15.19-1
- 5.15.19
* Wed Aug 06 2025 František Zatloukal <fzatlouk@redhat.com> - 5.15.18-6
- Rebuilt for icu 77.1
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 5.15.18-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Mon May 26 2025 Jan Grulich <jgrulich@redhat.com> - 5.15.18-4
- Rebuild (qt5)
* Wed Feb 26 2025 Jan Grulich <jgrulich@redhat.com> - 5.15.18-3
- Switch to ld.bfd
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 5.15.18-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Thu Jan 09 2025 Zephyr Lykos <fedora@mochaa.ws> - 5.15.18-1
- 5.15.18
* Mon Sep 23 2024 Fabio Valentini <decathorpe@gmail.com> - 5.15.17-11
- Rebuild for ffmpeg 7
* Wed Sep 04 2024 Miroslav Suchý <msuchy@redhat.com> - 5.15.17-10
- convert license to SPDX
* Wed Sep 04 2024 Jan Grulich <jgrulich@redhat.com> - 5.15.17-9
- Rebuild (qt5)

View file

@ -0,0 +1,29 @@
Fix FTBFS
/usr/include/bits/siginfo-consts.h:219:3: error: expected identifier
219 | SYS_SECCOMP = 1, /* Seccomp triggered. */
| ^
../../sandbox/linux/system_headers/linux_seccomp.h:220:39: note: expanded from macro 'SYS_SECCOMP'
220 | #define SYS_SECCOMP 1
| ^
../../sandbox/linux/seccomp-bpf/trap.cc:159:46: error: use of undeclared identifier 'SYS_SECCOMP'
159 | if (nr != LINUX_SIGSYS || info->si_code != SYS_SECCOMP || !ctx ||
| ^~~~~~~~~~~
/usr/include/bits/siginfo-consts.h:220:23: note: expanded from macro 'SYS_SECCOMP'
220 | # define SYS_SECCOMP SYS_SECCOMP
diff -up chromium-141.0.7390.122/src/3rdparty/chromium/sandbox/linux/system_headers/linux_seccomp.h.me chromium-141.0.7390.122/src/3rdparty/chromium/sandbox/linux/system_headers/linux_seccomp.h
--- chromium-141.0.7390.122/src/3rdparty/chromium/sandbox/linux/system_headers/linux_seccomp.h.me 2025-10-28 10:05:44.970248151 +0100
+++ chromium-141.0.7390.122/src/3rdparty/chromium/sandbox/linux/system_headers/linux_seccomp.h 2025-10-28 10:05:52.291345772 +0100
@@ -214,8 +214,11 @@ struct seccomp_notif_addfd {
#define SECCOMP_RET_INVALID 0x00010000U // Illegal return value
#endif
+// check glibc version < 2.42
+#if (__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 42)
#ifndef SYS_SECCOMP
#define SYS_SECCOMP 1
#endif
+#endif
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SECCOMP_H_

View file

@ -211,3 +211,221 @@ index 5adfbbe7e..4e5c59e33 100644
namespace QtWebEngineCore {
class BrowsingDataRemoverDelegateQt : public content::BrowsingDataRemoverDelegate {
diff --git a/src/3rdparty/chromium/third_party/webrtc/api/task_queue/task_queue_base.h b/src/3rdparty/chromium/third_party/webrtc/api/task_queue/task_queue_base.h
index 90b1efd31..63526a738 100644
--- a/src/3rdparty/chromium/third_party/webrtc/api/task_queue/task_queue_base.h
+++ b/src/3rdparty/chromium/third_party/webrtc/api/task_queue/task_queue_base.h
@@ -10,6 +10,7 @@
#ifndef API_TASK_QUEUE_TASK_QUEUE_BASE_H_
#define API_TASK_QUEUE_TASK_QUEUE_BASE_H_
+#include <cstdint>
#include <memory>
#include "api/task_queue/queued_task.h"
diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.cc
index 8a30c7f32..4934432cc 100644
--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.cc
+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.cc
@@ -20,6 +20,8 @@
#include "perfetto/base/build_config.h"
#include "perfetto/base/compiler.h"
+#include <cstdint>
+
#if PERFETTO_BUILDFLAG(PERFETTO_ZLIB)
#include <zlib.h>
#else
diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.h b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.h
index 624363ff6..6d717fba4 100644
--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.h
+++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/gzip/gzip_utils.h
@@ -17,6 +17,7 @@
#ifndef SRC_TRACE_PROCESSOR_IMPORTERS_GZIP_GZIP_UTILS_H_
#define SRC_TRACE_PROCESSOR_IMPORTERS_GZIP_GZIP_UTILS_H_
+#include <cstdint>
#include <memory>
struct z_stream_s;
diff --git a/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/tracing/core/slice.h b/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/tracing/core/slice.h
index 4ce66fdea..3f3932b22 100644
--- a/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/tracing/core/slice.h
+++ b/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/tracing/core/slice.h
@@ -20,6 +20,7 @@
#include <stddef.h>
#include <string.h>
+#include <cstdint>
#include <memory>
#include <string>
#include <vector>
diff --git a/src/3rdparty/chromium/third_party/perfetto/src/tracing/core/trace_packet.cc b/src/3rdparty/chromium/third_party/perfetto/src/tracing/core/trace_packet.cc
index 0dea150c1..c3def1683 100644
--- a/src/3rdparty/chromium/third_party/perfetto/src/tracing/core/trace_packet.cc
+++ b/src/3rdparty/chromium/third_party/perfetto/src/tracing/core/trace_packet.cc
@@ -19,6 +19,8 @@
#include "perfetto/base/logging.h"
#include "perfetto/protozero/proto_utils.h"
+#include <cstdint>
+
namespace perfetto {
TracePacket::TracePacket() = default;
diff --git a/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/tracing_backend.h b/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/tracing_backend.h
index 67b0d2eb5..3c2462de5 100644
--- a/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/tracing_backend.h
+++ b/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/tracing_backend.h
@@ -17,6 +17,7 @@
#ifndef INCLUDE_PERFETTO_TRACING_TRACING_BACKEND_H_
#define INCLUDE_PERFETTO_TRACING_TRACING_BACKEND_H_
+#include <cstdint>
#include <memory>
#include <string>
diff --git a/src/3rdparty/chromium/base/task/thread_pool.h b/src/3rdparty/chromium/base/task/thread_pool.h
index 085c249ba..afc674ca7 100644
--- a/src/3rdparty/chromium/base/task/thread_pool.h
+++ b/src/3rdparty/chromium/base/task/thread_pool.h
@@ -5,6 +5,7 @@
#ifndef BASE_TASK_THREAD_POOL_H_
#define BASE_TASK_THREAD_POOL_H_
+#include <cstdint>
#include <memory>
#include <utility>
diff --git a/src/3rdparty/chromium/net/tools/huffman_trie/trie_entry.h b/src/3rdparty/chromium/net/tools/huffman_trie/trie_entry.h
index fe70260f9..eac6a7fc2 100644
--- a/src/3rdparty/chromium/net/tools/huffman_trie/trie_entry.h
+++ b/src/3rdparty/chromium/net/tools/huffman_trie/trie_entry.h
@@ -5,6 +5,7 @@
#ifndef NET_TOOLS_HUFFMAN_TRIE_TRIE_ENTRY_H_
#define NET_TOOLS_HUFFMAN_TRIE_TRIE_ENTRY_H_
+#include <cstdint>
#include <memory>
#include <string>
#include <vector>
diff --git a/src/3rdparty/chromium/third_party/webrtc/api/fec_controller.h b/src/3rdparty/chromium/third_party/webrtc/api/fec_controller.h
index 3e5f7bb21..87777a53f 100644
--- a/src/3rdparty/chromium/third_party/webrtc/api/fec_controller.h
+++ b/src/3rdparty/chromium/third_party/webrtc/api/fec_controller.h
@@ -11,6 +11,7 @@
#ifndef API_FEC_CONTROLLER_H_
#define API_FEC_CONTROLLER_H_
+#include <cstdint>
#include <memory>
#include <vector>
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/timestamp_map.h b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/timestamp_map.h
index c85666c9a..dfb90e447 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/timestamp_map.h
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/video_coding/timestamp_map.h
@@ -11,6 +11,7 @@
#ifndef MODULES_VIDEO_CODING_TIMESTAMP_MAP_H_
#define MODULES_VIDEO_CODING_TIMESTAMP_MAP_H_
+#include <cstdint>
#include <memory>
namespace webrtc {
diff --git a/src/3rdparty/chromium/third_party/webrtc/api/network_state_predictor.h b/src/3rdparty/chromium/third_party/webrtc/api/network_state_predictor.h
index 9cf5ab6f0..2d165baa5 100644
--- a/src/3rdparty/chromium/third_party/webrtc/api/network_state_predictor.h
+++ b/src/3rdparty/chromium/third_party/webrtc/api/network_state_predictor.h
@@ -11,6 +11,7 @@
#ifndef API_NETWORK_STATE_PREDICTOR_H_
#define API_NETWORK_STATE_PREDICTOR_H_
+#include <cstdint>
#include <memory>
#include <vector>
diff --git a/src/3rdparty/chromium/gpu/command_buffer/common/skia_utils.h b/src/3rdparty/chromium/gpu/command_buffer/common/skia_utils.h
index 6508d79a1..a9f9528f1 100644
--- a/src/3rdparty/chromium/gpu/command_buffer/common/skia_utils.h
+++ b/src/3rdparty/chromium/gpu/command_buffer/common/skia_utils.h
@@ -5,6 +5,7 @@
#ifndef GPU_COMMAND_BUFFER_COMMON_SKIA_UTILS_H_
#define GPU_COMMAND_BUFFER_COMMON_SKIA_UTILS_H_
+#include <cstdint>
#include <memory>
#include "base/optional.h"
diff --git a/src/3rdparty/chromium/gpu/command_buffer/service/gpu_fence_manager.h b/src/3rdparty/chromium/gpu/command_buffer/service/gpu_fence_manager.h
index ee50d6fdd..576f6e3bc 100644
--- a/src/3rdparty/chromium/gpu/command_buffer/service/gpu_fence_manager.h
+++ b/src/3rdparty/chromium/gpu/command_buffer/service/gpu_fence_manager.h
@@ -5,6 +5,7 @@
#ifndef GPU_COMMAND_BUFFER_SERVICE_GPU_FENCE_MANAGER_H_
#define GPU_COMMAND_BUFFER_SERVICE_GPU_FENCE_MANAGER_H_
+#include <cstdint>
#include <memory>
#include <vector>
diff --git a/src/3rdparty/chromium/third_party/pdfium/core/fpdfapi/page/cpdf_function.h b/src/3rdparty/chromium/third_party/pdfium/core/fpdfapi/page/cpdf_function.h
index fd68b6b49..dc7c015d5 100644
--- a/src/3rdparty/chromium/third_party/pdfium/core/fpdfapi/page/cpdf_function.h
+++ b/src/3rdparty/chromium/third_party/pdfium/core/fpdfapi/page/cpdf_function.h
@@ -7,6 +7,7 @@
#ifndef CORE_FPDFAPI_PAGE_CPDF_FUNCTION_H_
#define CORE_FPDFAPI_PAGE_CPDF_FUNCTION_H_
+#include <cstdint>
#include <memory>
#include <set>
#include <vector>
diff --git a/src/3rdparty/chromium/third_party/pdfium/core/fxcodec/jbig2/JBig2_DocumentContext.h b/src/3rdparty/chromium/third_party/pdfium/core/fxcodec/jbig2/JBig2_DocumentContext.h
index 9bcdd371e..5921794f1 100644
--- a/src/3rdparty/chromium/third_party/pdfium/core/fxcodec/jbig2/JBig2_DocumentContext.h
+++ b/src/3rdparty/chromium/third_party/pdfium/core/fxcodec/jbig2/JBig2_DocumentContext.h
@@ -7,6 +7,7 @@
#ifndef CORE_FXCODEC_JBIG2_JBIG2_DOCUMENTCONTEXT_H_
#define CORE_FXCODEC_JBIG2_JBIG2_DOCUMENTCONTEXT_H_
+#include <cstdint>
#include <list>
#include <memory>
#include <utility>
diff --git a/src/3rdparty/chromium/third_party/pdfium/third_party/base/span.h b/src/3rdparty/chromium/third_party/pdfium/third_party/base/span.h
index bb07f43a0..0b7daf775 100644
--- a/src/3rdparty/chromium/third_party/pdfium/third_party/base/span.h
+++ b/src/3rdparty/chromium/third_party/pdfium/third_party/base/span.h
@@ -9,6 +9,7 @@
#include <algorithm>
#include <array>
+#include <cstdint>
#include <iterator>
#include <type_traits>
#include <utility>
diff --git a/src/3rdparty/chromium/third_party/webrtc/video/stats_counter.h b/src/3rdparty/chromium/third_party/webrtc/video/stats_counter.h
index fb6017f41..ed5530ca0 100644
--- a/src/3rdparty/chromium/third_party/webrtc/video/stats_counter.h
+++ b/src/3rdparty/chromium/third_party/webrtc/video/stats_counter.h
@@ -11,6 +11,7 @@
#ifndef VIDEO_STATS_COUNTER_H_
#define VIDEO_STATS_COUNTER_H_
+#include <cstdint>
#include <memory>
#include <string>
diff --git a/src/3rdparty/chromium/third_party/woff2/include/woff2/output.h b/src/3rdparty/chromium/third_party/woff2/include/woff2/output.h
index c325f67be..5c4dc4d18 100644
--- a/src/3rdparty/chromium/third_party/woff2/include/woff2/output.h
+++ b/src/3rdparty/chromium/third_party/woff2/include/woff2/output.h
@@ -10,6 +10,7 @@
#define WOFF2_WOFF2_OUT_H_
#include <algorithm>
+#include <cstdint>
#include <cstring>
#include <memory>
#include <string>

99
qtwebengine-icu75.patch Normal file
View file

@ -0,0 +1,99 @@
diff --git a/src/3rdparty/chromium/build/config/compiler/BUILD.gn b/src/3rdparty/chromium/build/config/compiler/BUILD.gn
index b511a58c5a8..abd78a74ead 100644
--- a/src/3rdparty/chromium/build/config/compiler/BUILD.gn
+++ b/src/3rdparty/chromium/build/config/compiler/BUILD.gn
@@ -566,7 +566,7 @@ config("compiler") {
# Override Chromium's default for projects that wish to stay on C++11.
cflags_cc += [ "-std=${standard_prefix}++11" ]
} else {
- cflags_cc += [ "-std=${standard_prefix}++14" ]
+ cflags_cc += [ "-std=${standard_prefix}++17" ]
}
} else if (!is_win && !is_nacl) {
if (target_os == "android") {
diff --git a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h
index f03ba1e4ab4..b1495f7ae74 100644
--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h
+++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc_constants.h
@@ -195,7 +195,7 @@ NumPartitionPagesPerSuperPage() {
//
// __STDCPP_DEFAULT_NEW_ALIGNMENT__ is C++17. As such, it is not defined on all
// platforms, as Chrome's requirement is C++14 as of 2020.
-#if defined(__STDCPP_DEFAULT_NEW_ALIGNMENT__)
+#if 0
static constexpr size_t kAlignment =
std::max(alignof(std::max_align_t), __STDCPP_DEFAULT_NEW_ALIGNMENT__);
#else
diff --git a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h
index 76e627d27a3..942435f44a0 100644
--- a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h
+++ b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/sps_parser.h
@@ -12,6 +12,7 @@
#define COMMON_VIDEO_H264_SPS_PARSER_H_
#include "absl/types/optional.h"
+#include <cstdint>
namespace rtc {
class BitBuffer;
diff --git a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h
index d6c31b06887..d8852dfd186 100644
--- a/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h
+++ b/src/3rdparty/chromium/third_party/webrtc/common_video/h264/pps_parser.h
@@ -12,6 +12,7 @@
#define COMMON_VIDEO_H264_PPS_PARSER_H_
#include "absl/types/optional.h"
+#include <cstdint>
namespace rtc {
class BitBuffer;
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h
index 3b9971abae1..d4458038527 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/reverb_model_estimator.h
@@ -13,6 +13,7 @@
#include <array>
#include <vector>
+#include <memory>
#include "absl/types/optional.h"
#include "api/array_view.h"
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h b/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h
index 345e45ce127..e686e5d691a 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/include/module_common_types_public.h
@@ -12,6 +12,7 @@
#define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
#include <limits>
+#include <cstdint>
#include "absl/types/optional.h"
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc b/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc
index 8fcc799b795..bc69ddcf18c 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/core/page/scrolling/text_fragment_selector_generator.cc
@@ -15,6 +15,7 @@
#include "third_party/blink/renderer/core/page/scrolling/text_fragment_anchor_metrics.h"
#include "third_party/blink/renderer/core/page/scrolling/text_fragment_finder.h"
#include "third_party/blink/renderer/platform/text/text_boundaries.h"
+#include "absl/base/attributes.h"
namespace blink {
diff --git a/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h b/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h
index df506f0fae6..1de105fed4a 100644
--- a/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h
+++ b/src/3rdparty/chromium/third_party/abseil-cpp/absl/base/options.h
@@ -180,7 +180,7 @@
// absl::variant is a typedef of std::variant, use the feature macro
// ABSL_USES_STD_VARIANT.
-#define ABSL_OPTION_USE_STD_VARIANT 2
+#define ABSL_OPTION_USE_STD_VARIANT 0
// ABSL_OPTION_USE_INLINE_NAMESPACE

View file

@ -1,6 +1,6 @@
#!/bin/sh
set -x
VERSION=5.15.17
VERSION=5.15.19
CHROMIUMHASH=`wget https://code.qt.io/cgit/qt/qtwebengine.git/tree/src/3rdparty?h=$VERSION -q --content-on-error -O - | grep "Bad object name: " | sed 's/^.*Bad object name: \([0-9a-f]\{40\}\).*$/\1/g'`
rm -rf qtwebengine-$VERSION qtwebengine-$VERSION.tar.gz qtwebengine-chromium-$CHROMIUMHASH qtwebengine-chromium-$CHROMIUMHASH.tar.gz qtwebengine-everywhere-src-$VERSION
wget https://github.com/qt/qtwebengine/archive/$VERSION.tar.gz -O qtwebengine-$VERSION.tar.gz || exit $?

540
riscv-breakpad.patch Normal file
View file

@ -0,0 +1,540 @@
riscv64 support patch taken from Opensuse:
https://build.opensuse.org/package/show/openSUSE:Factory:RISCV/libqt5-qtwebengine?rev=110
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
@@ -44,6 +44,8 @@ typedef MDRawContextARM RawContextCPU;
typedef MDRawContextARM64_Old RawContextCPU;
#elif defined(__mips__)
typedef MDRawContextMIPS RawContextCPU;
+#elif defined(__riscv)
+typedef MDRawContextRISCV64 RawContextCPU;
#else
#error "This code has not been ported to your platform yet."
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
@@ -270,7 +270,23 @@ void ThreadInfo::FillCPUContext(RawConte
out->float_save.fir = mcontext.fpc_eir;
#endif
}
-#endif // __mips__
+#elif defined(__riscv)
+
+uintptr_t ThreadInfo::GetInstructionPointer() const {
+ return mcontext.__gregs[REG_PC];
+}
+
+void ThreadInfo::FillCPUContext(RawContextCPU* out) const {
+ out->context_flags = MD_CONTEXT_RISCV64_FULL;
+
+ my_memcpy (out->iregs, mcontext.__gregs, MD_CONTEXT_RISCV64_GPR_COUNT * 8);
+
+ out->float_save.fcsr = mcontext.__fpregs.__d.__fcsr;
+ my_memcpy(&out->float_save.regs, &mcontext.__fpregs.__d.__f,
+ MD_FLOATINGSAVEAREA_RISCV64_FPR_COUNT * 8);
+}
+
+#endif // __riscv
void ThreadInfo::GetGeneralPurposeRegisters(void** gp_regs, size_t* size) {
assert(gp_regs || size);
@@ -279,6 +295,11 @@ void ThreadInfo::GetGeneralPurposeRegist
*gp_regs = mcontext.gregs;
if (size)
*size = sizeof(mcontext.gregs);
+#elif defined(__riscv)
+ if (gp_regs)
+ *gp_regs = mcontext.__gregs;
+ if (size)
+ *size = sizeof(mcontext.__gregs);
#else
if (gp_regs)
*gp_regs = &regs;
@@ -294,6 +315,11 @@ void ThreadInfo::GetFloatingPointRegiste
*fp_regs = &mcontext.fpregs;
if (size)
*size = sizeof(mcontext.fpregs);
+#elif defined(__riscv)
+ if (fp_regs)
+ *fp_regs = &mcontext.__fpregs;
+ if (size)
+ *size = sizeof(mcontext.__fpregs);
#else
if (fp_regs)
*fp_regs = &fpregs;
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
@@ -68,7 +68,7 @@ struct ThreadInfo {
// Use the structures defined in <sys/user.h>
struct user_regs_struct regs;
struct user_fpsimd_struct fpregs;
-#elif defined(__mips__)
+#elif defined(__mips__) || defined(__riscv)
// Use the structure defined in <sys/ucontext.h>.
mcontext_t mcontext;
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
@@ -461,7 +461,7 @@ bool ExceptionHandler::HandleSignal(int
memcpy(&g_crash_context_.float_state, fp_ptr,
sizeof(g_crash_context_.float_state));
}
-#elif !defined(__ARM_EABI__) && !defined(__mips__)
+#elif !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
// FP state is not part of user ABI on ARM Linux.
// In case of MIPS Linux FP state is already part of ucontext_t
// and 'float_state' is not a member of CrashContext.
@@ -701,7 +701,7 @@ bool ExceptionHandler::WriteMinidump() {
}
#endif
-#if !defined(__ARM_EABI__) && !defined(__aarch64__) && !defined(__mips__)
+#if !defined(__ARM_EABI__) && !defined(__aarch64__) && !defined(__mips__) && !defined(__riscv)
// FPU state is not part of ARM EABI ucontext_t.
memcpy(&context.float_state, context.context.uc_mcontext.fpregs,
sizeof(context.float_state));
@@ -726,6 +726,9 @@ bool ExceptionHandler::WriteMinidump() {
#elif defined(__mips__)
context.siginfo.si_addr =
reinterpret_cast<void*>(context.context.uc_mcontext.pc);
+#elif defined(__riscv)
+ context.siginfo.si_addr =
+ reinterpret_cast<void*>(context.context.uc_mcontext.__gregs[REG_PC]);
#else
#error "This code has not been ported to your platform yet."
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
@@ -192,7 +192,7 @@ class ExceptionHandler {
siginfo_t siginfo;
pid_t tid; // the crashing thread.
ucontext_t context;
-#if !defined(__ARM_EABI__) && !defined(__mips__)
+#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
// #ifdef this out because FP state is not part of user ABI for Linux ARM.
// In case of MIPS Linux FP state is already part of ucontext_t so
// 'float_state' is not required.
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
@@ -138,7 +138,7 @@ class MicrodumpWriter {
const MicrodumpExtraInfo& microdump_extra_info,
LinuxDumper* dumper)
: ucontext_(context ? &context->context : NULL),
-#if !defined(__ARM_EABI__) && !defined(__mips__)
+#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
float_state_(context ? &context->float_state : NULL),
#endif
dumper_(dumper),
@@ -337,6 +337,12 @@ class MicrodumpWriter {
# else
# error "This mips ABI is currently not supported (n32)"
#endif
+#elif defined(__riscv)
+# if __riscv_xlen == 64
+ const char kArch[] = "riscv64";
+# else
+# error "This RISC-V ABI is currently not supported"
+#endif
#else
#error "This code has not been ported to your platform yet"
#endif
@@ -409,7 +415,7 @@ class MicrodumpWriter {
void DumpCPUState() {
RawContextCPU cpu;
my_memset(&cpu, 0, sizeof(RawContextCPU));
-#if !defined(__ARM_EABI__) && !defined(__mips__)
+#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
UContextReader::FillCPUContext(&cpu, ucontext_, float_state_);
#else
UContextReader::FillCPUContext(&cpu, ucontext_);
@@ -605,7 +611,7 @@ class MicrodumpWriter {
void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); }
const ucontext_t* const ucontext_;
-#if !defined(__ARM_EABI__) && !defined(__mips__)
+#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
const google_breakpad::fpstate_t* const float_state_;
#endif
LinuxDumper* dumper_;
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
@@ -112,6 +112,9 @@ bool LinuxCoreDumper::GetThreadInfoByInd
#elif defined(__mips__)
stack_pointer =
reinterpret_cast<uint8_t*>(info->mcontext.gregs[MD_CONTEXT_MIPS_REG_SP]);
+#elif defined(__riscv)
+ stack_pointer =
+ reinterpret_cast<uint8_t*>(info->mcontext.__gregs[MD_CONTEXT_RISCV64_REG_SP]);
#else
#error "This code hasn't been ported to your platform yet."
#endif
@@ -208,6 +211,8 @@ bool LinuxCoreDumper::EnumerateThreads()
info.mcontext.mdlo = status->pr_reg[EF_LO];
info.mcontext.mdhi = status->pr_reg[EF_HI];
info.mcontext.pc = status->pr_reg[EF_CP0_EPC];
+#elif defined(__riscv)
+ memcpy(info.mcontext.__gregs, status->pr_reg, sizeof(info.mcontext.__gregs));
#else // __mips__
memcpy(&info.regs, status->pr_reg, sizeof(info.regs));
#endif // __mips__
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
@@ -63,7 +63,8 @@ namespace google_breakpad {
(defined(__mips__) && _MIPS_SIM == _ABIO32)
typedef Elf32_auxv_t elf_aux_entry;
#elif defined(__x86_64) || defined(__aarch64__) || \
- (defined(__mips__) && _MIPS_SIM != _ABIO32)
+ (defined(__mips__) && _MIPS_SIM != _ABIO32) || \
+ (defined(__riscv) && __riscv_xlen == 64)
typedef Elf64_auxv_t elf_aux_entry;
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
@@ -298,6 +298,9 @@ bool LinuxPtraceDumper::GetThreadInfoByI
#elif defined(__mips__)
stack_pointer =
reinterpret_cast<uint8_t*>(info->mcontext.gregs[MD_CONTEXT_MIPS_REG_SP]);
+#elif defined(__riscv)
+ stack_pointer =
+ reinterpret_cast<uint8_t*>(info->mcontext.__gregs[MD_CONTEXT_RISCV64_REG_SP]);
#else
#error "This code hasn't been ported to your platform yet."
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
@@ -136,7 +136,7 @@ class MinidumpWriter {
: fd_(minidump_fd),
path_(minidump_path),
ucontext_(context ? &context->context : NULL),
-#if !defined(__ARM_EABI__) && !defined(__mips__)
+#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
float_state_(context ? &context->float_state : NULL),
#endif
dumper_(dumper),
@@ -468,7 +468,7 @@ class MinidumpWriter {
if (!cpu.Allocate())
return false;
my_memset(cpu.get(), 0, sizeof(RawContextCPU));
-#if !defined(__ARM_EABI__) && !defined(__mips__)
+#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
UContextReader::FillCPUContext(cpu.get(), ucontext_, float_state_);
#else
UContextReader::FillCPUContext(cpu.get(), ucontext_);
@@ -897,7 +897,7 @@ class MinidumpWriter {
dirent->location.rva = 0;
}
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || defined(__riscv)
bool WriteCPUInformation(MDRawSystemInfo* sys_info) {
char vendor_id[sizeof(sys_info->cpu.x86_cpu_info.vendor_id) + 1] = {0};
static const char vendor_id_name[] = "vendor_id";
@@ -925,6 +925,12 @@ class MinidumpWriter {
# else
# error "This mips ABI is currently not supported (n32)"
#endif
+#elif defined(__riscv)
+# if __riscv_xlen == 64
+ MD_CPU_ARCHITECTURE_RISCV64;
+# else
+# error "This RISC-V ABI is currently not supported"
+# endif
#elif defined(__i386__)
MD_CPU_ARCHITECTURE_X86;
#else
@@ -1333,7 +1339,7 @@ class MinidumpWriter {
const char* path_; // Path to the file where the minidum should be written.
const ucontext_t* const ucontext_; // also from the signal handler
-#if !defined(__ARM_EABI__) && !defined(__mips__)
+#if !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
const google_breakpad::fpstate_t* const float_state_; // ditto
#endif
LinuxDumper* dumper_;
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/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__)
+#elif !defined(__ARM_EABI__) && !defined(__mips__) && !defined(__riscv)
typedef std::remove_pointer<fpregset_t>::type fpstate_t;
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/breakpad_getcontext.S
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/breakpad_getcontext.S
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/breakpad_getcontext.S
@@ -481,6 +481,68 @@ breakpad_getcontext:
.cfi_endproc
.size breakpad_getcontext, . - breakpad_getcontext
+#elif defined(__riscv) && __riscv_xlen == 64
+
+#define __NR_rt_sigprocmask 135
+#define _NSIG8 64 / 8
+#define SIG_BLOCK 0
+
+ .text
+ .global breakpad_getcontext
+ .hidden breakpad_getcontext
+ .type breakpad_getcontext, @function
+ .align 2
+breakpad_getcontext:
+ sd ra, MCONTEXT_GREGS_OFFSET + 0*8(a0)
+ sd ra, MCONTEXT_GREGS_OFFSET + 1*8(a0)
+ sd sp, MCONTEXT_GREGS_OFFSET + 2*8(a0)
+ sd s0, MCONTEXT_GREGS_OFFSET + 8*8(a0)
+ sd s1, MCONTEXT_GREGS_OFFSET + 9*8(a0)
+ sd x0, MCONTEXT_GREGS_OFFSET + 10*8(a0) /* return 0 by overwriting a0. */
+ sd s2, MCONTEXT_GREGS_OFFSET + 18*8(a0)
+ sd s3, MCONTEXT_GREGS_OFFSET + 19*8(a0)
+ sd s4, MCONTEXT_GREGS_OFFSET + 20*8(a0)
+ sd s5, MCONTEXT_GREGS_OFFSET + 21*8(a0)
+ sd s6, MCONTEXT_GREGS_OFFSET + 22*8(a0)
+ sd s7, MCONTEXT_GREGS_OFFSET + 23*8(a0)
+ sd s8, MCONTEXT_GREGS_OFFSET + 24*8(a0)
+ sd s9, MCONTEXT_GREGS_OFFSET + 25*8(a0)
+ sd s10, MCONTEXT_GREGS_OFFSET + 26*8(a0)
+ sd s11, MCONTEXT_GREGS_OFFSET + 27*8(a0)
+
+#ifndef __riscv_float_abi_soft
+ frsr a1
+
+ fsd fs0, MCONTEXT_FPREGS_OFFSET + 8*8(a0)
+ fsd fs1, MCONTEXT_FPREGS_OFFSET + 9*8(a0)
+ fsd fs2, MCONTEXT_FPREGS_OFFSET + 18*8(a0)
+ fsd fs3, MCONTEXT_FPREGS_OFFSET + 19*8(a0)
+ fsd fs4, MCONTEXT_FPREGS_OFFSET + 20*8(a0)
+ fsd fs5, MCONTEXT_FPREGS_OFFSET + 21*8(a0)
+ fsd fs6, MCONTEXT_FPREGS_OFFSET + 22*8(a0)
+ fsd fs7, MCONTEXT_FPREGS_OFFSET + 23*8(a0)
+ fsd fs8, MCONTEXT_FPREGS_OFFSET + 24*8(a0)
+ fsd fs9, MCONTEXT_FPREGS_OFFSET + 25*8(a0)
+ fsd fs10, MCONTEXT_FPREGS_OFFSET + 26*8(a0)
+ fsd fs11, MCONTEXT_FPREGS_OFFSET + 27*8(a0)
+
+ sw a1, MCONTEXT_FSR_OFFSET(a0)
+#endif /* __riscv_float_abi_soft */
+
+/* rt_sigprocmask (SIG_BLOCK, NULL, &ucp->uc_sigmask, _NSIG / 8) */
+ li a3, _NSIG8
+ add a2, a0, UCONTEXT_SIGMASK_OFFSET
+ mv a1, zero
+ li a0, SIG_BLOCK
+
+ li a7, __NR_rt_sigprocmask
+ scall
+
+ /* Always return 0 for success, even if sigprocmask failed. */
+ mv a0, zero
+ ret
+ .size breakpad_getcontext, . - breakpad_getcontext
+
#else
#error "This file has not been ported for your CPU!"
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
@@ -65,7 +65,8 @@ bool MemoryMappedFile::Map(const char* p
}
#if defined(__x86_64__) || defined(__aarch64__) || \
- (defined(__mips__) && _MIPS_SIM == _ABI64)
+ (defined(__mips__) && _MIPS_SIM == _ABI64) || \
+ (defined(__riscv) && __riscv_xlen == 64)
struct kernel_stat st;
if (sys_fstat(fd, &st) == -1 || st.st_size < 0) {
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/ucontext_constants.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/ucontext_constants.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/common/linux/ucontext_constants.h
@@ -146,6 +146,14 @@
#endif
#define FPREGS_OFFSET_MXCSR 24
+#elif defined(__riscv)
+
+#define UCONTEXT_SIGMASK_OFFSET 40
+
+#define MCONTEXT_GREGS_OFFSET 176
+#define MCONTEXT_FPREGS_OFFSET 432
+#define MCONTEXT_FSR_OFFSET (MCONTEXT_FPREGS_OFFSET + 32*8)
+
#else
#error "This header has not been ported for your CPU"
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_cpu_riscv64.h
===================================================================
--- /dev/null
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_cpu_riscv64.h
@@ -0,0 +1,121 @@
+/* Copyright 2013 Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+/* minidump_format.h: A cross-platform reimplementation of minidump-related
+ * portions of DbgHelp.h from the Windows Platform SDK.
+ *
+ * (This is C99 source, please don't corrupt it with C++.)
+ *
+ * This file contains the necessary definitions to read minidump files
+ * produced on ARM. These files may be read on any platform provided
+ * that the alignments of these structures on the processing system are
+ * identical to the alignments of these structures on the producing system.
+ * For this reason, precise-sized types are used. The structures defined
+ * by this file have been laid out to minimize alignment problems by
+ * ensuring that all members are aligned on their natural boundaries.
+ * In some cases, tail-padding may be significant when different ABIs specify
+ * different tail-padding behaviors. To avoid problems when reading or
+ * writing affected structures, MD_*_SIZE macros are provided where needed,
+ * containing the useful size of the structures without padding.
+ *
+ * Structures that are defined by Microsoft to contain a zero-length array
+ * are instead defined here to contain an array with one element, as
+ * zero-length arrays are forbidden by standard C and C++. In these cases,
+ * *_minsize constants are provided to be used in place of sizeof. For a
+ * cleaner interface to these sizes when using C++, see minidump_size.h.
+ *
+ * These structures are also sufficient to populate minidump files.
+ *
+ * Because precise data type sizes are crucial for this implementation to
+ * function properly and portably, a set of primitive types with known sizes
+ * are used as the basis of each structure defined by this file.
+ *
+ * Author: Colin Blundell
+ */
+
+/*
+ * RISCV64 support
+ */
+
+#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_RISCV64_H__
+#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_RISCV64_H__
+
+#include "google_breakpad/common/breakpad_types.h"
+
+#define MD_FLOATINGSAVEAREA_RISCV64_FPR_COUNT 32
+#define MD_CONTEXT_RISCV64_GPR_COUNT 32
+
+typedef struct {
+ /* 32 64-bit floating point registers, f0 .. f31. */
+ uint64_t regs[MD_FLOATINGSAVEAREA_RISCV64_FPR_COUNT];
+
+ uint32_t fcsr; /* FPU control and status register */
+} MDFloatingSaveAreaRISCV64;
+
+/* For (MDRawContextRISCV64).context_flags. These values indicate the type of
+ * context stored in the structure. */
+#define MD_CONTEXT_RISCV64 0x00400000
+#define MD_CONTEXT_RISCV64_CONTROL (MD_CONTEXT_RISCV64 | 0x00000001)
+#define MD_CONTEXT_RISCV64_INTEGER (MD_CONTEXT_RISCV64 | 0x00000002)
+#define MD_CONTEXT_RISCV64_FLOATING_POINT (MD_CONTEXT_RISCV64 | 0x00000004)
+#define MD_CONTEXT_RISCV64_DEBUG (MD_CONTEXT_RISCV64 | 0x00000008)
+#define MD_CONTEXT_RISCV64_FULL (MD_CONTEXT_RISCV64_CONTROL | \
+ MD_CONTEXT_RISCV64_INTEGER | \
+ MD_CONTEXT_RISCV64_FLOATING_POINT)
+#define MD_CONTEXT_RISCV64_ALL (MD_CONTEXT_RISCV64_FULL | MD_CONTEXT_RISCV64_DEBUG)
+
+typedef struct {
+ /* Determines which fields of this struct are populated */
+ uint32_t context_flags;
+
+ /* 32 64-bit integer registers, x1 .. x31 + the PC
+ * Note the following fixed uses:
+ * x8 is the frame pointer
+ * x1 is the link register
+ * x2 is the stack pointer
+ * The PC is effectively x0.
+ */
+ uint64_t iregs[MD_CONTEXT_RISCV64_GPR_COUNT];
+
+ /* The next field is included with MD_CONTEXT64_ARM_FLOATING_POINT */
+ MDFloatingSaveAreaRISCV64 float_save;
+
+} MDRawContextRISCV64;
+
+/* Indices into iregs for registers with a dedicated or conventional
+ * purpose.
+ */
+enum MDRISCV64RegisterNumbers {
+ MD_CONTEXT_RISCV64_REG_FP = 8,
+ MD_CONTEXT_RISCV64_REG_RA = 1,
+ MD_CONTEXT_RISCV64_REG_SP = 2,
+ MD_CONTEXT_RISCV64_REG_PC = 0
+};
+
+#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_RISCV64_H__ */
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_format.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_format.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/breakpad/breakpad/src/google_breakpad/common/minidump_format.h
@@ -118,6 +118,7 @@ typedef struct {
#include "minidump_cpu_mips.h"
#include "minidump_cpu_ppc.h"
#include "minidump_cpu_ppc64.h"
+#include "minidump_cpu_riscv64.h"
#include "minidump_cpu_sparc.h"
#include "minidump_cpu_x86.h"
@@ -660,6 +661,7 @@ typedef enum {
MD_CPU_ARCHITECTURE_PPC64 = 0x8002, /* Breakpad-defined value for PPC64 */
MD_CPU_ARCHITECTURE_ARM64_OLD = 0x8003, /* Breakpad-defined value for ARM64 */
MD_CPU_ARCHITECTURE_MIPS64 = 0x8004, /* Breakpad-defined value for MIPS64 */
+ MD_CPU_ARCHITECTURE_RISCV64 = 0x8005, /* Breakpad-defined value for RISCV64 */
MD_CPU_ARCHITECTURE_UNKNOWN = 0xffff /* PROCESSOR_ARCHITECTURE_UNKNOWN */
} MDCPUArchitecture;

809
riscv-crashpad.patch Normal file
View file

@ -0,0 +1,809 @@
riscv64 support patch taken from Opensuse:
https://build.opensuse.org/package/show/openSUSE:Factory:RISCV/libqt5-qtwebengine?rev=110
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context.h
@@ -592,6 +592,41 @@ struct MinidumpContextMIPS64 {
uint64_t fir;
};
+//! \brief 64bit RISC-V-specifc flags for MinidumpContextRISCV64::context_flags.
+//! Based on minidump_cpu_riscv64.h from breakpad
+enum MinidumpContextRISCV64Flags : uint32_t {
+ //! \brief Identifies the context structure as RISCV64.
+ kMinidumpContextRISCV64 = 0x00080000,
+
+ //! \brief Indicates the validity of integer registers.
+ //!
+ //! Registers `x1`-`x31` and pc are valid.
+ kMinidumpContextRISCV64Integer = kMinidumpContextRISCV64 | 0x00000002,
+
+ //! \brief Indicates the validity of floating point registers.
+ //!
+ //! Floating point registers `f0`-`f31`, and `fcsr` are valid
+ kMinidumpContextRISCV64FloatingPoint = kMinidumpContextRISCV64 | 0x00000004,
+
+ //! \brief Indicates the validity of all registers.
+ kMinidumpContextRISCV64All = kMinidumpContextRISCV64Integer |
+ kMinidumpContextRISCV64FloatingPoint,
+};
+
+//! \brief A 64bit RISCV CPU context (register state) carried in a minidump file.
+struct MinidumpContextRISCV64 {
+ uint64_t context_flags;
+
+ //! \brief General purpose registers.
+ uint64_t regs[32];
+
+ //! \brief FPU registers.
+ uint64_t fpregs[32];
+
+ //! \brief FPU status register.
+ uint64_t fcsr;
+};
+
} // namespace crashpad
#endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_H_
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
@@ -101,6 +101,13 @@ MinidumpContextWriter::CreateFromSnapsho
break;
}
+ case kCPUArchitectureRISCV64: {
+ context = std::make_unique<MinidumpContextRISCV64Writer>();
+ reinterpret_cast<MinidumpContextRISCV64Writer*>(context.get())
+ ->InitializeFromSnapshot(context_snapshot->riscv64);
+ break;
+ }
+
default: {
LOG(ERROR) << "unknown context architecture "
<< context_snapshot->architecture;
@@ -452,5 +459,42 @@ size_t MinidumpContextMIPS64Writer::Cont
DCHECK_GE(state(), kStateFrozen);
return sizeof(context_);
}
+
+MinidumpContextRISCV64Writer::MinidumpContextRISCV64Writer()
+ : MinidumpContextWriter(), context_() {
+ context_.context_flags = kMinidumpContextRISCV64;
+}
+
+MinidumpContextRISCV64Writer::~MinidumpContextRISCV64Writer() = default;
+
+void MinidumpContextRISCV64Writer::InitializeFromSnapshot(
+ const CPUContextRISCV64* context_snapshot) {
+ DCHECK_EQ(state(), kStateMutable);
+ DCHECK_EQ(context_.context_flags, kMinidumpContextRISCV64);
+
+ context_.context_flags = kMinidumpContextRISCV64All;
+
+ static_assert(sizeof(context_.regs) == sizeof(context_snapshot->regs),
+ "GPRs size mismatch");
+ memcpy(context_.regs, context_snapshot->regs, sizeof(context_.regs));
+
+ static_assert(sizeof(context_.fpregs) == sizeof(context_snapshot->fpregs),
+ "FPRs size mismatch");
+ memcpy(context_.fpregs,
+ context_snapshot->fpregs,
+ sizeof(context_.fpregs));
+ context_.fcsr = context_snapshot->fcsr;
+}
+
+bool MinidumpContextRISCV64Writer::WriteObject(
+ FileWriterInterface* file_writer) {
+ DCHECK_EQ(state(), kStateWritable);
+ return file_writer->Write(&context_, sizeof(context_));
+}
+
+size_t MinidumpContextRISCV64Writer::ContextSize() const {
+ DCHECK_GE(state(), kStateFrozen);
+ return sizeof(context_);
+}
} // namespace crashpad
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
@@ -315,6 +315,46 @@ class MinidumpContextMIPS64Writer final
DISALLOW_COPY_AND_ASSIGN(MinidumpContextMIPS64Writer);
};
+//! \brief The writer for a MinidumpContextRISCV64 structure in a minidump file.
+class MinidumpContextRISCV64Writer final : public MinidumpContextWriter {
+ public:
+ MinidumpContextRISCV64Writer();
+ ~MinidumpContextRISCV64Writer() override;
+
+ //! \brief Initializes the MinidumpContextRISCV based on \a context_snapshot.
+ //!
+ //! \param[in] context_snapshot The context snapshot to use as source data.
+ //!
+ //! \note Valid in #kStateMutable. No mutation of context() may be done before
+ //! calling this method, and it is not normally necessary to alter
+ //! context() after calling this method.
+ void InitializeFromSnapshot(const CPUContextRISCV64* context_snapshot);
+
+ //! \brief Returns a pointer to the context structure that this object will
+ //! write.
+ //!
+ //! \attention This returns a non-`const` pointer to this objects private
+ //! data so that a caller can populate the context structure directly.
+ //! This is done because providing setter interfaces to each field in the
+ //! context structure would be unwieldy and cumbersome. Care must be taken
+ //! to populate the context structure correctly. The context structure
+ //! must only be modified while this object is in the #kStateMutable
+ //! state.
+ MinidumpContextRISCV64* context() { return &context_; }
+
+ protected:
+ // MinidumpWritable:
+ bool WriteObject(FileWriterInterface* file_writer) override;
+
+ // MinidumpContextWriter:
+ size_t ContextSize() const override;
+
+ private:
+ MinidumpContextRISCV64 context_;
+
+ DISALLOW_COPY_AND_ASSIGN(MinidumpContextRISCV64Writer);
+};
+
} // namespace crashpad
#endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_WRITER_H_
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
@@ -135,6 +135,10 @@ std::string MinidumpMiscInfoDebugBuildSt
static constexpr char kCPU[] = "mips";
#elif defined(ARCH_CPU_MIPS64EL)
static constexpr char kCPU[] = "mips64";
+#elif defined(ARCH_CPU_RISCV)
+ static constexpr char kCPU[] = "riscv";
+#elif defined(ARCH_CPU_RISCV64)
+ static constexpr char kCPU[] = "riscv64";
#else
#error define kCPU for this CPU
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/capture_memory.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/capture_memory.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/capture_memory.cc
@@ -112,6 +112,16 @@ void CaptureMemory::PointedToByContext(c
for (size_t i = 0; i < base::size(context.mipsel->regs); ++i) {
MaybeCaptureMemoryAround(delegate, context.mipsel->regs[i]);
}
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ if (context.architecture == kCPUArchitectureRISCV) {
+ for (size_t i = 0; i < base::size(context.riscv->regs); ++i) {
+ MaybeCaptureMemoryAround(delegate, context.riscv->regs[i]);
+ }
+ } else {
+ for (size_t i = 0; i < base::size(context.riscv64->regs); ++i) {
+ MaybeCaptureMemoryAround(delegate, context.riscv64->regs[i]);
+ }
+ }
#else
#error Port.
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
@@ -43,7 +43,13 @@ enum CPUArchitecture {
kCPUArchitectureMIPSEL,
//! \brief 64-bit MIPSEL.
- kCPUArchitectureMIPS64EL
+ kCPUArchitectureMIPS64EL,
+
+ //! \brief 32-bit RISCV.
+ kCPUArchitectureRISCV,
+
+ //! \brief 64-bit RISCV.
+ kCPUArchitectureRISCV64
};
} // namespace crashpad
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_context.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_context.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_context.cc
@@ -196,10 +196,12 @@ bool CPUContext::Is64Bit() const {
case kCPUArchitectureX86_64:
case kCPUArchitectureARM64:
case kCPUArchitectureMIPS64EL:
+ case kCPUArchitectureRISCV64:
return true;
case kCPUArchitectureX86:
case kCPUArchitectureARM:
case kCPUArchitectureMIPSEL:
+ case kCPUArchitectureRISCV:
return false;
default:
NOTREACHED();
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_context.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_context.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/cpu_context.h
@@ -352,6 +352,20 @@ struct CPUContextMIPS64 {
uint64_t fir;
};
+//! \brief A context structure carrying RISC CPU state.
+struct CPUContextRISCV {
+ uint32_t regs[32];
+ uint64_t fpregs[32];
+ uint32_t fcsr;
+};
+
+//! \brief A context structure carrying RISC64 CPU state.
+struct CPUContextRISCV64 {
+ uint64_t regs[32];
+ uint64_t fpregs[32];
+ uint32_t fcsr;
+};
+
//! \brief A context structure capable of carrying the context of any supported
//! CPU architecture.
struct CPUContext {
@@ -382,6 +396,8 @@ struct CPUContext {
CPUContextARM64* arm64;
CPUContextMIPS* mipsel;
CPUContextMIPS64* mips64;
+ CPUContextRISCV* riscv;
+ CPUContextRISCV64* riscv64;
};
};
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
@@ -266,6 +266,30 @@ void InitializeCPUContextARM64_OnlyFPSIM
context->fpcr = float_context.fpcr;
}
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+
+template <typename Traits>
+void InitializeCPUContextRISCV(
+ const typename Traits::SignalThreadContext& thread_context,
+ const typename Traits::SignalFloatContext& float_context,
+ typename Traits::CPUContext* context) {
+ static_assert(sizeof(context->regs) == sizeof(thread_context),
+ "registers size mismatch");
+ static_assert(sizeof(context->fpregs) == sizeof(float_context.f),
+ "fp registers size mismatch");
+ memcpy(&context->regs, &thread_context, sizeof(context->regs));
+ memcpy(&context->fpregs, &float_context, sizeof(context->fpregs));
+ context->fcsr = float_context.fcsr;
+}
+template void InitializeCPUContextRISCV<ContextTraits32>(
+ const ContextTraits32::SignalThreadContext& thread_context,
+ const ContextTraits32::SignalFloatContext& float_context,
+ ContextTraits32::CPUContext* context);
+template void InitializeCPUContextRISCV<ContextTraits64>(
+ const ContextTraits64::SignalThreadContext& thread_context,
+ const ContextTraits64::SignalFloatContext& float_context,
+ ContextTraits64::CPUContext* context);
+
#endif // ARCH_CPU_X86_FAMILY
} // namespace internal
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
@@ -174,6 +174,22 @@ void InitializeCPUContextMIPS(
#endif // ARCH_CPU_MIPS_FAMILY || DOXYGEN
+#if defined(ARCH_CPU_RISCV_FAMILY) || DOXYGEN
+
+//! \brief Initializes a CPUContextRISCV structure from native context
+//! structures on Linux.
+//!
+//! \param[in] thread_context The native thread context.
+//! \param[in] float_context The native float context.
+//! \param[out] context The CPUContextRISCV structure to initialize.
+template <typename Traits>
+void InitializeCPUContextRISCV(
+ const typename Traits::SignalThreadContext& thread_context,
+ const typename Traits::SignalFloatContext& float_context,
+ typename Traits::CPUContext* context);
+
+#endif // ARCH_CPU_RISCV_FAMILY || DOXYGEN
+
} // namespace internal
} // namespace crashpad
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
@@ -323,6 +323,61 @@ bool ExceptionSnapshotLinux::ReadContext
reader, context_address, context_.mips64);
}
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+
+template <typename Traits>
+static bool ReadContext(ProcessReaderLinux* reader,
+ LinuxVMAddress context_address,
+ typename Traits::CPUContext* dest_context) {
+ const ProcessMemory* memory = reader->Memory();
+
+ LinuxVMAddress gregs_address = context_address +
+ offsetof(UContext<Traits>, mcontext) +
+ offsetof(typename Traits::MContext, gregs);
+
+ typename Traits::SignalThreadContext thread_context;
+ if (!memory->Read(gregs_address, sizeof(thread_context), &thread_context)) {
+ LOG(ERROR) << "Couldn't read gregs";
+ return false;
+ }
+
+ LinuxVMAddress fpregs_address = context_address +
+ offsetof(UContext<Traits>, mcontext) +
+ offsetof(typename Traits::MContext, fpregs);
+
+ typename Traits::SignalFloatContext fp_context;
+ if (!memory->Read(fpregs_address, sizeof(fp_context), &fp_context)) {
+ LOG(ERROR) << "Couldn't read fpregs";
+ return false;
+ }
+
+ InitializeCPUContextRISCV<Traits>(thread_context, fp_context, dest_context);
+
+ return true;
+}
+
+template <>
+bool ExceptionSnapshotLinux::ReadContext<ContextTraits32>(
+ ProcessReaderLinux* reader,
+ LinuxVMAddress context_address) {
+ context_.architecture = kCPUArchitectureRISCV;
+ context_.riscv = &context_union_.riscv;
+
+ return internal::ReadContext<ContextTraits32>(
+ reader, context_address, context_.riscv);
+}
+
+template <>
+bool ExceptionSnapshotLinux::ReadContext<ContextTraits64>(
+ ProcessReaderLinux* reader,
+ LinuxVMAddress context_address) {
+ context_.architecture = kCPUArchitectureRISCV64;
+ context_.riscv64 = &context_union_.riscv64;
+
+ return internal::ReadContext<ContextTraits64>(
+ reader, context_address, context_.riscv64);
+}
+
#endif // ARCH_CPU_X86_FAMILY
bool ExceptionSnapshotLinux::Initialize(ProcessReaderLinux* process_reader,
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
@@ -84,6 +84,9 @@ class ExceptionSnapshotLinux final : pub
#elif defined(ARCH_CPU_MIPS_FAMILY)
CPUContextMIPS mipsel;
CPUContextMIPS64 mips64;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ CPUContextRISCV riscv;
+ CPUContextRISCV64 riscv64;
#endif
} context_union_;
CPUContext context_;
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
@@ -108,6 +108,9 @@ void ProcessReaderLinux::Thread::Initial
#elif defined(ARCH_CPU_MIPS_FAMILY)
stack_pointer = reader->Is64Bit() ? thread_info.thread_context.t64.regs[29]
: thread_info.thread_context.t32.regs[29];
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ stack_pointer = reader->Is64Bit() ? thread_info.thread_context.t64.sp
+ : thread_info.thread_context.t32.sp;
#else
#error Port.
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
@@ -422,6 +422,67 @@ static_assert(offsetof(UContext<ContextT
"context offset mismatch");
#endif
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+
+struct MContext32 {
+ uint32_t gregs[32];
+ uint64_t fpregs[32];
+ unsigned int fcsr;
+};
+
+struct MContext64 {
+ uint64_t gregs[32];
+ uint64_t fpregs[32];
+ unsigned int fcsr;
+};
+
+struct ContextTraits32 : public Traits32 {
+ using MContext = MContext32;
+ using SignalThreadContext = ThreadContext::t32_t;
+ using SignalFloatContext = FloatContext::f32_t;
+ using CPUContext = CPUContextRISCV;
+};
+
+struct ContextTraits64 : public Traits64 {
+ using MContext = MContext64;
+ using SignalThreadContext = ThreadContext::t64_t;
+ using SignalFloatContext = FloatContext::f64_t;
+ using CPUContext = CPUContextRISCV64;
+};
+
+template <typename Traits>
+struct UContext {
+ typename Traits::ULong flags;
+ typename Traits::Address link;
+ SignalStack<Traits> stack;
+ Sigset<Traits> sigmask;
+ char padding[128 - sizeof(sigmask)];
+ typename Traits::Char_64Only padding2[8];
+ typename Traits::MContext mcontext;
+};
+
+#if defined(ARCH_CPU_RISCV)
+static_assert(offsetof(UContext<ContextTraits32>, mcontext) ==
+ offsetof(ucontext_t, uc_mcontext),
+ "context offset mismatch");
+static_assert(offsetof(UContext<ContextTraits32>, mcontext.gregs) ==
+ offsetof(ucontext_t, uc_mcontext.__gregs),
+ "context offset mismatch");
+static_assert(offsetof(UContext<ContextTraits32>, mcontext.fpregs) ==
+ offsetof(ucontext_t, uc_mcontext.__fpregs),
+ "context offset mismatch");
+#elif defined(ARCH_CPU_RISCV64)
+static_assert(offsetof(UContext<ContextTraits64>, mcontext) ==
+ offsetof(ucontext_t, uc_mcontext),
+ "context offset mismatch");
+static_assert(offsetof(UContext<ContextTraits64>, mcontext.gregs) ==
+ offsetof(ucontext_t, uc_mcontext.__gregs),
+ "context offset mismatch");
+static_assert(offsetof(UContext<ContextTraits64>, mcontext.fpregs) ==
+ offsetof(ucontext_t, uc_mcontext.__fpregs),
+ "context offset mismatch");
+#endif
+
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
@@ -204,6 +204,9 @@ CPUArchitecture SystemSnapshotLinux::Get
#elif defined(ARCH_CPU_MIPS_FAMILY)
return process_reader_->Is64Bit() ? kCPUArchitectureMIPS64EL
: kCPUArchitectureMIPSEL;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ return process_reader_->Is64Bit() ? kCPUArchitectureRISCV64
+ : kCPUArchitectureRISCV;
#else
#error port to your architecture
#endif
@@ -219,6 +222,9 @@ uint32_t SystemSnapshotLinux::CPURevisio
#elif defined(ARCH_CPU_MIPS_FAMILY)
// Not implementable on MIPS
return 0;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ // Not implementable on RISCV
+ return 0;
#else
#error port to your architecture
#endif
@@ -239,6 +245,9 @@ std::string SystemSnapshotLinux::CPUVend
#elif defined(ARCH_CPU_MIPS_FAMILY)
// Not implementable on MIPS
return std::string();
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ // Not implementable on RISCV
+ return std::string();
#else
#error port to your architecture
#endif
@@ -372,6 +381,9 @@ bool SystemSnapshotLinux::NXEnabled() co
#elif defined(ARCH_CPU_MIPS_FAMILY)
// Not implementable on MIPS
return false;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ // Not implementable on RISCV
+ return false;
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
@@ -186,6 +186,22 @@ bool ThreadSnapshotLinux::Initialize(Pro
thread.thread_info.float_context.f32,
context_.mipsel);
}
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ if (process_reader->Is64Bit()) {
+ context_.architecture = kCPUArchitectureRISCV64;
+ context_.riscv64 = &context_union_.riscv64;
+ InitializeCPUContextRISCV<ContextTraits64>(
+ thread.thread_info.thread_context.t64,
+ thread.thread_info.float_context.f64,
+ context_.riscv64);
+ } else {
+ context_.architecture = kCPUArchitectureRISCV;
+ context_.riscv = &context_union_.riscv;
+ InitializeCPUContextRISCV<ContextTraits32>(
+ thread.thread_info.thread_context.t32,
+ thread.thread_info.float_context.f32,
+ context_.riscv);
+ }
#else
#error Port.
#endif
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
@@ -68,6 +68,9 @@ class ThreadSnapshotLinux final : public
#elif defined(ARCH_CPU_MIPS_FAMILY)
CPUContextMIPS mipsel;
CPUContextMIPS64 mips64;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ CPUContextRISCV riscv;
+ CPUContextRISCV64 riscv64;
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/ptracer.cc
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/ptracer.cc
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/ptracer.cc
@@ -398,6 +398,96 @@ bool GetThreadArea64(pid_t tid,
return true;
}
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+
+template <typename Destination>
+bool GetRegisterSet(pid_t tid, int set, Destination* dest, bool can_log) {
+ iovec iov;
+ iov.iov_base = dest;
+ iov.iov_len = sizeof(*dest);
+ if (ptrace(PTRACE_GETREGSET, tid, reinterpret_cast<void*>(set), &iov) != 0) {
+ PLOG_IF(ERROR, can_log) << "ptrace";
+ return false;
+ }
+ if (iov.iov_len != sizeof(*dest)) {
+ LOG_IF(ERROR, can_log) << "Unexpected registers size";
+ return false;
+ }
+ return true;
+}
+
+bool GetFloatingPointRegisters32(pid_t tid,
+ FloatContext* context,
+ bool can_log) {
+ return false;
+}
+
+bool GetFloatingPointRegisters64(pid_t tid,
+ FloatContext* context,
+ bool can_log) {
+ return GetRegisterSet(tid, NT_PRFPREG, &context->f64.f, can_log);
+}
+
+bool GetThreadArea32(pid_t tid,
+ const ThreadContext& context,
+ LinuxVMAddress* address,
+ bool can_log) {
+ return false;
+}
+
+bool GetThreadArea64(pid_t tid,
+ const ThreadContext& context,
+ LinuxVMAddress* address,
+ bool can_log) {
+ *address = context.t64.tp;
+ return true;
+}
+
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+
+template <typename Destination>
+bool GetRegisterSet(pid_t tid, int set, Destination* dest, bool can_log) {
+ iovec iov;
+ iov.iov_base = dest;
+ iov.iov_len = sizeof(*dest);
+ if (ptrace(PTRACE_GETREGSET, tid, reinterpret_cast<void*>(set), &iov) != 0) {
+ PLOG_IF(ERROR, can_log) << "ptrace";
+ return false;
+ }
+ if (iov.iov_len != sizeof(*dest)) {
+ LOG_IF(ERROR, can_log) << "Unexpected registers size";
+ return false;
+ }
+ return true;
+}
+
+bool GetFloatingPointRegisters32(pid_t tid,
+ FloatContext* context,
+ bool can_log) {
+ return false;
+}
+
+bool GetFloatingPointRegisters64(pid_t tid,
+ FloatContext* context,
+ bool can_log) {
+ return GetRegisterSet(tid, NT_PRFPREG, &context->f64.f, can_log);
+}
+
+bool GetThreadArea32(pid_t tid,
+ const ThreadContext& context,
+ LinuxVMAddress* address,
+ bool can_log) {
+ return false;
+}
+
+bool GetThreadArea64(pid_t tid,
+ const ThreadContext& context,
+ LinuxVMAddress* address,
+ bool can_log) {
+ *address = context.t64.tp;
+ return true;
+}
+
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
Index: qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h
===================================================================
--- qtwebengine-everywhere-src-5.15.11.orig/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h
+++ qtwebengine-everywhere-src-5.15.11/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h
@@ -79,6 +79,40 @@ union ThreadContext {
uint32_t cp0_status;
uint32_t cp0_cause;
uint32_t padding1_;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ // Reflects user_regs_struct in asm/ptrace.h.
+ uint32_t pc;
+ uint32_t ra;
+ uint32_t sp;
+ uint32_t gp;
+ uint32_t tp;
+ uint32_t t0;
+ uint32_t t1;
+ uint32_t t2;
+ uint32_t s0;
+ uint32_t s1;
+ uint32_t a0;
+ uint32_t a1;
+ uint32_t a2;
+ uint32_t a3;
+ uint32_t a4;
+ uint32_t a5;
+ uint32_t a6;
+ uint32_t a7;
+ uint32_t s2;
+ uint32_t s3;
+ uint32_t s4;
+ uint32_t s5;
+ uint32_t s6;
+ uint32_t s7;
+ uint32_t s8;
+ uint32_t s9;
+ uint32_t s10;
+ uint32_t s11;
+ uint32_t t3;
+ uint32_t t4;
+ uint32_t t5;
+ uint32_t t6;
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
@@ -132,6 +166,40 @@ union ThreadContext {
uint64_t cp0_badvaddr;
uint64_t cp0_status;
uint64_t cp0_cause;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ // Reflects user_regs_struct in asm/ptrace.h.
+ uint64_t pc;
+ uint64_t ra;
+ uint64_t sp;
+ uint64_t gp;
+ uint64_t tp;
+ uint64_t t0;
+ uint64_t t1;
+ uint64_t t2;
+ uint64_t s0;
+ uint64_t s1;
+ uint64_t a0;
+ uint64_t a1;
+ uint64_t a2;
+ uint64_t a3;
+ uint64_t a4;
+ uint64_t a5;
+ uint64_t a6;
+ uint64_t a7;
+ uint64_t s2;
+ uint64_t s3;
+ uint64_t s4;
+ uint64_t s5;
+ uint64_t s6;
+ uint64_t s7;
+ uint64_t s8;
+ uint64_t s9;
+ uint64_t s10;
+ uint64_t s11;
+ uint64_t t3;
+ uint64_t t4;
+ uint64_t t5;
+ uint64_t t6;
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
@@ -143,11 +211,12 @@ union ThreadContext {
using NativeThreadContext = user_regs;
#elif defined(ARCH_CPU_MIPS_FAMILY)
// No appropriate NativeThreadsContext type available for MIPS
+#elif defined(ARCH_CPU_RISCV_FAMILY)
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY || ARCH_CPU_ARM64
-#if !defined(ARCH_CPU_MIPS_FAMILY)
+#if !defined(ARCH_CPU_MIPS_FAMILY) && !defined(ARCH_CPU_RISCV_FAMILY)
#if defined(ARCH_CPU_32_BITS)
static_assert(sizeof(t32_t) == sizeof(NativeThreadContext), "Size mismatch");
#else // ARCH_CPU_64_BITS
@@ -218,6 +287,9 @@ union FloatContext {
} fpregs[32];
uint32_t fpcsr;
uint32_t fpu_id;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ uint64_t f[32];
+ uint32_t fcsr;
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
@@ -252,6 +324,9 @@ union FloatContext {
double fpregs[32];
uint32_t fpcsr;
uint32_t fpu_id;
+#elif defined(ARCH_CPU_RISCV_FAMILY)
+ uint64_t f[32];
+ uint32_t fcsr;
#else
#error Port.
#endif // ARCH_CPU_X86_FAMILY
@@ -280,6 +355,7 @@ union FloatContext {
static_assert(sizeof(f64) == sizeof(user_fpsimd_struct), "Size mismatch");
#elif defined(ARCH_CPU_MIPS_FAMILY)
// No appropriate floating point context native type for available MIPS.
+#elif defined(ARCH_CPU_RISCV_FAMILY)
#else
#error Port.
#endif // ARCH_CPU_X86

2166
riscv-sandbox.patch Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,2 +1,2 @@
SHA512 (qtwebengine-everywhere-src-5.15.17-clean.tar.xz) = d8fa20e0d1eea0c3c15a98145995eaa37ca21edcb7de3bf5ec548a0347c0aa2409a183ba2f8d9fdfc3686802e5e1f5bb083c0d51fe5ad3a435ab3c72b4c32af9
SHA512 (qtwebengine-everywhere-src-5.15.19-clean.tar.xz) = cfc6f7bab4e2731fdc07097228a254eb7f20ee195b7ee6f1571253688fb421942fb85c859e0a50f2ac8077a5c65bf60443bdeef80984eac938291cacf7eb2752
SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be