Browse Source

rebase patchset to 99ce2ebd79dc6

Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
Rebecca Chang Swee Fun 2 years ago
parent
commit
cf53f2ee40
26 changed files with 677 additions and 119 deletions
  1. 607 0
      0001-linux-sysroot-script-to-create-riscv-sysroot-from-De.patch
  2. 2 2
      0002-sandbox-add-riscv-arch-definition-and-define-syscall.patch
  3. 2 2
      0003-sandbox-linux-pass-fPIE-to-compiler.patch
  4. 2 2
      0004-skia-add-riscv64.patch
  5. 4 4
      0005-base-allocator-partition_allocator-add-riscv64-suppo.patch
  6. 2 2
      0006-base-process-add-riscv64-arch-definition.patch
  7. 2 2
      0007-remoting-fix-missing-cstring-header.patch
  8. 2 2
      0008-remoting-codec-fix-missing-cmath-header.patch
  9. 2 2
      0009-components-update_client-add-riscv64-arch-definition.patch
  10. 2 2
      0010-build-config-compiler-use_gold-linker-option.patch
  11. 3 3
      0011-build-config-compiler-remove-flags-not-available-in-.patch
  12. 2 2
      0012-build-config-add-atomic-build-flag.patch
  13. 3 3
      0013-build-config-compiler-set-generic-riscv64-flags.patch
  14. 2 2
      0014-chrome-common-remove-unrar-code.patch
  15. 2 2
      0015-third_party-libaom-add-riscv-target.patch
  16. 3 3
      0016-third_party-libvpx-add-riscv-target.patch
  17. 17 17
      0017-third_party-crashpad-add-support-for-riscv.patch
  18. 2 2
      0018-third_party-lzma_sdk-add-riscv-arch-definition.patch
  19. 2 2
      0019-build-linux-sysroot-create-a-sysroot-for-riscv.patch
  20. 2 2
      0020-workaround-for-files-not-found-in-sysroot.patch
  21. 2 2
      0021-v8-settings.patch
  22. 3 3
      0022-compiler-workaround.patch
  23. 1 50
      README.md
  24. BIN
      archive/debian_sid_riscv64_sysroot.tar.xz
  25. 4 4
      third_party/0001-third-party-angle.patch
  26. 2 2
      third_party/0002-third-party-dawn.patch

+ 607 - 0
0001-linux-sysroot-script-to-create-riscv-sysroot-from-De.patch

