Skip to content

Commit

Permalink
updpatch: chromium 129.0.6668.58-1
Browse files Browse the repository at this point in the history
Note: the patch is tested against 129.0.6668.42-1

- Drop v8 version bump and patch.
- Add new fixes. See also https://www.kxxt.dev/blog/cross-compile-chromium-for-riscv/
- Enable `is_clang` to workaround GNU ld cannot link `flatc`, Relocation
  truncated to fit.
  - This change necessitates the stacked patch
    compiler-rt-riscv.patch, which is applied after Arch's compiler-rt
    patch.
- Regenerate ffmpeg patch.
  • Loading branch information
kxxt committed Sep 20, 2024
1 parent 63849a0 commit f0214f8
Show file tree
Hide file tree
Showing 4 changed files with 441 additions and 9,154 deletions.
31 changes: 31 additions & 0 deletions chromium/cargo_crate-riscv-pointer-width.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From c50dab84e0c911f7b89532700fca27d42a77b3c1 Mon Sep 17 00:00:00 2001
From: kxxt <rsworktech@outlook.com>
Date: Fri, 13 Sep 2024 12:48:44 +0000
Subject: [PATCH] cargo_crate.gni: add riscv64 and loong64 cases

This CL syncs the condition of 64 bit pointer with
https://github.com/chromium/chromium/blob/31f058a669fd063cab3439df5c877ed3005d9832/base/allocator/partition_allocator/partition_alloc.gni#L21-L24

Bug: none
Change-Id: Id2f1cfaa0c5167fb61c74505aba03716337b071f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5850670
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Arthur Eubanks <aeubanks@google.com>
Cr-Commit-Position: refs/heads/main@{#1355138}
---

diff --git a/build/rust/cargo_crate.gni b/build/rust/cargo_crate.gni
index e5d1b2f8..7290451 100644
--- a/build/rust/cargo_crate.gni
+++ b/build/rust/cargo_crate.gni
@@ -429,7 +429,8 @@
rust_abi_target,
]
}
- if (current_cpu == "arm64" || current_cpu == "x64") {
+ if (current_cpu == "arm64" || current_cpu == "x64" ||
+ current_cpu == "loong64" || current_cpu == "riscv64") {
args += [
"--pointer-width",
"64",
12 changes: 12 additions & 0 deletions chromium/compiler-rt-riscv.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- build/config/clang/BUILD.gn.orig 2024-09-17 09:40:39.225707556 +0200
+++ build/config/clang/BUILD.gn 2024-09-17 09:42:35.703531635 +0200
@@ -201,6 +201,9 @@
} else if (current_cpu == "arm64") {
_dir = "aarch64-unknown-linux-gnu"
_suffix = "-aarch64"
+ } else if (current_cpu == "riscv64") {
+ _dir = "riscv64-unknown-linux-gnu"
+ _suffix = "-riscv64"
} else {
assert(false) # Unhandled cpu type
}
Loading

0 comments on commit f0214f8

Please sign in to comment.