forked from electron/electron
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update patches for electron31(chromium 126, node 20)
- Loading branch information
Showing
13 changed files
with
1,727 additions
and
870 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
patches/chromium/0001-media-ffmpeg-add-riscv64-support.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
From 8c1cb3b1cc25d522fbbb22a4e4f3346361bfe744 Mon Sep 17 00:00:00 2001 | ||
From: Levi Zim <rsworktech@outlook.com> | ||
Date: Tue, 11 Jun 2024 04:14:28 +0200 | ||
Subject: [PATCH] media/ffmpeg: add riscv64 support | ||
|
||
--- | ||
media/ffmpeg/scripts/build_ffmpeg.py | 16 +++++++++++++++- | ||
media/ffmpeg/scripts/generate_gn.py | 2 +- | ||
media/ffmpeg/scripts/robo_lib/config.py | 2 +- | ||
3 files changed, 17 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/media/ffmpeg/scripts/build_ffmpeg.py b/media/ffmpeg/scripts/build_ffmpeg.py | ||
index 75589ce6a2181..548dd13a22be7 100755 | ||
--- a/media/ffmpeg/scripts/build_ffmpeg.py | ||
+++ b/media/ffmpeg/scripts/build_ffmpeg.py | ||
@@ -43,7 +43,7 @@ BRANDINGS = [ | ||
|
||
ARCH_MAP = { | ||
'android': ['ia32', 'x64', 'arm-neon', 'arm64'], | ||
- 'linux': ['ia32', 'x64', 'noasm-x64', 'arm', 'arm-neon', 'arm64'], | ||
+ 'linux': ['ia32', 'x64', 'noasm-x64', 'arm', 'arm-neon', 'arm64', 'riscv64'], | ||
'mac': ['x64', 'arm64'], | ||
'win': ['ia32', 'x64', 'arm64'], | ||
} | ||
@@ -898,6 +898,20 @@ def ConfigureAndBuild(target_arch, target_os, host_os, host_arch, | ||
'--extra-cflags=--target=mips64el-linux-gnuabi64', | ||
'--extra-ldflags=--target=mips64el-linux-gnuabi64', | ||
]) | ||
+ elif target_arch == "riscv64": | ||
+ configure_flags['Common'].extend([ | ||
+ '--arch=riscv64', | ||
+ '--extra-cflags=-march=rv64gc', | ||
+ ]) | ||
+ if target_os == 'linux': | ||
+ configure_flags['Common'].extend([ | ||
+ '--enable-cross-compile', | ||
+ '--target-os=linux', | ||
+ '--sysroot=' + os.path.join( | ||
+ CHROMIUM_ROOT_DIR, 'build/linux/debian_sid_riscv64-sysroot'), | ||
+ '--extra-cflags=--target=riscv64-linux-gnu', | ||
+ '--extra-ldflags=--target=riscv64-linux-gnu', | ||
+ ]) | ||
else: | ||
print('Error: Unknown target arch %r for target OS %r!' % | ||
(target_arch, target_os), | ||
diff --git a/media/ffmpeg/scripts/generate_gn.py b/media/ffmpeg/scripts/generate_gn.py | ||
index e2d6b7ef211c7..41824671fed0c 100755 | ||
--- a/media/ffmpeg/scripts/generate_gn.py | ||
+++ b/media/ffmpeg/scripts/generate_gn.py | ||
@@ -80,7 +80,7 @@ GN_SOURCE_END = """] | ||
_Attrs = ('ARCHITECTURE', 'TARGET', 'PLATFORM') | ||
Attr = collections.namedtuple('Attr', _Attrs)(*_Attrs) | ||
SUPPORT_MATRIX = { | ||
- Attr.ARCHITECTURE: set(['ia32', 'x64', 'arm', 'arm64', 'arm-neon']), | ||
+ Attr.ARCHITECTURE: set(['ia32', 'x64', 'arm', 'arm64', 'arm-neon', 'riscv64']), | ||
Attr.TARGET: set(['Chromium', 'Chrome', 'ChromeOS']), | ||
Attr.PLATFORM: set(['android', 'linux', 'win', 'mac']) | ||
} | ||
diff --git a/media/ffmpeg/scripts/robo_lib/config.py b/media/ffmpeg/scripts/robo_lib/config.py | ||
index 84a6bf5196d95..7f0c3d0a7f221 100644 | ||
--- a/media/ffmpeg/scripts/robo_lib/config.py | ||
+++ b/media/ffmpeg/scripts/robo_lib/config.py | ||
@@ -204,7 +204,7 @@ class RoboConfiguration: | ||
self._host_operating_system = "linux" | ||
|
||
try: | ||
- with open("/etc/lsb-release", "r") as f: | ||
+ with open("/etc/os-release", "r") as f: | ||
result = f.read() | ||
if "Ubuntu" in result or "Debian" in result: | ||
self._os_flavor = packages.OsFlavor.Debian | ||
-- | ||
2.45.2 | ||
|
42 changes: 0 additions & 42 deletions
42
patches/chromium/0001-rust-toolchain-fix-float-target-abi-for-riscv64.patch
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.