@@ -0,0 +1,607 @@
+From 89e1e2acf8c1c57d5f833b60a5f40a9b89440e51 Mon Sep 17 00:00:00 2001
+From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
+Date: Wed, 18 May 2022 06:00:28 +0000
+Subject: [PATCH 01/22] linux: sysroot: script to create riscv sysroot from
+ Debian ports
+
+Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
+---
+ .../sysroot_scripts/sysroot-creator-sid.sh    | 416 ++++++++++++++++++
+ .../linux/sysroot_scripts/sysroot-creator.sh  |  52 ++-
+ 2 files changed, 459 insertions(+), 9 deletions(-)
+ create mode 100755 build/linux/sysroot_scripts/sysroot-creator-sid.sh
+
+diff --git a/build/linux/sysroot_scripts/sysroot-creator-sid.sh b/build/linux/sysroot_scripts/sysroot-creator-sid.sh
+new file mode 100755
+index 0000000000000..f8c01b96256d5
+--- /dev/null
++++ b/build/linux/sysroot_scripts/sysroot-creator-sid.sh
+@@ -0,0 +1,416 @@
++#!/bin/bash
++# Copyright 2022 The Chromium Authors. All rights reserved.
++# Use of this source code is governed by a BSD-style license that can be
++# found in the LICENSE file.
++
++SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
++
++DISTRO=debian
++DIST=sid
++
++ARCHIVE_URL="http://ftp.ports.debian.org/debian-ports/"
++APT_SOURCES_LIST=(
++  "${ARCHIVE_URL} experimental main"
++  "${ARCHIVE_URL} unreleased main"
++  "${ARCHIVE_URL} unstable main"
++  "${ARCHIVE_URL} sid main"
++)
++
++# gpg keyring file generated using generate_keyring.sh
++KEYRING_FILE="/etc/apt/trusted.gpg.d/debian-ports-archive-2022.gpg"
++
++HAS_ARCH_RISCV64=1
++
++# Sysroot packages: these are the packages needed to build chrome.
++DEBIAN_PACKAGES="\
++  comerr-dev
++  krb5-multidev
++  libasound2
++  libasound2-dev
++  libasyncns0
++  libatk-bridge2.0-0
++  libatk-bridge2.0-dev
++  libatk1.0-0
++  libatk1.0-dev
++  libatomic1
++  libatspi2.0-0
++  libatspi2.0-dev
++  libattr1
++  libaudit1
++  libavahi-client3
++  libavahi-common3
++  libblkid-dev
++  libblkid1
++  libbluetooth-dev
++  libbluetooth3
++  libbrotli-dev
++  libbrotli1
++  libbsd0
++  libc6
++  libc6-dev
++  libcairo-gobject2
++  libcairo-script-interpreter2
++  libcairo2
++  libcairo2-dev
++  libcap-dev
++  libcap-ng0
++  libcap2
++  libcloudproviders0
++  libcolord2
++  libcom-err2
++  libcups2
++  libcups2-dev
++  libcupsimage2
++  libcupsimage2-dev
++  libcurl3-gnutls
++  libcurl4-gnutls-dev
++  libdatrie-dev
++  libdatrie1
++  libdb5.3
++  libdbus-1-3
++  libdbus-1-dev
++  libdbus-glib-1-2
++  libdbusmenu-glib-dev
++  libdbusmenu-glib4
++  libdbusmenu-gtk3-4
++  libdbusmenu-gtk4
++  libdeflate-dev
++  libdeflate0
++  libdouble-conversion3
++  libdrm-amdgpu1
++  libdrm-dev
++  libdrm-nouveau2
++  libdrm-radeon1
++  libdrm2
++  libegl-dev
++  libegl1
++  libegl1-mesa
++  libegl1-mesa-dev
++  libelf-dev
++  libelf1
++  libepoxy-dev
++  libepoxy0
++  libevdev-dev
++  libevdev2
++  libevent-2.1-7
++  libexpat1
++  libexpat1-dev
++  libffi-dev
++  libffi8
++  libflac-dev
++  libflac8
++  libfontconfig-dev
++  libfontconfig1
++  libfreetype-dev
++  libfreetype6
++  libfribidi-dev
++  libfribidi0
++  libgbm-dev
++  libgbm1
++  libgcc-10-dev
++  libgcc-s1
++  libgcrypt20
++  libgcrypt20-dev
++  libgdk-pixbuf-2.0-0
++  libgdk-pixbuf-2.0-dev
++  libgl-dev
++  libgl1
++  libgl1-mesa-dev
++  libgl1-mesa-glx
++  libglapi-mesa
++  libgles-dev
++  libgles1
++  libgles2
++  libglib2.0-0
++  libglib2.0-dev
++  libglvnd-dev
++  libglvnd0
++  libglx-dev
++  libglx0
++  libgmp10
++  libgnutls-dane0
++  libgnutls-openssl27
++  libgnutls28-dev
++  libgnutls30
++  libgnutlsxx30
++  libgomp1
++  libgpg-error-dev
++  libgpg-error0
++  libgraphene-1.0-0
++  libgraphene-1.0-dev
++  libgraphite2-3
++  libgraphite2-dev
++  libgssapi-krb5-2
++  libgssrpc4
++  libgtk-3-0
++  libgtk-3-dev
++  libgtk-4-1
++  libgtk-4-dev
++  libgtk2.0-0
++  libgudev-1.0-0
++  libharfbuzz-dev
++  libharfbuzz-gobject0
++  libharfbuzz-icu0
++  libharfbuzz0b
++  libhogweed6
++  libice6
++  libicu-le-hb0
++  libicu71
++  libidl-2-0
++  libidn12
++  libidn2-0
++  libinput-dev
++  libinput10
++  libjbig-dev
++  libjbig0
++  libjpeg62-turbo
++  libjpeg62-turbo-dev
++  libjson-glib-1.0-0
++  libjsoncpp-dev
++  libjsoncpp25
++  libk5crypto3
++  libkadm5clnt-mit12
++  libkadm5srv-mit12
++  libkdb5-10
++  libkeyutils1
++  libkrb5-3
++  libkrb5-dev
++  libkrb5support0
++  liblcms2-2
++  libldap-2.5-0
++  libltdl7
++  liblz4-1
++  liblzma5
++  liblzo2-2
++  libmd0
++  libmd4c0
++  libminizip-dev
++  libminizip1
++  libmount-dev
++  libmount1
++  libmtdev1
++  libncurses-dev
++  libncurses6
++  libncursesw6
++  libnettle8
++  libnghttp2-14
++  libnsl2
++  libnspr4
++  libnspr4-dev
++  libnss-db
++  libnss3
++  libnss3-dev
++  libogg-dev
++  libogg0
++  libopengl0
++  libopus-dev
++  libopus0
++  libp11-kit0
++  libpam0g
++  libpam0g-dev
++  libpango-1.0-0
++  libpango1.0-dev
++  libpangocairo-1.0-0
++  libpangoft2-1.0-0
++  libpangoxft-1.0-0
++  libpci-dev
++  libpci3
++  libpciaccess0
++  libpcre16-3
++  libpcre2-16-0
++  libpcre2-32-0
++  libpcre2-8-0
++  libpcre2-dev
++  libpcre2-posix3
++  libpcre3
++  libpcre3-dev
++  libpcre32-3
++  libpcrecpp0v5
++  libpipewire-0.3-0
++  libpipewire-0.3-dev
++  libpixman-1-0
++  libpixman-1-dev
++  libpng-dev
++  libpng16-16
++  libpsl5
++  libpthread-stubs0-dev
++  libpulse-dev
++  libpulse-mainloop-glib0
++  libpulse0
++  libqt5concurrent5
++  libqt5core5a
++  libqt5dbus5
++  libqt5gui5
++  libqt5network5
++  libqt5printsupport5
++  libqt5sql5
++  libqt5test5
++  libqt5widgets5
++  libqt5xml5
++  libre2-9
++  libre2-dev
++  librest-0.7-0
++  librtmp1
++  libsasl2-2
++  libselinux1
++  libselinux1-dev
++  libsepol2
++  libsepol-dev
++  libsm6
++  libsnappy-dev
++  libsnappy1v5
++  libsndfile1
++  libsoup-gnome2.4-1
++  libsoup2.4-1
++  libspa-0.2-dev
++  libspeechd-dev
++  libspeechd2
++  libsqlite3-0
++  libssh2-1
++  libssl-dev
++  libssl1.1
++  libstdc++-10-dev
++  libstdc++6
++  libsystemd0
++  libtasn1-6
++  libthai-dev
++  libthai0
++  libtiff-dev
++  libtiff5
++  libtiffxx5
++  libtinfo6
++  libtirpc3
++  libudev-dev
++  libudev1
++  libunbound8
++  libunistring2
++  libutempter-dev
++  libutempter0
++  libuuid1
++  libva-dev
++  libva-drm2
++  libva-glx2
++  libva-wayland2
++  libva-x11-2
++  libva2
++  libvorbis0a
++  libvorbisenc2
++  libvulkan-dev
++  libvulkan1
++  libwacom9
++  libwayland-client0
++  libwayland-cursor0
++  libwayland-dev
++  libwayland-egl1
++  libwayland-egl1-mesa
++  libwayland-server0
++  libwebp-dev
++  libwebp7
++  libwebpdemux2
++  libwebpmux3
++  libwrap0
++  libx11-6
++  libx11-dev
++  libx11-xcb-dev
++  libx11-xcb1
++  libxau-dev
++  libxau6
++  libxcb-dri2-0
++  libxcb-dri2-0-dev
++  libxcb-dri3-0
++  libxcb-dri3-dev
++  libxcb-glx0
++  libxcb-glx0-dev
++  libxcb-icccm4
++  libxcb-image0
++  libxcb-keysyms1
++  libxcb-present-dev
++  libxcb-present0
++  libxcb-randr0
++  libxcb-render-util0
++  libxcb-render0
++  libxcb-render0-dev
++  libxcb-shape0
++  libxcb-shm0
++  libxcb-shm0-dev
++  libxcb-sync1
++  libxcb-util1
++  libxcb-xfixes0
++  libxcb-xinerama0
++  libxcb-xinput0
++  libxcb-xkb1
++  libxcb1
++  libxcb1-dev
++  libxcomposite-dev
++  libxcomposite1
++  libxcursor-dev
++  libxcursor1
++  libxdamage-dev
++  libxdamage1
++  libxdmcp-dev
++  libxdmcp6
++  libxext-dev
++  libxext6
++  libxfixes-dev
++  libxfixes3
++  libxft-dev
++  libxft2
++  libxi-dev
++  libxi6
++  libxinerama-dev
++  libxinerama1
++  libxkbcommon-dev
++  libxkbcommon-x11-0
++  libxkbcommon0
++  libxml2
++  libxml2-dev
++  libxrandr-dev
++  libxrandr2
++  libxrender-dev
++  libxrender1
++  libxshmfence-dev
++  libxshmfence1
++  libxslt1-dev
++  libxslt1.1
++  libxss-dev
++  libxss1
++  libxt-dev
++  libxt6
++  libxtst-dev
++  libxtst6
++  libxxf86vm-dev
++  libxxf86vm1
++  libzstd1
++  linux-libc-dev
++  mesa-common-dev
++  qtbase5-dev
++  qtbase5-dev-tools
++  shared-mime-info
++  uuid-dev
++  wayland-protocols
++  x11proto-dev
++  zlib1g
++  zlib1g-dev
++"
++
++DEBIAN_PACKAGES_RISCV64="
++  libtsan0
++  liblsan0
++  libasan6
++  libdrm-intel1
++  libitm1
++  libquadmath0
++  libdrm-etnaviv1
++  libdrm-exynos1
++  libdrm-freedreno1
++  libdrm-omap1
++  libdrm-tegra0
++  libgmp10
++  liblsan0
++  libthai0
++  libtsan0
++  libubsan1
++  valgrind
++"
++
++. "${SCRIPT_DIR}/sysroot-creator.sh"
+diff --git a/build/linux/sysroot_scripts/sysroot-creator.sh b/build/linux/sysroot_scripts/sysroot-creator.sh
+index bde29db92ba02..b252c28a166a4 100644
+--- a/build/linux/sysroot_scripts/sysroot-creator.sh
++++ b/build/linux/sysroot_scripts/sysroot-creator.sh
+@@ -51,6 +51,7 @@ readonly HAS_ARCH_ARM64=${HAS_ARCH_ARM64:=0}
+ readonly HAS_ARCH_ARMEL=${HAS_ARCH_ARMEL:=0}
+ readonly HAS_ARCH_MIPS=${HAS_ARCH_MIPS:=0}
+ readonly HAS_ARCH_MIPS64EL=${HAS_ARCH_MIPS64EL:=0}
++readonly HAS_ARCH_RISCV64=${HAS_ARCH_RISCV64:=0}
+ 
+ readonly REQUIRED_TOOLS="curl xzcat"
+ 
+@@ -69,6 +70,7 @@ readonly DEBIAN_DEP_LIST_ARM64="generated_package_lists/${DIST}.arm64"
+ readonly DEBIAN_DEP_LIST_ARMEL="generated_package_lists/${DIST}.armel"
+ readonly DEBIAN_DEP_LIST_MIPS="generated_package_lists/${DIST}.mipsel"
+ readonly DEBIAN_DEP_LIST_MIPS64EL="generated_package_lists/${DIST}.mips64el"
++readonly DEBIAN_DEP_LIST_RISCV64="generated_package_lists/${DIST}.riscv64"
+ 
+ 
+ ######################################################################
+@@ -171,6 +173,9 @@ SetEnvironmentVariables() {
+     *ARMEL)
+       ARCH=ARMEL
+       ;;
++    *Riscv*)
++      ARCH=RISCV64
++      ;;
+     *)
+       echo "ERROR: Unable to determine architecture based on: $1"
+       exit 1
+@@ -312,6 +317,10 @@ GeneratePackageListMips64el() {
+   ${DEBIAN_PACKAGES_MIPS64EL:=}"
+ }
+ 
++GeneratePackageListRiscv64() {
++  GeneratePackageListCommon "$1" riscv64 "${DEBIAN_PACKAGES}"
++}
++
+ StripChecksumsFromPackageList() {
+   local package_file="$1"
+   sed -i 's/ [a-f0-9]\{64\}$//' "$package_file"
+@@ -402,13 +411,11 @@ HacksAndPatchesAmd64() {
+   ReversionGlibc x86_64 linux-gnu
+ }
+ 
+-
+ HacksAndPatchesI386() {
+   HacksAndPatchesCommon i386 linux-gnu strip
+   ReversionGlibc i386 linux-gnu
+ }
+ 
+-
+ HacksAndPatchesARM() {
+   HacksAndPatchesCommon arm linux-gnueabihf arm-linux-gnueabihf-strip
+   ReversionGlibc arm linux-gnueabihf
+@@ -433,12 +440,15 @@ HacksAndPatchesMips() {
+   ReversionGlibc mipsel linux-gnu
+ }
+ 
+-
+ HacksAndPatchesMips64el() {
+   HacksAndPatchesCommon mips64el linux-gnuabi64 mips64el-linux-gnuabi64-strip
+   ReversionGlibc mips64el linux-gnuabi64
+ }
+ 
++HacksAndPatchesRiscv64() {
++  HacksAndPatchesCommon riscv64 linux-gnu true
++   ReversionGlibc riscv64 linux-gnu
++}
+ 
+ InstallIntoSysroot() {
+   Banner "Install Libs And Headers Into Jail"
+@@ -489,7 +499,7 @@ CleanupJailSymlinks() {
+   cd ${INSTALL_ROOT}
+   local libdirs="lib usr/lib"
+   if [ "${ARCH}" != "MIPS" ]; then
+-    libdirs="${libdirs} lib64"
++    libdirs="${libdirs}"
+   fi
+ 
+   find $libdirs -type l -printf '%p %l\n' | while read link target; do
+@@ -532,6 +542,7 @@ VerifyLibraryDepsCommon() {
+   local all_libs="$(find ${find_dirs[*]} -printf '%f\n')"
+   # Ignore missing libdbus-1.so.0
+   all_libs+="$(echo -e '\nlibdbus-1.so.0')"
++  all_libs+="$(echo -e '\nlibicuuc.so.67')"
+   local missing_libs="$(grep -vFxf <(echo "${all_libs}") \
+     <(echo "${needed_libs}"))"
+   if [ ! -z "${missing_libs}" ]; then
+@@ -546,17 +557,14 @@ VerifyLibraryDepsAmd64() {
+   VerifyLibraryDepsCommon x86_64 linux-gnu
+ }
+ 
+-
+ VerifyLibraryDepsI386() {
+   VerifyLibraryDepsCommon i386 linux-gnu
+ }
+ 
+-
+ VerifyLibraryDepsARM() {
+   VerifyLibraryDepsCommon arm linux-gnueabihf
+ }
+ 
+-
+ VerifyLibraryDepsARM64() {
+   VerifyLibraryDepsCommon aarch64 linux-gnu
+ }
+@@ -569,11 +577,14 @@ VerifyLibraryDepsMips() {
+   VerifyLibraryDepsCommon mipsel linux-gnu
+ }
+ 
+-
+ VerifyLibraryDepsMips64el() {
+   VerifyLibraryDepsCommon mips64el linux-gnuabi64
+ }
+ 
++VerifyLibraryDepsRiscv64() {
++  VerifyLibraryDepsCommon riscv64 linux-gnu
++}
++
+ 
+ #@
+ #@ BuildSysrootAmd64
+@@ -715,6 +726,26 @@ BuildSysrootMips64el() {
+   CreateTarBall
+ }
+ 
++#@
++#@ BuildSysrootRiscv64
++#@
++#@    Build everything and package it
++BuildSysrootRiscv64() {
++  if [ "$HAS_ARCH_RISCV64" = "0" ]; then
++    return
++  fi
++  ClearInstallDir
++  local package_file="${DEBIAN_DEP_LIST_RISCV64}"
++  GeneratePackageListRiscv64 "$package_file"
++  local files_and_sha256sums="$(cat ${package_file})"
++  StripChecksumsFromPackageList "$package_file"
++  InstallIntoSysroot ${files_and_sha256sums}
++  HacksAndPatchesRiscv64
++  CleanupJailSymlinks
++  VerifyLibraryDepsRiscv64
++  CreateTarBall
++}
++
+ #@
+ #@ BuildSysrootAll
+ #@
+@@ -890,7 +921,7 @@ GeneratePackageList() {
+   local failed=0
+   for pkg in $@ ; do
+     local pkg_full=$(grep -A 1 " ${pkg}\$" "$input_file" | \
+-      egrep "pool/.*" | sed 's/.*Filename: //')
++      egrep "debian-ports/.*" | sed 's/.*Filename: //')
+     if [ -z "${pkg_full}" ]; then
+       echo "ERROR: missing package: $pkg"
+       local failed=1
+@@ -937,6 +968,9 @@ PrintArchitectures() {
+   if [ "$HAS_ARCH_MIPS64EL" = "1" ]; then
+     echo Mips64el
+   fi
++  if [ "$HAS_ARCH_RISCV64" = "1" ]; then
++    echo Riscv64
++  fi
+ }
+ 
+ #@
+-- 
+2.25.1
+

+ 2 - 2
0001-sandbox-add-riscv-arch-definition-and-define-syscall.patch → 0002-sandbox-add-riscv-arch-definition-and-define-syscall.patch

@@ -1,7 +1,7 @@
-From 68ec2a3a6e740a8020fd39f3a81a943e982541d5 Mon Sep 17 00:00:00 2001
+From 04f0043bacafe896df0633fd6450a3b751399fcc Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Wed, 30 Mar 2022 06:38:26 +0000
 Date: Wed, 30 Mar 2022 06:38:26 +0000
-Subject: [PATCH 01/21] sandbox: add riscv arch definition and define syscall
+Subject: [PATCH 02/22] sandbox: add riscv arch definition and define syscall
  header
  header
 
 
 Credit to work contributed in Github.
 Credit to work contributed in Github.

+ 2 - 2
0002-sandbox-linux-pass-fPIE-to-compiler.patch → 0003-sandbox-linux-pass-fPIE-to-compiler.patch

@@ -1,7 +1,7 @@
-From 93b4732471ac59684b2f84a9961ad60b07285819 Mon Sep 17 00:00:00 2001
+From 8f7c059991efa63ee7037a91427aab1235ec627f Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Thu, 13 Jan 2022 03:50:24 +0000
 Date: Thu, 13 Jan 2022 03:50:24 +0000
-Subject: [PATCH 02/21] sandbox: linux: pass -fPIE to compiler
+Subject: [PATCH 03/22] sandbox: linux: pass -fPIE to compiler
 
 
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 ---
 ---

+ 2 - 2
0003-skia-add-riscv64.patch → 0004-skia-add-riscv64.patch

@@ -1,7 +1,7 @@
-From f8c7bce44def7e1816906dfada76ea5c5761cec3 Mon Sep 17 00:00:00 2001
+From 47d5b9768c18033ff740de7e2c072b247bfe2852 Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Fri, 14 Jan 2022 01:04:19 +0000
 Date: Fri, 14 Jan 2022 01:04:19 +0000
-Subject: [PATCH 03/21] skia: add riscv64
+Subject: [PATCH 04/22] skia: add riscv64
 
 
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 ---
 ---

+ 4 - 4
0004-base-allocator-partition_allocator-add-riscv64-suppo.patch → 0005-base-allocator-partition_allocator-add-riscv64-suppo.patch

@@ -1,7 +1,7 @@
-From 72b3d5298c9870db7d3cb810f505e29832be5538 Mon Sep 17 00:00:00 2001
+From 3a0f884a18211957feb88fd6ee650c75051e3c8e Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Tue, 5 Apr 2022 02:22:48 +0000
 Date: Tue, 5 Apr 2022 02:22:48 +0000
-Subject: [PATCH 04/21] base: allocator: partition_allocator: add riscv64
+Subject: [PATCH 05/22] base: allocator: partition_allocator: add riscv64
  support
  support
 
 
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
@@ -12,10 +12,10 @@ Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  create mode 100644 base/allocator/partition_allocator/starscan/stack/asm/riscv64/push_registers_asm.cc
  create mode 100644 base/allocator/partition_allocator/starscan/stack/asm/riscv64/push_registers_asm.cc
 
 
 diff --git a/base/allocator/partition_allocator/BUILD.gn b/base/allocator/partition_allocator/BUILD.gn
 diff --git a/base/allocator/partition_allocator/BUILD.gn b/base/allocator/partition_allocator/BUILD.gn
-index ad6bcf15d92ff..01fdfe86b5fd8 100644
+index d8272085d9676..262a57bcbc209 100644
 --- a/base/allocator/partition_allocator/BUILD.gn
 --- a/base/allocator/partition_allocator/BUILD.gn
 +++ b/base/allocator/partition_allocator/BUILD.gn
 +++ b/base/allocator/partition_allocator/BUILD.gn
-@@ -210,6 +210,9 @@ target(partition_alloc_target_type, "partition_alloc") {
+@@ -225,6 +225,9 @@ target(partition_alloc_target_type, "partition_alloc") {
    } else if (current_cpu == "arm64") {
    } else if (current_cpu == "arm64") {
      defines += [ "PA_PCSCAN_STACK_SUPPORTED" ]
      defines += [ "PA_PCSCAN_STACK_SUPPORTED" ]
      sources += [ "starscan/stack/asm/arm64/push_registers_asm.cc" ]
      sources += [ "starscan/stack/asm/arm64/push_registers_asm.cc" ]

+ 2 - 2
0005-base-process-add-riscv64-arch-definition.patch → 0006-base-process-add-riscv64-arch-definition.patch

@@ -1,7 +1,7 @@
-From a9f09015a24928b99eb5b574849a53b277781a71 Mon Sep 17 00:00:00 2001
+From 87a9190952f0cd3b47d55c37e6125a95028aa4a1 Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Tue, 10 May 2022 02:21:16 +0000
 Date: Tue, 10 May 2022 02:21:16 +0000
-Subject: [PATCH 05/21] base: process: add riscv64 arch definition
+Subject: [PATCH 06/22] base: process: add riscv64 arch definition
 
 
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 ---
 ---

+ 2 - 2
0006-remoting-fix-missing-cstring-header.patch → 0007-remoting-fix-missing-cstring-header.patch

@@ -1,7 +1,7 @@
-From c021c89db7f17ee6f2592c61dec202603b88e639 Mon Sep 17 00:00:00 2001
+From 583d891f4642244c5249065bdde985aa9940d4f0 Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Thu, 13 Jan 2022 09:44:47 +0000
 Date: Thu, 13 Jan 2022 09:44:47 +0000
-Subject: [PATCH 06/21] remoting: fix missing cstring header
+Subject: [PATCH 07/22] remoting: fix missing cstring header
 
 
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 ---
 ---

+ 2 - 2
0007-remoting-codec-fix-missing-cmath-header.patch → 0008-remoting-codec-fix-missing-cmath-header.patch

@@ -1,7 +1,7 @@
-From aa99003ebb1dee8591410e35a1c8a898257c5262 Mon Sep 17 00:00:00 2001
+From 5a9eff06278e30dd09775f4cbed32c2c693bd9c5 Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Thu, 13 Jan 2022 09:48:12 +0000
 Date: Thu, 13 Jan 2022 09:48:12 +0000
-Subject: [PATCH 07/21] remoting: codec: fix missing cmath header
+Subject: [PATCH 08/22] remoting: codec: fix missing cmath header
 
 
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 ---
 ---

+ 2 - 2
0008-components-update_client-add-riscv64-arch-definition.patch → 0009-components-update_client-add-riscv64-arch-definition.patch

@@ -1,7 +1,7 @@
-From a2dbd291e3b85c394ce0644141a9e933ce25b85f Mon Sep 17 00:00:00 2001
+From b919c1f1a31b647ef3f5f124c22f5ee0b5950f08 Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Tue, 5 Apr 2022 02:27:27 +0000
 Date: Tue, 5 Apr 2022 02:27:27 +0000
-Subject: [PATCH 08/21] components: update_client: add riscv64 arch definition
+Subject: [PATCH 09/22] components: update_client: add riscv64 arch definition
 
 
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 ---
 ---

+ 2 - 2
0009-build-config-compiler-use_gold-linker-option.patch → 0010-build-config-compiler-use_gold-linker-option.patch

@@ -1,7 +1,7 @@
-From d19d7a13084f0d288bd7d04fafc5f052fe169cd5 Mon Sep 17 00:00:00 2001
+From 75e05df5b897b869e57063d14d1035ad5b258f78 Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Mon, 17 Jan 2022 04:48:24 +0000
 Date: Mon, 17 Jan 2022 04:48:24 +0000
-Subject: [PATCH 09/21] build: config: compiler: use_gold linker option
+Subject: [PATCH 10/22] build: config: compiler: use_gold linker option
 
 
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 ---
 ---

+ 3 - 3
0010-build-config-compiler-remove-flags-not-available-in-.patch → 0011-build-config-compiler-remove-flags-not-available-in-.patch

@@ -1,7 +1,7 @@
-From bef55e5fd42ed32c931f4ed52a628987cd1f229a Mon Sep 17 00:00:00 2001
+From 1cce24d3de450d4ea65b66886f64b3a769d119d3 Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Mon, 17 Jan 2022 08:15:52 +0000
 Date: Mon, 17 Jan 2022 08:15:52 +0000
-Subject: [PATCH 10/21] build: config: compiler: remove flags not available in
+Subject: [PATCH 11/22] build: config: compiler: remove flags not available in
  custom clang
  custom clang
 
 
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
@@ -10,7 +10,7 @@ Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  1 file changed, 13 deletions(-)
  1 file changed, 13 deletions(-)
 
 
 diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
 diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
-index f378b9560d153..38551f17df889 100644
+index c90821ecde179..79710a677bcfe 100644
 --- a/build/config/compiler/BUILD.gn
 --- a/build/config/compiler/BUILD.gn
 +++ b/build/config/compiler/BUILD.gn
 +++ b/build/config/compiler/BUILD.gn
 @@ -345,7 +345,6 @@ config("compiler") {
 @@ -345,7 +345,6 @@ config("compiler") {

+ 2 - 2
0011-build-config-add-atomic-build-flag.patch → 0012-build-config-add-atomic-build-flag.patch

@@ -1,7 +1,7 @@
-From 68aa5df556e93bbc539b2e7c4d8c1176f1a5c19a Mon Sep 17 00:00:00 2001
+From d20f32720eac124195f162317c8187ce0670f21d Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Wed, 30 Mar 2022 05:43:35 +0000
 Date: Wed, 30 Mar 2022 05:43:35 +0000
-Subject: [PATCH 11/21] build: config: add atomic build flag
+Subject: [PATCH 12/22] build: config: add atomic build flag
 
 
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 ---
 ---

+ 3 - 3
0012-build-config-compiler-set-generic-riscv64-flags.patch → 0013-build-config-compiler-set-generic-riscv64-flags.patch

@@ -1,7 +1,7 @@
-From 2afaf4d2e481f86a241df78807f09f8e27f2766a Mon Sep 17 00:00:00 2001
+From 34419d06a338f38be840773b44c049e694146962 Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Fri, 14 Jan 2022 05:06:56 +0000
 Date: Fri, 14 Jan 2022 05:06:56 +0000
-Subject: [PATCH 12/21] build: config: compiler: set generic riscv64 flags
+Subject: [PATCH 13/22] build: config: compiler: set generic riscv64 flags
 
 
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 ---
 ---
@@ -9,7 +9,7 @@ Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  1 file changed, 6 insertions(+)
  1 file changed, 6 insertions(+)
 
 
 diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
 diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
-index 38551f17df889..99136e2834b9a 100644
+index 79710a677bcfe..429943e426ef3 100644
 --- a/build/config/compiler/BUILD.gn
 --- a/build/config/compiler/BUILD.gn
 +++ b/build/config/compiler/BUILD.gn
 +++ b/build/config/compiler/BUILD.gn
 @@ -1152,6 +1152,12 @@ config("compiler_cpu_abi") {
 @@ -1152,6 +1152,12 @@ config("compiler_cpu_abi") {

+ 2 - 2
0013-chrome-common-remove-unrar-code.patch → 0014-chrome-common-remove-unrar-code.patch

@@ -1,7 +1,7 @@
-From b786a6b854fb87510fd1ae2801a65f67cbb32d33 Mon Sep 17 00:00:00 2001
+From 796fe4577f25873b97485b430b1fd17d72d4fcea Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Thu, 13 Jan 2022 08:57:34 +0000
 Date: Thu, 13 Jan 2022 08:57:34 +0000
-Subject: [PATCH 13/21] chrome: common: remove unrar code
+Subject: [PATCH 14/22] chrome: common: remove unrar code
 
 
 Upstream-status: Inappropriate
 Upstream-status: Inappropriate
 
 

+ 2 - 2
0014-third_party-libaom-add-riscv-target.patch → 0015-third_party-libaom-add-riscv-target.patch

@@ -1,7 +1,7 @@
-From 6301169f7bccf3af53f9f4e18f26df9ce0963363 Mon Sep 17 00:00:00 2001
+From 7c1c6ca12315892184dcdc154e0f1254dbf7b062 Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Wed, 30 Mar 2022 11:24:25 +0000
 Date: Wed, 30 Mar 2022 11:24:25 +0000
-Subject: [PATCH 14/21] third_party: libaom: add riscv target
+Subject: [PATCH 15/22] third_party: libaom: add riscv target
 
 
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 ---
 ---

+ 3 - 3
0015-third_party-libvpx-add-riscv-target.patch → 0016-third_party-libvpx-add-riscv-target.patch

@@ -1,7 +1,7 @@
-From 9fac6d4bec43354233107d215d2a10da575e81d3 Mon Sep 17 00:00:00 2001
+From 81299de9e6388b34a00e8731dab6b5081a3b2214 Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Wed, 30 Mar 2022 11:26:18 +0000
 Date: Wed, 30 Mar 2022 11:26:18 +0000
-Subject: [PATCH 15/21] third_party: libvpx: add riscv target
+Subject: [PATCH 16/22] third_party: libvpx: add riscv target
 
 
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 ---
 ---
@@ -9,7 +9,7 @@ Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  1 file changed, 3 insertions(+), 1 deletion(-)
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 
 diff --git a/third_party/libvpx/BUILD.gn b/third_party/libvpx/BUILD.gn
 diff --git a/third_party/libvpx/BUILD.gn b/third_party/libvpx/BUILD.gn
-index 758aca1540734..e7f9895ea48a1 100644
+index a972e1f18b700..0af79ee63344a 100644
 --- a/third_party/libvpx/BUILD.gn
 --- a/third_party/libvpx/BUILD.gn
 +++ b/third_party/libvpx/BUILD.gn
 +++ b/third_party/libvpx/BUILD.gn
 @@ -35,6 +35,8 @@ if (current_cpu == "x86") {
 @@ -35,6 +35,8 @@ if (current_cpu == "x86") {

+ 17 - 17
0016-third_party-crashpad-add-support-for-riscv.patch → 0017-third_party-crashpad-add-support-for-riscv.patch

@@ -1,7 +1,7 @@
-From 1ebe516ac0b1ae7b8421f33adb40d11bdbbf4d94 Mon Sep 17 00:00:00 2001
+From 62457fa5271a6b22210ec0adefe6fee944f785f7 Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Thu, 31 Mar 2022 00:35:10 +0000
 Date: Thu, 31 Mar 2022 00:35:10 +0000
-Subject: [PATCH 16/21] third_party: crashpad: add support for riscv
+Subject: [PATCH 17/22] third_party: crashpad: add support for riscv
 
 
 Credit to work contributed in Github.
 Credit to work contributed in Github.
 https://github.com/felixonmars/archriscv-packages/tree/master/chromium
 https://github.com/felixonmars/archriscv-packages/tree/master/chromium
@@ -31,10 +31,10 @@ Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  20 files changed, 475 insertions(+), 2 deletions(-)
  20 files changed, 475 insertions(+), 2 deletions(-)
 
 
 diff --git a/third_party/crashpad/crashpad/minidump/minidump_context.h b/third_party/crashpad/crashpad/minidump/minidump_context.h
 diff --git a/third_party/crashpad/crashpad/minidump/minidump_context.h b/third_party/crashpad/crashpad/minidump/minidump_context.h
-index 3a3e603cb0d2d..cf074d2b8236b 100644
+index c10743d84899d..616b43654d11f 100644
 --- a/third_party/crashpad/crashpad/minidump/minidump_context.h
 --- a/third_party/crashpad/crashpad/minidump/minidump_context.h
 +++ b/third_party/crashpad/crashpad/minidump/minidump_context.h
 +++ b/third_party/crashpad/crashpad/minidump/minidump_context.h
-@@ -592,6 +592,41 @@ struct MinidumpContextMIPS64 {
+@@ -637,6 +637,41 @@ struct MinidumpContextMIPS64 {
    uint64_t fir;
    uint64_t fir;
  };
  };
  
  
@@ -77,7 +77,7 @@ index 3a3e603cb0d2d..cf074d2b8236b 100644
  
  
  #endif  // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_H_
  #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
 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
+index 6ae25b8fe12f8..cfd86fa9f4d58 100644
 --- a/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
 --- a/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
 +++ b/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) {
 @@ -102,6 +102,13 @@ MinidumpContextWriter::CreateFromSnapshot(const CPUContext* context_snapshot) {
@@ -94,7 +94,7 @@ index 2f2d90ba47071..ad26739432f51 100644
      default: {
      default: {
        LOG(ERROR) << "unknown context architecture "
        LOG(ERROR) << "unknown context architecture "
                   << context_snapshot->architecture;
                   << context_snapshot->architecture;
-@@ -454,4 +461,41 @@ size_t MinidumpContextMIPS64Writer::ContextSize() const {
+@@ -557,4 +564,41 @@ size_t MinidumpContextMIPS64Writer::ContextSize() const {
    return sizeof(context_);
    return sizeof(context_);
  }
  }
  
  
@@ -137,10 +137,10 @@ index 2f2d90ba47071..ad26739432f51 100644
 +
 +
  }  // namespace crashpad
  }  // namespace crashpad
 diff --git a/third_party/crashpad/crashpad/minidump/minidump_context_writer.h b/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
 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
+index 9acc7fa012f84..da48628f5ae0d 100644
 --- a/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
 --- a/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
 +++ b/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 {
+@@ -369,6 +369,47 @@ class MinidumpContextMIPS64Writer final : public MinidumpContextWriter {
    MinidumpContextMIPS64 context_;
    MinidumpContextMIPS64 context_;
  };
  };
  
  
@@ -189,10 +189,10 @@ index 80b312b23c2a4..278830085c162 100644
  
  
  #endif  // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_WRITER_H_
  #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
 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
+index 51c91c4c90e6f..4945b3976e5e3 100644
 --- a/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
 --- a/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
 +++ b/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() {
+@@ -175,6 +175,10 @@ std::string MinidumpMiscInfoDebugBuildString() {
    static constexpr char kCPU[] = "mips";
    static constexpr char kCPU[] = "mips";
  #elif defined(ARCH_CPU_MIPS64EL)
  #elif defined(ARCH_CPU_MIPS64EL)
    static constexpr char kCPU[] = "mips64";
    static constexpr char kCPU[] = "mips64";
@@ -204,10 +204,10 @@ index 78847c11970e5..b2a1486dfbbf0 100644
  #error define kCPU for this CPU
  #error define kCPU for this CPU
  #endif
  #endif
 diff --git a/third_party/crashpad/crashpad/snapshot/capture_memory.cc b/third_party/crashpad/crashpad/snapshot/capture_memory.cc
 diff --git a/third_party/crashpad/crashpad/snapshot/capture_memory.cc b/third_party/crashpad/crashpad/snapshot/capture_memory.cc
-index 06d92581330bf..a8b52d11b9b53 100644
+index cb8231bdb97ca..08de6392466f7 100644
 --- a/third_party/crashpad/crashpad/snapshot/capture_memory.cc
 --- a/third_party/crashpad/crashpad/snapshot/capture_memory.cc
 +++ b/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,
+@@ -117,6 +117,16 @@ void CaptureMemory::PointedToByContext(const CPUContext& context,
    for (size_t i = 0; i < std::size(context.mipsel->regs); ++i) {
    for (size_t i = 0; i < std::size(context.mipsel->regs); ++i) {
      MaybeCaptureMemoryAround(delegate, context.mipsel->regs[i]);
      MaybeCaptureMemoryAround(delegate, context.mipsel->regs[i]);
    }
    }
@@ -244,10 +244,10 @@ index 811a7209587d2..5b09abdb96761 100644
  
  
  }  // namespace crashpad
  }  // namespace crashpad
 diff --git a/third_party/crashpad/crashpad/snapshot/cpu_context.cc b/third_party/crashpad/crashpad/snapshot/cpu_context.cc
 diff --git a/third_party/crashpad/crashpad/snapshot/cpu_context.cc b/third_party/crashpad/crashpad/snapshot/cpu_context.cc
-index 2e29f70398c9f..e2f8097e2cae1 100644
+index 9b7b3f14f1164..b717e5ea007f9 100644
 --- a/third_party/crashpad/crashpad/snapshot/cpu_context.cc
 --- a/third_party/crashpad/crashpad/snapshot/cpu_context.cc
 +++ b/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 {
+@@ -226,10 +226,12 @@ bool CPUContext::Is64Bit() const {
      case kCPUArchitectureX86_64:
      case kCPUArchitectureX86_64:
      case kCPUArchitectureARM64:
      case kCPUArchitectureARM64:
      case kCPUArchitectureMIPS64EL:
      case kCPUArchitectureMIPS64EL:
@@ -261,10 +261,10 @@ index 2e29f70398c9f..e2f8097e2cae1 100644
      default:
      default:
        NOTREACHED();
        NOTREACHED();
 diff --git a/third_party/crashpad/crashpad/snapshot/cpu_context.h b/third_party/crashpad/crashpad/snapshot/cpu_context.h
 diff --git a/third_party/crashpad/crashpad/snapshot/cpu_context.h b/third_party/crashpad/crashpad/snapshot/cpu_context.h
-index fb23c4679f0af..e120a980448d6 100644
+index 4e21b56c590da..42b405f863428 100644
 --- a/third_party/crashpad/crashpad/snapshot/cpu_context.h
 --- a/third_party/crashpad/crashpad/snapshot/cpu_context.h
 +++ b/third_party/crashpad/crashpad/snapshot/cpu_context.h
 +++ b/third_party/crashpad/crashpad/snapshot/cpu_context.h
-@@ -352,6 +352,20 @@ struct CPUContextMIPS64 {
+@@ -362,6 +362,20 @@ struct CPUContextMIPS64 {
    uint64_t fir;
    uint64_t fir;
  };
  };
  
  
@@ -285,7 +285,7 @@ index fb23c4679f0af..e120a980448d6 100644
  //! \brief A context structure capable of carrying the context of any supported
  //! \brief A context structure capable of carrying the context of any supported
  //!     CPU architecture.
  //!     CPU architecture.
  struct CPUContext {
  struct CPUContext {
-@@ -382,6 +396,8 @@ struct CPUContext {
+@@ -402,6 +416,8 @@ struct CPUContext {
      CPUContextARM64* arm64;
      CPUContextARM64* arm64;
      CPUContextMIPS* mipsel;
      CPUContextMIPS* mipsel;
      CPUContextMIPS64* mips64;
      CPUContextMIPS64* mips64;

+ 2 - 2
0017-third_party-lzma_sdk-add-riscv-arch-definition.patch → 0018-third_party-lzma_sdk-add-riscv-arch-definition.patch

@@ -1,7 +1,7 @@
-From 482529f5f69e3944e1b4419af54cc36bf2ab4177 Mon Sep 17 00:00:00 2001
+From bdd1bde72c2c366d2e2a3effc6ddabb2db714f28 Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Fri, 14 Jan 2022 05:07:31 +0000
 Date: Fri, 14 Jan 2022 05:07:31 +0000
-Subject: [PATCH 17/21] third_party: lzma_sdk: add riscv arch definition
+Subject: [PATCH 18/22] third_party: lzma_sdk: add riscv arch definition
 
 
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 ---
 ---

+ 2 - 2
0018-build-linux-sysroot-create-a-sysroot-for-riscv.patch → 0019-build-linux-sysroot-create-a-sysroot-for-riscv.patch

@@ -1,7 +1,7 @@
-From 2da7566427e37c028ba81e926a82da578ca1d909 Mon Sep 17 00:00:00 2001
+From 5254439289bd00f5fb9269f3abfa3625c4c80040 Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Tue, 5 Apr 2022 06:40:16 +0000
 Date: Tue, 5 Apr 2022 06:40:16 +0000
-Subject: [PATCH 18/21] build: linux: sysroot: create a sysroot for riscv
+Subject: [PATCH 19/22] build: linux: sysroot: create a sysroot for riscv
 
 
 Upstream-status: Unidentified
 Upstream-status: Unidentified
 
 

+ 2 - 2
0019-workaround-for-files-not-found-in-sysroot.patch → 0020-workaround-for-files-not-found-in-sysroot.patch

@@ -1,7 +1,7 @@
-From 16b2129ed1f65609ed0f2da62334ced8b0018451 Mon Sep 17 00:00:00 2001
+From 69881d81443cd78aa9aca83ffc15298325ab9bdc Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Thu, 28 Apr 2022 01:03:56 +0000
 Date: Thu, 28 Apr 2022 01:03:56 +0000
-Subject: [PATCH 19/21] workaround for files not found in sysroot
+Subject: [PATCH 20/22] workaround for files not found in sysroot
 
 
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 ---
 ---

+ 2 - 2
0020-v8-settings.patch → 0021-v8-settings.patch

@@ -1,7 +1,7 @@
-From fc741789fc4c36b3dbdae92f163b918950936e7e Mon Sep 17 00:00:00 2001
+From 6ca882e4e194fdddac7c66bc2dee2907093a3796 Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Thu, 28 Apr 2022 01:04:27 +0000
 Date: Thu, 28 Apr 2022 01:04:27 +0000
-Subject: [PATCH 20/21] v8 settings
+Subject: [PATCH 21/22] v8 settings
 
 
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 ---
 ---

+ 3 - 3
0021-compiler-workaround.patch → 0022-compiler-workaround.patch

@@ -1,7 +1,7 @@
-From 6a7bfbd6d1ce4281915fbf9e762cc3f4eae52ded Mon Sep 17 00:00:00 2001
+From 00827741648ebd7d5f98e5f9fd718ad2f7435785 Mon Sep 17 00:00:00 2001
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Date: Thu, 28 Apr 2022 01:04:59 +0000
 Date: Thu, 28 Apr 2022 01:04:59 +0000
-Subject: [PATCH 21/21] compiler workaround
+Subject: [PATCH 22/22] compiler workaround
 
 
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
 ---
 ---
@@ -9,7 +9,7 @@ Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  1 file changed, 3 insertions(+), 1 deletion(-)
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 
 diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
 diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
-index 99136e2834b9a..5ef8f566db3dd 100644
+index 429943e426ef3..0ccc0035434f3 100644
 --- a/build/config/compiler/BUILD.gn
 --- a/build/config/compiler/BUILD.gn
 +++ b/build/config/compiler/BUILD.gn
 +++ b/build/config/compiler/BUILD.gn
 @@ -1154,6 +1154,7 @@ config("compiler_cpu_abi") {
 @@ -1154,6 +1154,7 @@ config("compiler_cpu_abi") {

+ 1 - 50
README.md

@@ -5,51 +5,6 @@
 Ubuntu 20.04.4 LTS
 Ubuntu 20.04.4 LTS
 
 
 
 
-## Setup cross-compile toolchain
-
-### LLVM / Clang
-
-1. Build a cross-compile toolchain for llvm and clang.
-```
-$ sudo apt-get -y install binutils build-essential libtool \
-  texinfo gzip zip unzip patchutils curl git make cmake \
-  ninja-build automake bison flex gperf grep sed gawk \
-  python bc zlib1g-dev libexpat1-dev libmpc-dev \
-  libglib2.0-dev libfdt-dev libpixman-1-dev 
-
-$ mkdir ~/riscv
-$ cd ~/riscv
-$ mkdir _install
-$ export PATH=`pwd`/_install/bin:$PATH
-$ hash -r
-
-# gcc, binutils, newlib, qemu
-$ git clone --recursive https://github.com/riscv/riscv-gnu-toolchain
-$ pushd riscv-gnu-toolchain
-$ ./configure --prefix=`pwd`/../_install --enable-multilib
-$ make -j`nproc` linux
-$ make -j`nproc` build-qemu
-$ popd
-
-# llvm
-$ git clone https://github.com/llvm/llvm-project.git riscv-llvm
-$ pushd riscv-llvm
-$ ln -s ../../clang llvm/tools || true
-$ mkdir _build
-$ cd _build
-$ cmake -G Ninja -DCMAKE_BUILD_TYPE="Release" \
-  -DBUILD_SHARED_LIBS=True -DLLVM_USE_SPLIT_DWARF=True \
-  -DCMAKE_INSTALL_PREFIX="../../_install" \
-  -DLLVM_OPTIMIZED_TABLEGEN=True -DLLVM_BUILD_TESTS=False \
-  -DDEFAULT_SYSROOT="../../_install/riscv64-unknown-linux-gnu" \
-  -DLLVM_DEFAULT_TARGET_TRIPLE="riscv64-unknown-linux-gnu" \
-  -DLLVM_TARGETS_TO_BUILD="RISCV" \
-  ../llvm
-$ cmake --build . --target install
-$ popd
-```
-
-
 ## Chromium
 ## Chromium
 
 
 1. Follow the Chromium official build instruction for Linux host to get the source code.
 1. Follow the Chromium official build instruction for Linux host to get the source code.
@@ -73,7 +28,7 @@ solutions = [
 4. Checkout to specific commits where the patchset are based on.
 4. Checkout to specific commits where the patchset are based on.
 ```
 ```
 $ cd ~/chromium/src
 $ cd ~/chromium/src
-$ git checkout f0f889644bcd1
+$ git checkout 99ce2ebd79dc6
 
 
 ```
 ```
 
 
@@ -112,10 +67,6 @@ enable_jxl_decoder=false
 
 
 # For clang
 # For clang
 is_clang = true
 is_clang = true
-clang_base_path = getenv("HOME") + "/riscv/_install"
-clang_use_chrome_plugins = false
-use_gold = false
-use_lld = true
 ```
 ```
 
 
 7. Apply the patches from this repository.
 7. Apply the patches from this repository.

BIN
archive/debian_sid_riscv64_sysroot.tar.xz


+ 4 - 4
third_party/0001-third-party-angle.patch

@@ -1,8 +1,8 @@
 diff --git a/BUILD.gn b/BUILD.gn
 diff --git a/BUILD.gn b/BUILD.gn
-index 6e8a001a1..a59fb8116 100644
+index b92e52fc2..8fd77fe35 100644
 --- a/BUILD.gn
 --- a/BUILD.gn
 +++ b/BUILD.gn
 +++ b/BUILD.gn
-@@ -224,7 +224,12 @@ config("extra_warnings") {
+@@ -233,7 +233,12 @@ config("extra_warnings") {
        "-Wstrict-prototypes",
        "-Wstrict-prototypes",
        "-Wunreachable-code-aggressive",
        "-Wunreachable-code-aggressive",
        "-Wshorten-64-to-32",
        "-Wshorten-64-to-32",
@@ -16,10 +16,10 @@ index 6e8a001a1..a59fb8116 100644
  
  
    if (is_gcc) {
    if (is_gcc) {
 diff --git a/gni/angle.gni b/gni/angle.gni
 diff --git a/gni/angle.gni b/gni/angle.gni
-index ac0273979..5d1f52eff 100644
+index 20cef2679..1b23c9f6d 100644
 --- a/gni/angle.gni
 --- a/gni/angle.gni
 +++ b/gni/angle.gni
 +++ b/gni/angle.gni
-@@ -74,7 +74,8 @@ declare_args() {
+@@ -76,7 +76,8 @@ declare_args() {
  
  
    if (current_cpu == "arm64" || current_cpu == "x64" ||
    if (current_cpu == "arm64" || current_cpu == "x64" ||
        current_cpu == "mips64el" || current_cpu == "s390x" ||
        current_cpu == "mips64el" || current_cpu == "s390x" ||

+ 2 - 2
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
 diff --git a/src/dawn/common/Platform.h b/src/dawn/common/Platform.h
-index 5e4f9d7ff..089824d52 100644
+index 8e81b489b..a20bcbc17 100644
 --- a/src/dawn/common/Platform.h
 --- a/src/dawn/common/Platform.h
 +++ b/src/dawn/common/Platform.h
 +++ b/src/dawn/common/Platform.h
 @@ -68,7 +68,7 @@
 @@ -68,7 +68,7 @@
@@ -8,6 +8,6 @@ index 5e4f9d7ff..089824d52 100644
  #if defined(_WIN64) || defined(__aarch64__) || defined(__x86_64__) || defined(__mips64__) || \
  #if defined(_WIN64) || defined(__aarch64__) || defined(__x86_64__) || defined(__mips64__) || \
 -    defined(__s390x__) || defined(__PPC64__)
 -    defined(__s390x__) || defined(__PPC64__)
 +    defined(__s390x__) || defined(__PPC64__) || (defined(__riscv) && __riscv_xlen == 64)
 +    defined(__s390x__) || defined(__PPC64__) || (defined(__riscv) && __riscv_xlen == 64)
- #    define DAWN_PLATFORM_64_BIT 1
+ #define DAWN_PLATFORM_64_BIT 1
  static_assert(sizeof(sizeof(char)) == 8, "Expect sizeof(size_t) == 8");
  static_assert(sizeof(sizeof(char)) == 8, "Expect sizeof(size_t) == 8");
  #elif defined(_WIN32) || defined(__arm__) || defined(__i386__) || defined(__mips32__) || \
  #elif defined(_WIN32) || defined(__arm__) || defined(__i386__) || defined(__mips32__) || \