ソースを参照

third_party: update patch list as some are redundant

Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
Rebecca Chang Swee Fun 2 年 前
コミット
a61cd0ae0f

+ 9 - 7
third_party/0002-third-party-angle.patch → third_party/0001-third-party-angle.patch

@@ -1,8 +1,8 @@
 diff --git a/BUILD.gn b/BUILD.gn
-index aadf1b1ca..e77966791 100644
+index ef402486c..ea007dcce 100644
 --- a/BUILD.gn
 +++ b/BUILD.gn
-@@ -217,6 +217,9 @@ config("extra_warnings") {
+@@ -221,6 +221,9 @@ config("extra_warnings") {
        "-Wstrict-prototypes",
        "-Wunreachable-code-aggressive",
        "-Wshorten-64-to-32",
@@ -13,7 +13,7 @@ index aadf1b1ca..e77966791 100644
    }
  
 diff --git a/gni/angle.gni b/gni/angle.gni
-index 457b41792..a367d72f5 100644
+index 5ccddb13e..804acecd1 100644
 --- a/gni/angle.gni
 +++ b/gni/angle.gni
 @@ -74,7 +74,8 @@ declare_args() {
@@ -27,15 +27,17 @@ index 457b41792..a367d72f5 100644
    } else if (current_cpu == "arm" || current_cpu == "x86" ||
               current_cpu == "mipsel" || current_cpu == "s390" ||
 diff --git a/src/common/platform.h b/src/common/platform.h
-index c39c7e040..bd8a0a073 100644
+index c39c7e040..b68561cbf 100644
 --- a/src/common/platform.h
 +++ b/src/common/platform.h
-@@ -102,7 +102,7 @@
+@@ -101,8 +101,8 @@
+ #    define ANGLE_USE_SSE
  #endif
  
- // Mips and arm devices need to include stddef for size_t.
+-// Mips and arm devices need to include stddef for size_t.
 -#if defined(__mips__) || defined(__arm__) || defined(__aarch64__)
-+#if defined(__mips__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv)
++// Mips, arm and riscv devices need to include stddef for size_t.
++#if defined(__mips__) || defined(__arm__) || defined(__aarch64__) || (defined(__riscv) && __riscv_xlen == 64)
  #    include <stddef.h>
  #endif
  

+ 1 - 1
third_party/0003-third-party-dawn.patch → third_party/0002-third-party-dawn.patch

@@ -1,5 +1,5 @@
 diff --git a/src/dawn/common/Platform.h b/src/dawn/common/Platform.h
-index f9471021..cde97427 100644
+index f9471021f..cde974278 100644
 --- a/src/dawn/common/Platform.h
 +++ b/src/dawn/common/Platform.h
 @@ -68,7 +68,7 @@

+ 35 - 31
third_party/0004-third-party-ffmpeg.patch → third_party/0003-third-party-ffmpeg.patch

@@ -19,7 +19,7 @@ index 5ea4e37336..cd4b61bb2d 100755
          rebase_path(target_gen_dir, root_build_dir),
        ]
 diff --git a/CREDITS.chromium b/CREDITS.chromium
-index 1a12e2a528..8cbb66d9d1 100644
+index d8b6501bef..894feedc0d 100644
 --- a/CREDITS.chromium
 +++ b/CREDITS.chromium
 @@ -129,160 +129,6 @@ incompatible with the GPLv2 and v3. To the best of our knowledge, they are
@@ -183,7 +183,7 @@ index 1a12e2a528..8cbb66d9d1 100644
  ********************************************************************************
  
  libavformat/oggparsetheora.c
-@@ -336,31 +182,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+@@ -311,31 +157,6 @@ DEALINGS IN THE SOFTWARE.
  
  ********************************************************************************
  
@@ -216,7 +216,7 @@ index 1a12e2a528..8cbb66d9d1 100644
  
  Copyright (C) 2011-2013 Michael Niedermayer (michaelni@gmx.at)
 diff --git a/chromium/scripts/build_ffmpeg.py b/chromium/scripts/build_ffmpeg.py
-index 5a60f416be..ebbb9e153a 100755
+index 423e867101..0362c88ddb 100755
 --- a/chromium/scripts/build_ffmpeg.py
 +++ b/chromium/scripts/build_ffmpeg.py
 @@ -40,7 +40,7 @@ BRANDINGS = [
@@ -237,7 +237,7 @@ index 5a60f416be..ebbb9e153a 100755
    else:
      return None
  
-@@ -912,6 +914,13 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs,
+@@ -893,6 +895,13 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs,
              '--extra-cflags=--target=mips64el-linux-gnuabi64',
              '--extra-ldflags=--target=mips64el-linux-gnuabi64',
          ])
