diff --git a/chromium/riscv-base.patch b/chromium/riscv-base.patch index 7aca00e56..c58a74833 100644 --- a/chromium/riscv-base.patch +++ b/chromium/riscv-base.patch @@ -1,13 +1,11 @@ -Index: chromium-112.0.5615.49/base/allocator/partition_allocator/partition_alloc.gni -=================================================================== ---- chromium-112.0.5615.49.orig/base/allocator/partition_allocator/partition_alloc.gni -+++ chromium-112.0.5615.49/base/allocator/partition_allocator/partition_alloc.gni -@@ -14,7 +14,7 @@ if (is_apple) { - if (is_nacl) { +--- a/base/allocator/partition_allocator/partition_alloc.gni ++++ b/base/allocator/partition_allocator/partition_alloc.gni +@@ -15,7 +15,7 @@ # NaCl targets don't use 64-bit pointers. has_64_bit_pointers = false --} else if (current_cpu == "x64" || current_cpu == "arm64") { -+} else if (current_cpu == "x64" || current_cpu == "arm64" || current_cpu == "riscv64") { + } else if (current_cpu == "x64" || current_cpu == "arm64" || +- current_cpu == "loong64") { ++ current_cpu == "loong64" || current_cpu == "riscv64") { has_64_bit_pointers = true } else if (current_cpu == "x86" || current_cpu == "arm") { has_64_bit_pointers = false diff --git a/chromium/riscv-dav1d.patch b/chromium/riscv-dav1d.patch index d5c8058b4..e20413d93 100644 --- a/chromium/riscv-dav1d.patch +++ b/chromium/riscv-dav1d.patch @@ -1,8 +1,8 @@ -Index: chromium-102.0.5005.61/third_party/dav1d/config/linux/riscv64/config.h +Index: chromium-113.0.5672.92/third_party/dav1d/config/linux/riscv64/config.h =================================================================== --- /dev/null -+++ chromium-102.0.5005.61/third_party/dav1d/config/linux/riscv64/config.h -@@ -0,0 +1,38 @@ ++++ chromium-113.0.5672.92/third_party/dav1d/config/linux/riscv64/config.h +@@ -0,0 +1,48 @@ +/* + * Autogenerated by the Meson build system. + * Do not edit, your changes will be lost. @@ -34,10 +34,20 @@ Index: chromium-102.0.5005.61/third_party/dav1d/config/linux/riscv64/config.h + +#define HAVE_AS_FUNC 0 + ++#define HAVE_C11_GENERIC 1 ++ +#define HAVE_CLOCK_GETTIME 1 + ++#define HAVE_DLSYM 1 ++ +#define HAVE_GETAUXVAL 1 + +#define HAVE_POSIX_MEMALIGN 1 + ++// #define HAVE_PTHREAD_GETAFFINITY_NP 1 -- Controlled by Chomium ++ ++// #define HAVE_PTHREAD_SETAFFINITY_NP 1 -- Controlled by Chomium ++ +#define HAVE_UNISTD_H 1 ++ ++#define TRIM_DSP_FUNCTIONS 1 diff --git a/chromium/riscv-libgav1.patch b/chromium/riscv-libgav1.patch new file mode 100644 index 000000000..ab2db614c --- /dev/null +++ b/chromium/riscv-libgav1.patch @@ -0,0 +1,9 @@ +--- a/third_party/libgav1/options.gni ++++ b/third_party/libgav1/options.gni +@@ -9,5 +9,5 @@ + use_libgav1_parser = + (is_chromeos || is_linux || is_win) && + (target_cpu == "x86" || target_cpu == "x64" || target_cpu == "arm" || +- target_cpu == "arm64" || target_cpu == "ppc64") ++ target_cpu == "arm64" || target_cpu == "ppc64" || target_cpu == "riscv64") + } diff --git a/chromium/riscv-libyuv.patch b/chromium/riscv-libyuv.patch new file mode 100644 index 000000000..92c89ae7b --- /dev/null +++ b/chromium/riscv-libyuv.patch @@ -0,0 +1,23 @@ +--- a/third_party/libyuv/BUILD.gn ++++ b/third_party/libyuv/BUILD.gn +@@ -32,6 +32,10 @@ + if (!libyuv_use_neon) { + defines = [ "LIBYUV_DISABLE_NEON" ] + } ++ ++ if (libyuv_disable_rvv) { ++ defines += [ "LIBYUV_DISABLE_RVV" ] ++ } + } + + # This target is built when no specific target is specified on the command line. +--- a/third_party/libyuv/libyuv.gni ++++ b/third_party/libyuv/libyuv.gni +@@ -13,6 +13,7 @@ + declare_args() { + libyuv_include_tests = !build_with_chromium + libyuv_disable_jpeg = false ++ libyuv_disable_rvv = true + libyuv_use_neon = + current_cpu == "arm64" || + (current_cpu == "arm" && (arm_use_neon || arm_optionally_use_neon)) diff --git a/chromium/riscv-sandbox.patch b/chromium/riscv-sandbox.patch index 50214708d..aeb948ec4 100644 --- a/chromium/riscv-sandbox.patch +++ b/chromium/riscv-sandbox.patch @@ -1,7 +1,7 @@ -Index: chromium-111.0.5563.64/sandbox/features.gni +Index: chromium-114.0.5735.133/sandbox/features.gni =================================================================== ---- chromium-111.0.5563.64.orig/sandbox/features.gni -+++ chromium-111.0.5563.64/sandbox/features.gni +--- chromium-114.0.5735.133.orig/sandbox/features.gni ++++ chromium-114.0.5735.133/sandbox/features.gni @@ -9,7 +9,8 @@ use_seccomp_bpf = (is_linux || is_chromeos || is_android) && (current_cpu == "x86" || current_cpu == "x64" || @@ -12,10 +12,10 @@ Index: chromium-111.0.5563.64/sandbox/features.gni # SSBD (Speculative Store Bypass Disable) is a mitigation of Spectre Variant 4. # As Spectre Variant 4 can be mitigated by site isolation, opt-out SSBD on site -Index: chromium-111.0.5563.64/sandbox/linux/bpf_dsl/linux_syscall_ranges.h +Index: chromium-114.0.5735.133/sandbox/linux/bpf_dsl/linux_syscall_ranges.h =================================================================== ---- chromium-111.0.5563.64.orig/sandbox/linux/bpf_dsl/linux_syscall_ranges.h -+++ chromium-111.0.5563.64/sandbox/linux/bpf_dsl/linux_syscall_ranges.h +--- chromium-114.0.5735.133.orig/sandbox/linux/bpf_dsl/linux_syscall_ranges.h ++++ chromium-114.0.5735.133/sandbox/linux/bpf_dsl/linux_syscall_ranges.h @@ -56,6 +56,13 @@ #define MAX_PUBLIC_SYSCALL __NR_syscalls #define MAX_SYSCALL MAX_PUBLIC_SYSCALL @@ -30,10 +30,10 @@ Index: chromium-111.0.5563.64/sandbox/linux/bpf_dsl/linux_syscall_ranges.h #else #error "Unsupported architecture" #endif -Index: chromium-111.0.5563.64/sandbox/linux/bpf_dsl/seccomp_macros.h +Index: chromium-114.0.5735.133/sandbox/linux/bpf_dsl/seccomp_macros.h =================================================================== ---- chromium-111.0.5563.64.orig/sandbox/linux/bpf_dsl/seccomp_macros.h -+++ chromium-111.0.5563.64/sandbox/linux/bpf_dsl/seccomp_macros.h +--- chromium-114.0.5735.133.orig/sandbox/linux/bpf_dsl/seccomp_macros.h ++++ chromium-114.0.5735.133/sandbox/linux/bpf_dsl/seccomp_macros.h @@ -343,6 +343,46 @@ struct regs_struct { #define SECCOMP_PT_PARM4(_regs) (_regs).regs[3] #define SECCOMP_PT_PARM5(_regs) (_regs).regs[4] @@ -81,10 +81,10 @@ Index: chromium-111.0.5563.64/sandbox/linux/bpf_dsl/seccomp_macros.h #else #error Unsupported target platform -Index: chromium-111.0.5563.64/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +Index: chromium-114.0.5735.133/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc =================================================================== ---- chromium-111.0.5563.64.orig/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc -+++ chromium-111.0.5563.64/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +--- chromium-114.0.5735.133.orig/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc ++++ chromium-114.0.5735.133/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc @@ -60,6 +60,9 @@ bool IsBaselinePolicyAllowed(int sysno) #if defined(__mips__) SyscallSets::IsMipsPrivate(sysno) || @@ -131,10 +131,10 @@ Index: chromium-111.0.5563.64/sandbox/linux/seccomp-bpf-helpers/baseline_policy. if (sysno == __NR_pipe) { return Allow(); } -Index: chromium-111.0.5563.64/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc +Index: chromium-114.0.5735.133/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc =================================================================== ---- chromium-111.0.5563.64.orig/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc -+++ chromium-111.0.5563.64/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc +--- chromium-114.0.5735.133.orig/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc ++++ chromium-114.0.5735.133/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc @@ -37,6 +37,7 @@ #if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \ @@ -143,7 +143,7 @@ Index: chromium-111.0.5563.64/sandbox/linux/seccomp-bpf-helpers/syscall_paramete !defined(PTRACE_GET_THREAD_AREA) // Also include asm/ptrace-abi.h since ptrace.h in older libc (for instance // the one in Ubuntu 16.04 LTS) is missing PTRACE_GET_THREAD_AREA. -@@ -441,7 +442,7 @@ ResultExpr RestrictPtrace() { +@@ -446,7 +447,7 @@ ResultExpr RestrictPtrace() { #endif return Switch(request) .Cases({ @@ -152,10 +152,10 @@ Index: chromium-111.0.5563.64/sandbox/linux/seccomp-bpf-helpers/syscall_paramete PTRACE_GETREGS, PTRACE_GETFPREGS, PTRACE_GET_THREAD_AREA, PTRACE_GETREGSET, #endif -Index: chromium-111.0.5563.64/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +Index: chromium-114.0.5735.133/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc =================================================================== ---- chromium-111.0.5563.64.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -+++ chromium-111.0.5563.64/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +--- chromium-114.0.5735.133.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ++++ chromium-114.0.5735.133/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc @@ -103,7 +103,7 @@ bool SyscallSets::IsUmask(int sysno) { // Both EPERM and ENOENT are valid errno unless otherwise noted in comment. bool SyscallSets::IsFileSystem(int sysno) { @@ -418,10 +418,10 @@ Index: chromium-111.0.5563.64/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc bool SyscallSets::IsGoogle3Threading(int sysno) { switch (sysno) { case __NR_getitimer: -Index: chromium-111.0.5563.64/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h +Index: chromium-114.0.5735.133/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h =================================================================== ---- chromium-111.0.5563.64.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h -+++ chromium-111.0.5563.64/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h +--- chromium-114.0.5735.133.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h ++++ chromium-114.0.5735.133/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h @@ -52,7 +52,7 @@ class SANDBOX_EXPORT SyscallSets { #endif @@ -466,10 +466,10 @@ Index: chromium-111.0.5563.64/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h static bool IsGoogle3Threading(int sysno); }; -Index: chromium-111.0.5563.64/sandbox/linux/seccomp-bpf/syscall.cc +Index: chromium-114.0.5735.133/sandbox/linux/seccomp-bpf/syscall.cc =================================================================== ---- chromium-111.0.5563.64.orig/sandbox/linux/seccomp-bpf/syscall.cc -+++ chromium-111.0.5563.64/sandbox/linux/seccomp-bpf/syscall.cc +--- chromium-114.0.5735.133.orig/sandbox/linux/seccomp-bpf/syscall.cc ++++ chromium-114.0.5735.133/sandbox/linux/seccomp-bpf/syscall.cc @@ -18,7 +18,7 @@ namespace sandbox { namespace { @@ -527,10 +527,10 @@ Index: chromium-111.0.5563.64/sandbox/linux/seccomp-bpf/syscall.cc #else #error "Unimplemented architecture" #endif -Index: chromium-111.0.5563.64/sandbox/linux/services/credentials.cc +Index: chromium-114.0.5735.133/sandbox/linux/services/credentials.cc =================================================================== ---- chromium-111.0.5563.64.orig/sandbox/linux/services/credentials.cc -+++ chromium-111.0.5563.64/sandbox/linux/services/credentials.cc +--- chromium-114.0.5735.133.orig/sandbox/linux/services/credentials.cc ++++ chromium-114.0.5735.133/sandbox/linux/services/credentials.cc @@ -80,7 +80,7 @@ bool ChrootToSafeEmptyDir() { pid_t pid = -1; alignas(16) char stack_buf[PTHREAD_STACK_MIN]; @@ -540,10 +540,10 @@ Index: chromium-111.0.5563.64/sandbox/linux/services/credentials.cc // The stack grows downward. void* stack = stack_buf + sizeof(stack_buf); #else -Index: chromium-111.0.5563.64/sandbox/linux/services/syscall_wrappers.cc +Index: chromium-114.0.5735.133/sandbox/linux/services/syscall_wrappers.cc =================================================================== ---- chromium-111.0.5563.64.orig/sandbox/linux/services/syscall_wrappers.cc -+++ chromium-111.0.5563.64/sandbox/linux/services/syscall_wrappers.cc +--- chromium-114.0.5735.133.orig/sandbox/linux/services/syscall_wrappers.cc ++++ chromium-114.0.5735.133/sandbox/linux/services/syscall_wrappers.cc @@ -61,7 +61,7 @@ long sys_clone(unsigned long flags, #if defined(ARCH_CPU_X86_64) return syscall(__NR_clone, flags, child_stack, ptid, ctid, tls); @@ -553,10 +553,10 @@ Index: chromium-111.0.5563.64/sandbox/linux/services/syscall_wrappers.cc // CONFIG_CLONE_BACKWARDS defined. return syscall(__NR_clone, flags, child_stack, ptid, tls, ctid); #endif -Index: chromium-111.0.5563.64/sandbox/linux/syscall_broker/broker_process.cc +Index: chromium-114.0.5735.133/sandbox/linux/syscall_broker/broker_process.cc =================================================================== ---- chromium-111.0.5563.64.orig/sandbox/linux/syscall_broker/broker_process.cc -+++ chromium-111.0.5563.64/sandbox/linux/syscall_broker/broker_process.cc +--- chromium-114.0.5735.133.orig/sandbox/linux/syscall_broker/broker_process.cc ++++ chromium-114.0.5735.133/sandbox/linux/syscall_broker/broker_process.cc @@ -122,44 +122,46 @@ bool BrokerProcess::IsSyscallBrokerable( // and are default disabled in Android. So, we should refuse to broker them // to be consistent with the platform's restrictions. @@ -629,10 +629,10 @@ Index: chromium-111.0.5563.64/sandbox/linux/syscall_broker/broker_process.cc case __NR_unlink: return !fast_check || policy_->allowed_command_set.test(COMMAND_UNLINK); #endif -Index: chromium-111.0.5563.64/sandbox/linux/system_headers/linux_seccomp.h +Index: chromium-114.0.5735.133/sandbox/linux/system_headers/linux_seccomp.h =================================================================== ---- chromium-111.0.5563.64.orig/sandbox/linux/system_headers/linux_seccomp.h -+++ chromium-111.0.5563.64/sandbox/linux/system_headers/linux_seccomp.h +--- chromium-114.0.5735.133.orig/sandbox/linux/system_headers/linux_seccomp.h ++++ chromium-114.0.5735.133/sandbox/linux/system_headers/linux_seccomp.h @@ -39,6 +39,10 @@ #define EM_AARCH64 183 #endif @@ -655,10 +655,10 @@ Index: chromium-111.0.5563.64/sandbox/linux/system_headers/linux_seccomp.h // For prctl.h #ifndef PR_SET_SECCOMP #define PR_SET_SECCOMP 22 -Index: chromium-111.0.5563.64/sandbox/linux/system_headers/linux_signal.h +Index: chromium-114.0.5735.133/sandbox/linux/system_headers/linux_signal.h =================================================================== ---- chromium-111.0.5563.64.orig/sandbox/linux/system_headers/linux_signal.h -+++ chromium-111.0.5563.64/sandbox/linux/system_headers/linux_signal.h +--- chromium-114.0.5735.133.orig/sandbox/linux/system_headers/linux_signal.h ++++ chromium-114.0.5735.133/sandbox/linux/system_headers/linux_signal.h @@ -13,7 +13,7 @@ // (not undefined, but defined different values and in different memory // layouts). So, fill the gap here. @@ -668,10 +668,10 @@ Index: chromium-111.0.5563.64/sandbox/linux/system_headers/linux_signal.h #define LINUX_SIGHUP 1 #define LINUX_SIGINT 2 -Index: chromium-111.0.5563.64/sandbox/linux/system_headers/linux_stat.h +Index: chromium-114.0.5735.133/sandbox/linux/system_headers/linux_stat.h =================================================================== ---- chromium-111.0.5563.64.orig/sandbox/linux/system_headers/linux_stat.h -+++ chromium-111.0.5563.64/sandbox/linux/system_headers/linux_stat.h +--- chromium-114.0.5735.133.orig/sandbox/linux/system_headers/linux_stat.h ++++ chromium-114.0.5735.133/sandbox/linux/system_headers/linux_stat.h @@ -150,7 +150,7 @@ struct kernel_stat { int st_blocks; int st_pad4[14]; @@ -681,10 +681,10 @@ Index: chromium-111.0.5563.64/sandbox/linux/system_headers/linux_stat.h struct kernel_stat { unsigned long st_dev; unsigned long st_ino; -Index: chromium-111.0.5563.64/sandbox/linux/system_headers/linux_syscalls.h +Index: chromium-114.0.5735.133/sandbox/linux/system_headers/linux_syscalls.h =================================================================== ---- chromium-111.0.5563.64.orig/sandbox/linux/system_headers/linux_syscalls.h -+++ chromium-111.0.5563.64/sandbox/linux/system_headers/linux_syscalls.h +--- chromium-114.0.5735.133.orig/sandbox/linux/system_headers/linux_syscalls.h ++++ chromium-114.0.5735.133/sandbox/linux/system_headers/linux_syscalls.h @@ -35,5 +35,9 @@ #include "sandbox/linux/system_headers/arm64_linux_syscalls.h" #endif @@ -695,10 +695,10 @@ Index: chromium-111.0.5563.64/sandbox/linux/system_headers/linux_syscalls.h + #endif // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_ -Index: chromium-111.0.5563.64/sandbox/linux/system_headers/riscv64_linux_syscalls.h +Index: chromium-114.0.5735.133/sandbox/linux/system_headers/riscv64_linux_syscalls.h =================================================================== --- /dev/null -+++ chromium-111.0.5563.64/sandbox/linux/system_headers/riscv64_linux_syscalls.h ++++ chromium-114.0.5735.133/sandbox/linux/system_headers/riscv64_linux_syscalls.h @@ -0,0 +1,1222 @@ +// Copyright 2014 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be @@ -1922,10 +1922,10 @@ Index: chromium-111.0.5563.64/sandbox/linux/system_headers/riscv64_linux_syscall +#endif + +#endif // SANDBOX_LINUX_SYSTEM_HEADERS_RISCV64_LINUX_SYSCALLS_H_ -Index: chromium-111.0.5563.64/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc +Index: chromium-114.0.5735.133/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc =================================================================== ---- chromium-111.0.5563.64.orig/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc -+++ chromium-111.0.5563.64/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc +--- chromium-114.0.5735.133.orig/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc ++++ chromium-114.0.5735.133/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc @@ -38,7 +38,7 @@ ResultExpr CrosAmdGpuProcessPolicy::Eval case __NR_sched_setscheduler: case __NR_sysinfo: @@ -1935,10 +1935,10 @@ Index: chromium-111.0.5563.64/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux case __NR_readlink: case __NR_stat: #endif -Index: chromium-111.0.5563.64/sandbox/policy/linux/bpf_gpu_policy_linux.cc +Index: chromium-114.0.5735.133/sandbox/policy/linux/bpf_gpu_policy_linux.cc =================================================================== ---- chromium-111.0.5563.64.orig/sandbox/policy/linux/bpf_gpu_policy_linux.cc -+++ chromium-111.0.5563.64/sandbox/policy/linux/bpf_gpu_policy_linux.cc +--- chromium-114.0.5735.133.orig/sandbox/policy/linux/bpf_gpu_policy_linux.cc ++++ chromium-114.0.5735.133/sandbox/policy/linux/bpf_gpu_policy_linux.cc @@ -73,7 +73,7 @@ ResultExpr GpuProcessPolicy::EvaluateSys (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) case __NR_ftruncate64: @@ -1948,3 +1948,16 @@ Index: chromium-111.0.5563.64/sandbox/policy/linux/bpf_gpu_policy_linux.cc case __NR_getdents: #endif case __NR_getdents64: +Index: chromium-114.0.5735.133/sandbox/policy/linux/bpf_network_policy_linux.cc +=================================================================== +--- chromium-114.0.5735.133.orig/sandbox/policy/linux/bpf_network_policy_linux.cc ++++ chromium-114.0.5735.133/sandbox/policy/linux/bpf_network_policy_linux.cc +@@ -235,7 +235,7 @@ ResultExpr NetworkProcessPolicy::Evaluat + case __NR_fdatasync: + case __NR_fsync: + case __NR_mremap: +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + case __NR_getdents: + #endif + case __NR_getdents64: diff --git a/chromium/riscv64.patch b/chromium/riscv64.patch index 3cc6e4631..7f9b8e7cf 100644 --- a/chromium/riscv64.patch +++ b/chromium/riscv64.patch @@ -1,49 +1,47 @@ -diff --git trunk/PKGBUILD trunk/PKGBUILD -index e91c7bc..b68d790 100644 --- PKGBUILD +++ PKGBUILD -@@ -29,14 +29,24 @@ source=(https://commondatastorage.googleapis.com/chromium-browser-official/chrom - download-bubble-typename.patch +@@ -31,7 +31,9 @@ source=(https://commondatastorage.googleapis.com/chromium-browser-official/chrom webauthn-variant.patch + random-fixes-for-gcc13.patch disable-GlobalMediaControlsCastStartStop.patch - use-oauth2-client-switches-as-default.patch) + use-oauth2-client-switches-as-default.patch -+ riscv-angle.patch -+ riscv-base.patch -+ riscv-crashpad.patch -+ riscv-dav1d.patch -+ riscv-sandbox.patch) - sha256sums=('76cec11dc13abe6703305b0300e1fe24c8f547c1ff313f7be09db0e23d12ee1e' ++ riscv-{angle,base,crashpad,dav1d,libgav1,libyuv,sandbox}.patch ++ swiftshader-gcc-13-fix.patch) + sha256sums=('8289ec1ec9e2540313af10bcf97721ec560789c931fc0583a2f5a545f223d262' '213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a' - '5f868cba9e4d387499711738adc6fd87ab9f1ef61f464016bc682660ae59206a' - 'd464eed4be4e9bf6187b4c40a759c523b7befefa25ba34ad6401b2a07649ca2a' + '621ed210d75d0e846192c1571bb30db988721224a41572c27769c0288d361c11' +@@ -40,7 +42,15 @@ sha256sums=('8289ec1ec9e2540313af10bcf97721ec560789c931fc0583a2f5a545f223d262' '590fabbb26270947cb477378b53a9dcd17855739076b4af9983e1e54dfcab6d7' + 'ba4dd0a25a4fc3267ed19ccb39f28b28176ca3f97f53a4e9f5e9215280040ea0' '7f3b1b22d6a271431c1f9fc92b6eb49c6d80b8b3f868bdee07a6a1a16630a302' - 'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711') + 'e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711' + 'fb0738fc32f228cef59e5516dbb4acd8818f1e2ba9db2cfbc21cf72a4ace8c3f' -+ 'da17695cc437eb3f2a71719772d29ee9d0b6f80152536b061208ab29253fca7c' ++ '67fef79581b480ae1f97a4cf6bd4d4e93eee81aed1bf5c129cf2524c26c64f30' + '70f8bcd3dd68c13d1e074415952c0b7e3e3b6058c97d39ba7a78dc17daa30547' -+ 'fd30767b8587338d1a38165aaaeef7e44a6ea91c4cfa644effaaa363e698796a' -+ 'b56dc00f6de8d0dfaad8d3cca37c061ca26d6fc9feb7ec1726166d5cfeff9a1a') ++ '5689e9422624c8725509b6fdc277e20c3e8862cf515656faef7507978489bc4e' ++ '4b2dcfdeb8ab32130d220d9827f49a930cf748bf4d6c7aef97a7b36a98316430' ++ 'd71a8dd17e3acb8f76032a35a6e633ddb12304194f36b6fc7bc24b4f0867f0bf' ++ 'c11730bfbc8788540582c9f5922b8d6ba16c264b97f0f7bd05db3fba008cac7f' ++ '60b2f96dca144d94c273e1388f4f7c8a83553611255812f4a44e02668dc4957c') if (( _manual_clone )); then source[0]=fetch-chromium-release -@@ -112,6 +122,13 @@ prepare() { - # https://crbug.com/1314342 - patch -Np1 -i ../disable-GlobalMediaControlsCastStartStop.patch - -+ # riscv64 -+ patch -Np1 -i ../riscv-angle.patch -+ patch -Np1 -i ../riscv-base.patch -+ patch -Np1 -i ../riscv-crashpad.patch -+ patch -Np1 -i ../riscv-dav1d.patch -+ patch -Np1 -i ../riscv-sandbox.patch -+ - # Build fixes +@@ -123,6 +133,12 @@ prepare() { patch -Np1 -i ../download-bubble-typename.patch patch -Np1 -i ../webauthn-variant.patch -@@ -171,6 +188,10 @@ build() { + patch -Np1 -i ../random-fixes-for-gcc13.patch ++ patch -Np1 -i ../swiftshader-gcc-13-fix.patch ++ ++ # riscv64 ++ for rvpatch in riscv-{angle,base,crashpad,dav1d,libgav1,libyuv,sandbox}.patch; do ++ patch -Np1 -i ../$rvpatch ++ done + + # Link to system tools required by the build + mkdir -p third_party/node/linux/node-linux-x64/bin +@@ -179,6 +195,10 @@ build() { 'enable_widevine=true' 'enable_nacl=false' "google_api_key=\"$_google_api_key\"" diff --git a/chromium/swiftshader-gcc-13-fix.patch b/chromium/swiftshader-gcc-13-fix.patch new file mode 100644 index 000000000..afe56eaff --- /dev/null +++ b/chromium/swiftshader-gcc-13-fix.patch @@ -0,0 +1,12 @@ +Index: chromium-114.0.5735.133/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h +=================================================================== +--- chromium-114.0.5735.133.orig/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h ++++ chromium-114.0.5735.133/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h +@@ -14,6 +14,7 @@ + #ifndef LLVM_SUPPORT_SIGNALS_H + #define LLVM_SUPPORT_SIGNALS_H + ++#include + #include + + namespace llvm {