@@ -251,7 +251,7 @@ index 5a60f416be..ebbb9e153a 100755
      else:
        print(
            'Error: Unknown target arch %r for target OS %r!' % (target_arch,
-@@ -937,7 +946,7 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs,
+@@ -918,7 +927,7 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, parallel_jobs,
      # typically be the system one, so explicitly configure use of Clang's
      # ld.lld, to ensure that things like cross-compilation and LTO work.
      # This does not work for ia32 and is always used on mac.
@@ -261,7 +261,7 @@ index 5a60f416be..ebbb9e153a 100755
  
    # Should be run on Mac, unless we're cross-compiling on Linux.
 diff --git a/chromium/scripts/copy_config.sh b/chromium/scripts/copy_config.sh
-index 0e5159d6f4..0c07bd2476 100755
+index 4db59d2081..cbfd974ace 100755
 --- a/chromium/scripts/copy_config.sh
 +++ b/chromium/scripts/copy_config.sh
 @@ -10,7 +10,7 @@ for os in android linux linux-noasm mac win; do
@@ -272,9 +272,9 @@ index 0e5159d6f4..0c07bd2476 100755
 +    for arch in arm arm-neon arm64 ia32 x64 mipsel mips64el riscv64; do
        # Don't waste time on non-existent configs, if no config.h then skip.
        [ ! -e "build.$arch.$os/$target/config.h" ] && continue
-       for f in config.h config.asm libavutil/avconfig.h libavutil/ffversion.h libavcodec/bsf_list.c libavcodec/codec_list.c libavcodec/parser_list.c libavformat/demuxer_list.c libavformat/muxer_list.c libavformat/protocol_list.c; do
+       for f in config.h config_components.h config.asm libavutil/avconfig.h libavutil/ffversion.h libavcodec/bsf_list.c libavcodec/codec_list.c libavcodec/parser_list.c libavformat/demuxer_list.c libavformat/muxer_list.c libavformat/protocol_list.c; do
 diff --git a/chromium/scripts/generate_gn.py b/chromium/scripts/generate_gn.py
-index cb0aaedcf6..8705f04f62 100755
+index e86c7e0b6f..77e9706d09 100755
 --- a/chromium/scripts/generate_gn.py
 +++ b/chromium/scripts/generate_gn.py
 @@ -78,7 +78,7 @@ _Attrs = ('ARCHITECTURE', 'TARGET', 'PLATFORM')
@@ -328,7 +328,7 @@ index 880a697da6..3e96924c7f 100755
      gg.ReduceConditionalLogic(a)
  
 diff --git a/ffmpeg_generated.gni b/ffmpeg_generated.gni
-index 7db1e45037..e838e27df8 100644
+index 6798e91e08..e3ee785c24 100644
 --- a/ffmpeg_generated.gni
 +++ b/ffmpeg_generated.gni
 @@ -14,15 +14,12 @@ ffmpeg_asm_sources = []
@@ -367,11 +367,12 @@ index 7db1e45037..e838e27df8 100644
      "libavcodec/mpegaudiodsp_data.c",
      "libavcodec/mpegaudiodsp_fixed.c",
      "libavcodec/mpegaudiodsp_float.c",
-@@ -86,10 +87,19 @@ if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_android && curre
+@@ -86,11 +87,20 @@ if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_android && curre
      "libavcodec/rdft.c",
      "libavcodec/to_upper4.c",
      "libavcodec/utils.c",
 +    "libavcodec/videodsp.c",
+     "libavcodec/vlc.c",
      "libavcodec/vorbis.c",
      "libavcodec/vorbis_data.c",
      "libavcodec/vorbis_parser.c",
@@ -387,7 +388,7 @@ index 7db1e45037..e838e27df8 100644
      "libavcodec/vp9_parser.c",
      "libavcodec/xiph.c",
      "libavformat/allformats.c",
-@@ -138,11 +148,6 @@ if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_android && curre
+@@ -139,11 +149,6 @@ if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_android && curre
      "libavformat/wavdec.c",
      "libavutil/aes.c",
      "libavutil/aes_ctr.c",
@@ -397,8 +398,8 @@ index 7db1e45037..e838e27df8 100644
 -    "libavutil/autorename_libavutil_imgutils.c",
 -    "libavutil/autorename_libavutil_tx_float.c",
      "libavutil/autorename_libavutil_utils.c",
-     "libavutil/avsscanf.c",
      "libavutil/avstring.c",
+     "libavutil/base64.c",
 @@ -152,6 +157,7 @@ if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_android && curre
      "libavutil/camellia.c",
      "libavutil/channel_layout.c",
@@ -407,7 +408,7 @@ index 7db1e45037..e838e27df8 100644
      "libavutil/crc.c",
      "libavutil/detection_bbox.c",
      "libavutil/dict.c",
-@@ -164,9 +170,12 @@ if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_android && curre
+@@ -164,10 +170,13 @@ if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_android && curre
      "libavutil/fifo.c",
      "libavutil/file_open.c",
      "libavutil/film_grain_params.c",
@@ -415,12 +416,13 @@ index 7db1e45037..e838e27df8 100644
 +    "libavutil/float_dsp.c",
      "libavutil/frame.c",
      "libavutil/hdr_dynamic_metadata.c",
+     "libavutil/hdr_dynamic_vivid_metadata.c",
      "libavutil/hwcontext.c",
 +    "libavutil/imgutils.c",
      "libavutil/integer.c",
      "libavutil/intmath.c",
      "libavutil/lfg.c",
-@@ -195,27 +204,20 @@ if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_android && curre
+@@ -197,27 +206,20 @@ if ((is_android && current_cpu == "arm" && arm_use_neon) || (is_android && curre
      "libavutil/twofish.c",
      "libavutil/tx.c",
      "libavutil/tx_double.c",
@@ -451,7 +453,7 @@ index 7db1e45037..e838e27df8 100644
      "libavcodec/celp_filters.c",
      "libavcodec/celp_math.c",
      "libavcodec/error_resilience.c",
-@@ -229,32 +231,50 @@ if (use_linux_config && ffmpeg_branding == "ChromeOS") {
+@@ -231,32 +233,50 @@ if (use_linux_config && ffmpeg_branding == "ChromeOS") {
      "libavcodec/h263data.c",
      "libavcodec/h263dec.c",
      "libavcodec/h263dsp.c",
@@ -503,7 +505,7 @@ index 7db1e45037..e838e27df8 100644
      "libavcodec/h2645_parse.c",
      "libavcodec/h264_cabac.c",
      "libavcodec/h264_cavlc.c",
-@@ -275,381 +295,14 @@ if ((is_mac && ffmpeg_branding == "Chrome") || (is_win && ffmpeg_branding == "Ch
+@@ -277,383 +297,14 @@ if ((is_mac && ffmpeg_branding == "Chrome") || (is_win && ffmpeg_branding == "Ch
      "libavcodec/h264idct.c",
      "libavcodec/h264qpel.c",
      "libavcodec/h274.c",
@@ -670,24 +672,10 @@ index 7db1e45037..e838e27df8 100644
 -  ]
 -}
 -
--if ((is_android && current_cpu == "x64") || (is_android && current_cpu == "x86") || (is_mac && current_cpu == "x64") || (is_win && current_cpu == "x64") || (is_win && current_cpu == "x86") || (use_linux_config && current_cpu == "x64") || (use_linux_config && current_cpu == "x86")) {
+-if ((is_android && current_cpu == "x64") || (is_mac && current_cpu == "x64") || (is_win && current_cpu == "x64") || (is_win && current_cpu == "x86") || (use_linux_config && current_cpu == "x64") || (use_linux_config && current_cpu == "x86")) {
 -  ffmpeg_c_sources += [
--    "libavcodec/x86/autorename_libavcodec_x86_vorbisdsp_init.c",
--    "libavcodec/x86/constants.c",
--    "libavcodec/x86/dct_init.c",
--    "libavcodec/x86/fft_init.c",
--    "libavcodec/x86/flacdsp_init.c",
--    "libavcodec/x86/mpegaudiodsp.c",
--    "libavutil/x86/autorename_libavutil_x86_cpu.c",
--    "libavutil/x86/autorename_libavutil_x86_float_dsp_init.c",
--    "libavutil/x86/fixed_dsp_init.c",
--    "libavutil/x86/imgutils_init.c",
--    "libavutil/x86/lls_init.c",
 -    "libavutil/x86/tx_float_init.c",
 -  ]
--}
--
--if ((is_android && current_cpu == "x64") || (is_mac && current_cpu == "x64") || (is_win && current_cpu == "x64") || (is_win && current_cpu == "x86") || (use_linux_config && current_cpu == "x64") || (use_linux_config && current_cpu == "x86")) {
 -  ffmpeg_asm_sources += [
 -    "libavcodec/x86/dct32.asm",
 -    "libavcodec/x86/fft.asm",
@@ -703,6 +691,22 @@ index 7db1e45037..e838e27df8 100644
 -  ]
 -}
 -
+-if ((is_android && current_cpu == "x64") || (is_android && current_cpu == "x86") || (is_mac && current_cpu == "x64") || (is_win && current_cpu == "x64") || (is_win && current_cpu == "x86") || (use_linux_config && current_cpu == "x64") || (use_linux_config && current_cpu == "x86")) {
+-  ffmpeg_c_sources += [
+-    "libavcodec/x86/autorename_libavcodec_x86_vorbisdsp_init.c",
+-    "libavcodec/x86/constants.c",
+-    "libavcodec/x86/dct_init.c",
+-    "libavcodec/x86/fft_init.c",
+-    "libavcodec/x86/flacdsp_init.c",
+-    "libavcodec/x86/mpegaudiodsp.c",
+-    "libavutil/x86/autorename_libavutil_x86_cpu.c",
+-    "libavutil/x86/autorename_libavutil_x86_float_dsp_init.c",
+-    "libavutil/x86/fixed_dsp_init.c",
+-    "libavutil/x86/imgutils_init.c",
+-    "libavutil/x86/lls_init.c",
+-  ]
+-}
+-
 -if ((is_android && current_cpu == "arm64") || (is_mac && current_cpu == "arm64") || (is_win && current_cpu == "arm64") || (use_linux_config && current_cpu == "arm64")) {
 -  ffmpeg_c_sources += [
 -    "libavcodec/aarch64/fft_init_aarch64.c",

+ 0 - 0
third_party/0013-third-party-lss.patch → third_party/0004-third-party-lss.patch


+ 2 - 2
third_party/0007-third-party-libjxl-src.patch

@@ -1,12 +1,12 @@
 diff --git a/lib/jxl/base/arch_macros.h b/lib/jxl/base/arch_macros.h
-index a983019..fc5e9e0 100644
+index a983019..9f614fc 100644
 --- a/lib/jxl/base/arch_macros.h
 +++ b/lib/jxl/base/arch_macros.h
 @@ -28,6 +28,12 @@ namespace jxl {
  #define JXL_ARCH_ARM 0
  #endif
  
-+#if defined(__riscv)
++#if defined(__riscv) && __riscv_xlen == 64
 +#define JXL_ARCH_RISCV64 1
 +#else
 +#define JXL_ARCH_RISCV64 0

+ 0 - 773
third_party/0011-third-party-crashpad-crashpad.patch

@@ -1,773 +0,0 @@
-diff --git a/third_party/crashpad/crashpad/minidump/minidump_context.h b/third_party/crashpad/crashpad/minidump/minidump_context.h
-index 3a3e603cb0d2d..cf074d2b8236b 100644
---- a/third_party/crashpad/crashpad/minidump/minidump_context.h
-+++ b/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_
-diff --git a/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc b/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
-index 2f2d90ba47071..ad26739432f51 100644
---- a/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
-+++ b/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
-@@ -102,6 +102,13 @@ MinidumpContextWriter::CreateFromSnapshot(const CPUContext* context_snapshot) {
-       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;
-@@ -454,4 +461,41 @@ size_t MinidumpContextMIPS64Writer::ContextSize() const {
-   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
-diff --git a/third_party/crashpad/crashpad/minidump/minidump_context_writer.h b/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
-index 80b312b23c2a4..278830085c162 100644
---- a/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
-+++ b/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
-@@ -330,6 +330,47 @@ class MinidumpContextMIPS64Writer final : public MinidumpContextWriter {
-   MinidumpContextMIPS64 context_;
- };
- 
-+//! \brief The writer for a MinidumpContextRISCV64 structure in a minidump file.
-+class MinidumpContextRISCV64Writer final : public MinidumpContextWriter {
-+ public:
-+  MinidumpContextRISCV64Writer();
-+  ~MinidumpContextRISCV64Writer() override;
-+
-+  MinidumpContextRISCV64Writer(const MinidumpContextRISCV64Writer&) = delete;
-+  void operator=(const MinidumpContextRISCV64Writer&) = delete;
-+
-+  //! \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 object’s 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_;
-+};
-+
- }  // namespace crashpad
- 
- #endif  // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_WRITER_H_
-diff --git a/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc b/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
-index 78847c11970e5..b2a1486dfbbf0 100644
---- a/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
-+++ b/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
-@@ -135,6 +135,10 @@ std::string MinidumpMiscInfoDebugBuildString() {
-   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
-diff --git a/third_party/crashpad/crashpad/snapshot/capture_memory.cc b/third_party/crashpad/crashpad/snapshot/capture_memory.cc
-index 06d92581330bf..a8b52d11b9b53 100644
---- a/third_party/crashpad/crashpad/snapshot/capture_memory.cc
-+++ b/third_party/crashpad/crashpad/snapshot/capture_memory.cc
-@@ -112,6 +112,16 @@ void CaptureMemory::PointedToByContext(const CPUContext& context,
-   for (size_t i = 0; i < std::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
-diff --git a/third_party/crashpad/crashpad/snapshot/cpu_architecture.h b/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
-index 811a7209587d2..5b09abdb96761 100644
---- a/third_party/crashpad/crashpad/snapshot/cpu_architecture.h
-+++ b/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
-diff --git a/third_party/crashpad/crashpad/snapshot/cpu_context.cc b/third_party/crashpad/crashpad/snapshot/cpu_context.cc
-index 2e29f70398c9f..e2f8097e2cae1 100644
---- a/third_party/crashpad/crashpad/snapshot/cpu_context.cc
-+++ b/third_party/crashpad/crashpad/snapshot/cpu_context.cc
-@@ -197,10 +197,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();
-diff --git a/third_party/crashpad/crashpad/snapshot/cpu_context.h b/third_party/crashpad/crashpad/snapshot/cpu_context.h
-index fb23c4679f0af..e120a980448d6 100644
---- a/third_party/crashpad/crashpad/snapshot/cpu_context.h
-+++ b/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;
-   };
- };
- 
-diff --git a/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc b/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
-index 8464a5a27b2dc..ec41216daa902 100644
---- a/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
-+++ b/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.cc
-@@ -266,6 +266,30 @@ void InitializeCPUContextARM64_OnlyFPSIMD(
-   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
-diff --git a/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h b/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
-index 9f46a48977e12..1add07f81af88 100644
---- a/third_party/crashpad/crashpad/snapshot/linux/cpu_context_linux.h
-+++ b/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
- 
-diff --git a/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc b/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
-index efc9e5694ea8b..3d57d96756208 100644
---- a/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
-+++ b/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.cc
-@@ -325,6 +325,61 @@ bool ExceptionSnapshotLinux::ReadContext<ContextTraits64>(
-       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(
-diff --git a/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h b/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
-index 05f6004e11d1e..0520af4ce9019 100644
---- a/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
-+++ b/third_party/crashpad/crashpad/snapshot/linux/exception_snapshot_linux.h
-@@ -89,6 +89,9 @@ class ExceptionSnapshotLinux final : public ExceptionSnapshot {
- #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_;
-diff --git a/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc b/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
-index 5711f343a46c4..abbb1662c3e0a 100644
---- a/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
-+++ b/third_party/crashpad/crashpad/snapshot/linux/process_reader_linux.cc
-@@ -108,6 +108,9 @@ void ProcessReaderLinux::Thread::InitializeStack(ProcessReaderLinux* reader) {
- #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
-diff --git a/third_party/crashpad/crashpad/snapshot/linux/signal_context.h b/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
-index c004f8f6dfab6..6aa9ee38f5b04 100644
---- a/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
-+++ b/third_party/crashpad/crashpad/snapshot/linux/signal_context.h
-@@ -422,6 +422,67 @@ static_assert(offsetof(UContext<ContextTraits64>, mcontext.fpregs) ==
-               "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
-diff --git a/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc b/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
-index e77bcafa9c6b5..55564ae4aeaf5 100644
---- a/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
-+++ b/third_party/crashpad/crashpad/snapshot/linux/system_snapshot_linux.cc
-@@ -205,6 +205,9 @@ CPUArchitecture SystemSnapshotLinux::GetCPUArchitecture() const {
- #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
-@@ -220,6 +223,9 @@ uint32_t SystemSnapshotLinux::CPURevision() const {
- #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
-@@ -240,6 +246,9 @@ std::string SystemSnapshotLinux::CPUVendor() const {
- #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
-@@ -373,6 +382,9 @@ bool SystemSnapshotLinux::NXEnabled() const {
- #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
-diff --git a/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc b/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
-index f279e0adaddba..8c133a7ca909f 100644
---- a/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
-+++ b/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.cc
-@@ -189,6 +189,22 @@ bool ThreadSnapshotLinux::Initialize(
-         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
-diff --git a/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h b/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
-index 40cd7e7f54a39..aea1ce2047a6b 100644
---- a/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
-+++ b/third_party/crashpad/crashpad/snapshot/linux/thread_snapshot_linux.h
-@@ -73,6 +73,9 @@ class ThreadSnapshotLinux final : public ThreadSnapshot {
- #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
-diff --git a/third_party/crashpad/crashpad/util/linux/ptracer.cc b/third_party/crashpad/crashpad/util/linux/ptracer.cc
-index 557e0d3635752..d74dbc1ba1688 100644
---- a/third_party/crashpad/crashpad/util/linux/ptracer.cc
-+++ b/third_party/crashpad/crashpad/util/linux/ptracer.cc
-@@ -397,6 +397,50 @@ bool GetThreadArea64(pid_t tid,
-   *address = FromPointerCast<LinuxVMAddress>(result);
-   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.
-diff --git a/third_party/crashpad/crashpad/util/linux/thread_info.h b/third_party/crashpad/crashpad/util/linux/thread_info.h
-index d3f3b2c6953fa..6a649dc3d7ac7 100644
---- a/third_party/crashpad/crashpad/util/linux/thread_info.h
-+++ b/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
-@@ -281,6 +356,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
-diff --git a/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc b/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
-index 7e3f41186f462..9568dc2e24f97 100644
---- a/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
-+++ b/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
-@@ -237,6 +237,8 @@ std::string UserAgent() {
- #elif defined(ARCH_CPU_BIG_ENDIAN)
-     static constexpr char arch[] = "aarch64_be";
- #endif
-+#elif defined(ARCH_CPU_RISCV64)
-+    static constexpr char arch[] = "riscv64";
- #else
- #error Port
- #endif

+ 0 - 0
third_party/0012-third-party-highway-src.patch → third_party/0011-third-party-highway-src.patch