diff options
author | Andrew Cameron <apcameron@gmail.com> | 2024-06-14 13:58:30 +0100 |
---|---|---|
committer | Yixun Lan <dlan@gentoo.org> | 2024-06-25 23:55:10 +0000 |
commit | a7dfb559023514cba7e10f1808086cfef85a8288 (patch) | |
tree | 3776533436c0ed8029ca1005b4bd8ad49c812509 | |
parent | www-client/chromium/: Update to 123.0.6312.122 (diff) | |
download | riscv-a7dfb559023514cba7e10f1808086cfef85a8288.tar.gz riscv-a7dfb559023514cba7e10f1808086cfef85a8288.tar.bz2 riscv-a7dfb559023514cba7e10f1808086cfef85a8288.zip |
Update Chromium to 126.0.6478.114
Tested on my Visonfive 2
Closes: https://github.com/gentoo/riscv/pull/15
Signed-off-by: Andrew Cameron <apcameron@gmail.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
-rw-r--r-- | www-client/chromium/Manifest | 12 | ||||
-rw-r--r-- | www-client/chromium/chromium-123.0.6312.105.ebuild | 1453 | ||||
-rw-r--r-- | www-client/chromium/chromium-126.0.6478.114.ebuild (renamed from www-client/chromium/chromium-123.0.6312.122.ebuild) | 68 | ||||
-rw-r--r-- | www-client/chromium/files/Debian-fix-rust-linking.patch (renamed from www-client/chromium/files/02Debian-fix-rust-linking.patch) | 0 | ||||
-rw-r--r-- | www-client/chromium/files/chromium-125-ninja-1-12.patch | 17 | ||||
-rw-r--r-- | www-client/chromium/files/chromium-125-oauth2-client-switches.patch | 45 | ||||
-rw-r--r-- | www-client/chromium/files/chromium-125-system-zstd.patch | 53 | ||||
-rw-r--r-- | www-client/chromium/files/chromium-126-oauth2-client-switches.patch | 45 | ||||
-rw-r--r-- | www-client/chromium/files/cpuinfo.patch (renamed from www-client/chromium/files/10cpuinfo.patch) | 0 | ||||
-rw-r--r-- | www-client/chromium/files/fix-rust-target.patch (renamed from www-client/chromium/files/01fix-rust-target.patch) | 0 | ||||
-rw-r--r-- | www-client/chromium/files/riscv-dav1d.patch (renamed from www-client/chromium/files/03riscv-dav1d.patch) | 0 | ||||
-rw-r--r-- | www-client/chromium/files/riscv-ffmpeg.patch (renamed from www-client/chromium/files/06riscv-ffmpeg.patch) | 569 | ||||
-rw-r--r-- | www-client/chromium/files/riscv-sandbox.patch (renamed from www-client/chromium/files/05riscv-sandbox.patch) | 451 | ||||
-rw-r--r-- | www-client/chromium/files/riscv.patch (renamed from www-client/chromium/files/09riscv.patch) | 0 | ||||
-rw-r--r-- | www-client/chromium/files/swiftshader-MCDissassembler.patch (renamed from www-client/chromium/files/00swiftshader-MCDissassembler.patch) | 0 | ||||
-rw-r--r-- | www-client/chromium/files/swiftshader-use-llvm16.patch (renamed from www-client/chromium/files/00swiftshader-use-llvm16.patch) | 0 |
16 files changed, 744 insertions, 1969 deletions
diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest index 3786d14..726d054 100644 --- a/www-client/chromium/Manifest +++ b/www-client/chromium/Manifest @@ -1,9 +1,7 @@ -DIST chromium-123-clang.tar.xz 50178332 BLAKE2B 4b5c4f81a83c7b0c809c93a713e869fde6fe559477665cb3b2f03c62d2175f821b81fb03b0ddd127c6eaf77c41011b4de06561f09a58384153d80fe2b3aa7427 SHA512 17108b9579f16d0da383bd5e41d012f94bcb8445a517ff823aa49b66d3861b0a124b6cce6183fbc64e8050f1ebcd65a9daa2acbda5fdaa42390bfbf4ecb16bd3 -DIST chromium-123-rust.tar.xz 145295100 BLAKE2B ae6603a0e0218e4e39d3e8b7aa48a2cd946c90779dac48be26582926963c8a10a48e3e58fd00a23cb8cd9a3584d9d4a142e843f93c761e862253817635f18c2c SHA512 b4f8dce6d74be4be495d9948d7593ec9664c0b93e87456fab33d3ae5ac0e486a4e8576b26a9ab9890285a7c0d566afb803b98225c0692b6cac9f623a10b954a2 -DIST chromium-123.0.6312.105.tar.xz 3481204616 BLAKE2B 8adbc4a0c96ea53b45b26a48c8eb94e29b31b981471a0d5fda4cdea1f7aa69714a9e5a5729a61a49a92b6322889ee794b4c7ac5e243bc495ff5bd04cdc59f616 SHA512 a1abbba78c96fd7bc44a23b21d8180ebff015d17abcb186dece595513fda9d4443ac67498a78181589884c384a48e6c3abfe72e6ee806fdfc764d05f13fb5cb6 -DIST chromium-123.0.6312.122.tar.xz 3488275388 BLAKE2B 9f7e6c4984a41dbed6849eee08d4f6b8241c86ece0250d67786038980f3d7f208897f42b279c20ffbb965e8e49427ce74e896c34b40390321780b9cc2ba685ce SHA512 23e13d1d5758aa771f4c66e1a55068438e7c4890456dcb0b7a1fc1839b750e612e29d59e744c8b773935757aad01b78a5fecc3e03057a8acbb7e997dbb98f007 -DIST chromium-patches-123.tar.bz2 4697 BLAKE2B 8a7dd76edb23afb7b2f65084696bce5d6e54d63ca34c4590052db1086ed0a422b1efde863c4daad4e2526f329eb65276b9ad5406017cd97fb75b1a9556c1f933 SHA512 ea47255deac1893896f64496629d34c7092f266a175b8400fcf4f01b9d038ae240e911bff488558bb28e6f5795bbcf276adf20ed1e0ccb8ac99f9ddd260742f9 +DIST chromium-126-clang.tar.xz 50615992 BLAKE2B 293709399ddf343ba195cec452974178228ebb72921931ad58136351956b881f8dc0bc8ca740252bcd4971701c9ee8ccc0a33648aee25a5b1cece56e0af6b83f SHA512 7bb2938b1df452585d0ee93da3bcf9c3e64e88e39059a713fe21758df670190b12ca002ef2764dc99efdb4284b4c4b7cde861e2e495d99956c21120a51b8c3dc +DIST chromium-126-rust.tar.xz 150643432 BLAKE2B d9c827008a2fae07977628beccdf3cf4e5d9bf3c9728e4b2839c8bc86ee2f87844921064e30c067a1b620a3d53cbf54a74053172b1436239332fc668f772924d SHA512 431c0305a81e59da231d56f1b119226b661d7f5a93d0da92afbfc384b0e5be28f282c2911137983298a5369c93b60184d41875ec63b47048a782ee2b1301fc77 +DIST chromium-126.0.6478.114.tar.xz 4167281776 BLAKE2B 4ca720b0280dc6f0aafb5da5d31f97d8d55faec9ac187fc7f3e16e447d147a6912b2b8f26247503390755146e42b32458e4c71a80e6a132cc456f414454ecf53 SHA512 49ca506eb7ac52cdfb5b491bff10deec46d62686feeb3392803eecd61a570ce6c9e6c97d61c79907aaaee39b6d32a4da399c92b8078dbdf2df097f37c757d286 +DIST chromium-patches-126.tar.bz2 4538 BLAKE2B c1f224015618ec908ef09d0c04a2243923371e2caeccd60d93747599fd1434b284291a5b4326008db21749cf78827d5a4b50d22fc805dcd3c1fd86303dc82729 SHA512 6692075adac0379b5f27d1023de1a051cf7f7f7138efd32dfc3af0d501b714142a16daf18022bb46d92218587f364f4dafe9f4aea24f6826e88b0e7cc2be7d0b DIST chromium-ppc64le-gentoo-patches-1.tar.xz 5636 BLAKE2B 1d898939df023c59285b27bee552470483ea06375d1ee8d6947b89c5927c23cc7bfec6b49f3b376ece931d11a56f8e2a45791e0f92ad61974fc8c34c1082d89c SHA512 8a71cb007e47cda8e5fe5d185729389e65c48bd322c8ee8b3986bee8571427b959628f2666bda646a3f89ae64197c0957d3626845ff03461dbd5dee4c964d07c DIST chromium-profiler-0.2.tar 259952640 BLAKE2B 5e82389fce00b267280d633b26551231c558b80f0c92cd7d60271095a3503365ab673e7a46dc5f74f8a82db1f21262cb24dcc0531d954bab5fb3b175dab3394d SHA512 9fa89a5ab728419683e7495ae676567480987d68a2d589f2aa97bfcbcf123f3c8f97f8bca5f65e5e3f6e41475535add473ded83b9c7a33bb4746a9d05b298a6c -DIST chromium_123.0.6312.105-1raptor0~deb12u1.debian.tar.xz 579484 BLAKE2B 587082358377f7bc0dca0dec83772abb7e040ad894ca4d456a294b7f5c19297acbc5b1dac725d3c1dbaaeefd480328c6c06c607438e560aa6359c1e98c4b1c9c SHA512 6b670a139e284cc96da65ff3c1b3e715cd9b436de2404792d619cfad23e2040fd931e7cc49f0b1ac17e11522804a4c9a621cb943e0dab33fb5bf422e954c5421 -DIST chromium_123.0.6312.86-1raptor0~deb12u1.debian.tar.xz 579124 BLAKE2B a27996211fbed198480e50934e39b0eda4c39e5e78a03f9b290cb90a6c8d7003b6aa828bf35e6744e9d7aa9a922f43baa77d6c9768140baf5749a797c2dad664 SHA512 cfb51fd910f3330100a2dc9ea993d537f126329ff2c590744954a3bfbb712d7bf1d7ad9066628aba5d28c98f2f9b069cf02f8c6048d2ad0a1a376468bdbd9196 +DIST chromium_126.0.6478.56-1raptor0~deb12u2.debian.tar.xz 613448 BLAKE2B 35af65461a5132ac7a28e004f3b8a5e1afc10924726154dd47a23371ebe5508765e0bfd3c1b1d56ff5671039b522536fa21ec22dcb9f14426929a5905976e8a0 SHA512 870b864620e48e6aefa2b36026553b06dde0afc8e8de6cbaf0e4db2333d02164a95fa5f243066e026aa3dff4b3a7366853f49c02f607dec36cec77e4b4683736 diff --git a/www-client/chromium/chromium-123.0.6312.105.ebuild b/www-client/chromium/chromium-123.0.6312.105.ebuild deleted file mode 100644 index 5388d0d..0000000 --- a/www-client/chromium/chromium-123.0.6312.105.ebuild +++ /dev/null @@ -1,1453 +0,0 @@ -# Copyright 2009-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -PYTHON_COMPAT=( python3_{11..12} ) -PYTHON_REQ_USE="xml(+)" - -# PACKAGING NOTES - -# Google roll their bundled Clang every two weeks, and the bundled Rust -# is rolled regularly and depends on that. While we do our best to build -# with system Clang, we will eventually hit the point where we need to use -# the bundled Clang due to the use of prerelease features. We've been lucky -# enough so far that this hasn't been an issue. - -# We try and avoid forcing the use of the custom/bundled libcxx, but sometimes -# it is unavoidable. Remember to force the use of Clang when this is forced. - -# GCC is _not_ supported upstream, though patches are welcome. We do our -# best to enable builds with GCC but reserve the right to force Clang -# builds if we can't keep up with upstream's changes. Please comment -# when forcing Clang builds so we can track the need for it. - -# GN is bundled with Chromium, but we always use the system version. Remember to -# check for upstream changes to GN and update ebuild (and version below) as required. - -# For binhost users, if USE=bindist is set, we configure Chromium in a way that it is able -# to use proprietary codecs, and so that ffmpeg is an external component (libffmpeg.so), -# then we remove ffmpeg from the image to ensure that the built package is distributable -# (i.e. we don't owe royalties). A suitable libffmpeg.so is symlinked in its place; -# as a result of this, ffmpeg[chromium] or ffmpeg-chromium must be installed on the system. - -# For non-binhost builds, we build the bundled ffmpeg and enable proprietary codecs because there's -# no reason not to. Todo: Re-enable USE=system-ffmpeg. - -# These variables let us easily bound supported major dependency versions in one place. -GCC_MIN_VER=12 -GN_MIN_VER=0.2154 -# Since Google use prerelease llvm we can let any adventurous users try to build with prerelease -# ebuilds; try to keep this up to date with the latest version in the tree. -LLVM_MAX_SLOT=19 -LLVM_MIN_SLOT=17 -RUST_MIN_VER=1.72.0 -# chromium-tools/get-chromium-toolchain-strings.sh -GOOGLE_CLANG_VER=llvmorg-19-init-2319-g7c4c2746-1 -GOOGLE_RUST_VER=340bb19fea20fd5f9357bbfac542fad84fc7ea2b-3 - -# https://bugs.chromium.org/p/v8/issues/detail?id=14449 - V8 used in 120 can't build with GCC -# Resolved upstream, requires testing and some backporting I'm sure -: ${CHROMIUM_FORCE_CLANG=yes} -# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101227 - Chromium 120: -# webrtc - no matching member function for call to 'emplace' -: ${CHROMIUM_FORCE_LIBCXX=yes} -# 121's 'gcc_link_wrapper.py' currently fails if not using lld due to the addition of rust -: ${CHROMIUM_FORCE_LLD=yes} - -: ${CHROMIUM_FORCE_GOOGLE_TOOLCHAIN=no} - -VIRTUALX_REQUIRED="pgo" - -CHROMIUM_LANGS="af am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu he - hi hr hu id it ja kn ko lt lv ml mr ms nb nl pl pt-BR pt-PT ro ru sk sl sr - sv sw ta te th tr uk ur vi zh-CN zh-TW" - -inherit check-reqs chromium-2 desktop flag-o-matic llvm ninja-utils pax-utils -inherit python-any-r1 qmake-utils readme.gentoo-r1 toolchain-funcs virtualx xdg-utils - -DESCRIPTION="Open-source version of Google Chrome web browser" -HOMEPAGE="https://www.chromium.org/" -PATCHSET_PPC64="123.0.6312.86-1raptor0~deb12u1" -PATCH_V="${PV%%\.*}" -SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz - system-toolchain? ( - https://gitlab.com/Matt.Jolly/chromium-patches/-/archive/${PATCH_V}/chromium-patches-${PATCH_V}.tar.bz2 - ) - !system-toolchain? ( - https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-${GOOGLE_CLANG_VER}.tar.xz - -> chromium-${PV%%\.*}-clang.tar.xz - https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/rust-toolchain-${GOOGLE_RUST_VER}-${GOOGLE_CLANG_VER%??}.tar.xz - -> chromium-${PV%%\.*}-rust.tar.xz - ) - ppc64? ( - https://quickbuild.io/~raptor-engineering-public/+archive/ubuntu/chromium/+files/chromium_${PATCHSET_PPC64}.debian.tar.xz - https://deps.gentoo.zip/chromium-ppc64le-gentoo-patches-1.tar.xz - ) - pgo? ( https://github.com/elkablo/chromium-profiler/releases/download/v0.2/chromium-profiler-0.2.tar )" - -LICENSE="BSD" -SLOT="0/stable" -KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv" -IUSE_SYSTEM_LIBS="+system-harfbuzz +system-icu +system-png +system-zstd" -IUSE="+X ${IUSE_SYSTEM_LIBS} bindist cups debug ffmpeg-chromium gtk4 +hangouts headless kerberos libcxx lto +official pax-kernel pgo +proprietary-codecs pulseaudio" -IUSE+=" qt5 qt6 +screencast selinux +system-toolchain +vaapi +wayland +widevine" -RESTRICT="!bindist? ( bindist )" - -REQUIRED_USE=" - !headless? ( || ( X wayland ) ) - pgo? ( X !wayland ) - qt6? ( qt5 ) - screencast? ( wayland ) - !system-toolchain? ( libcxx ) - ffmpeg-chromium? ( bindist proprietary-codecs ) -" - -COMMON_X_DEPEND=" - x11-libs/libXcomposite:= - x11-libs/libXcursor:= - x11-libs/libXdamage:= - x11-libs/libXfixes:= - >=x11-libs/libXi-1.6.0:= - x11-libs/libXrandr:= - x11-libs/libXrender:= - x11-libs/libXtst:= - x11-libs/libxshmfence:= -" - -COMMON_SNAPSHOT_DEPEND=" - system-icu? ( >=dev-libs/icu-71.1:= ) - >=dev-libs/libxml2-2.12.4:=[icu] - dev-libs/nspr:= - >=dev-libs/nss-3.26:= - dev-libs/libxslt:= - media-libs/fontconfig:= - >=media-libs/freetype-2.11.0-r1:= - system-harfbuzz? ( >=media-libs/harfbuzz-3:0=[icu(-)] ) - media-libs/libjpeg-turbo:= - system-png? ( media-libs/libpng:=[-apng(-)] ) - system-zstd? ( >=app-arch/zstd-1.5.5:= ) - >=media-libs/libwebp-0.4.0:= - media-libs/mesa:=[gbm(+)] - >=media-libs/openh264-1.6.0:= - sys-libs/zlib:= - x11-libs/libdrm:= - !headless? ( - dev-libs/glib:2 - >=media-libs/alsa-lib-1.0.19:= - pulseaudio? ( media-libs/libpulse:= ) - sys-apps/pciutils:= - kerberos? ( virtual/krb5 ) - vaapi? ( >=media-libs/libva-2.7:=[X?,wayland?] ) - X? ( - x11-libs/libX11:= - x11-libs/libXext:= - x11-libs/libxcb:= - ) - x11-libs/libxkbcommon:= - wayland? ( - dev-libs/libffi:= - dev-libs/wayland:= - screencast? ( media-video/pipewire:= ) - ) - ) -" - -COMMON_DEPEND=" - ${COMMON_SNAPSHOT_DEPEND} - app-arch/bzip2:= - dev-libs/expat:= - net-misc/curl[ssl] - sys-apps/dbus:= - media-libs/flac:= - sys-libs/zlib:=[minizip] - !headless? ( - X? ( ${COMMON_X_DEPEND} ) - >=app-accessibility/at-spi2-core-2.46.0:2 - media-libs/mesa:=[X?,wayland?] - cups? ( >=net-print/cups-1.3.11:= ) - virtual/udev - x11-libs/cairo:= - x11-libs/gdk-pixbuf:2 - x11-libs/pango:= - qt5? ( - dev-qt/qtcore:5 - dev-qt/qtwidgets:5 - ) - qt6? ( dev-qt/qtbase:6[gui,widgets] ) - ) -" -RDEPEND="${COMMON_DEPEND} - !headless? ( - || ( - x11-libs/gtk+:3[X?,wayland?] - gui-libs/gtk:4[X?,wayland?] - ) - qt5? ( dev-qt/qtgui:5[X?,wayland?] ) - qt6? ( dev-qt/qtbase:6[X?,wayland?] ) - ) - virtual/ttf-fonts - selinux? ( sec-policy/selinux-chromium ) - bindist? ( - !ffmpeg-chromium? ( >=media-video/ffmpeg-6.1-r1:0/58.60.60[chromium] ) - ffmpeg-chromium? ( media-video/ffmpeg-chromium:${PV%%\.*} ) - ) -" -DEPEND="${COMMON_DEPEND} - !headless? ( - gtk4? ( gui-libs/gtk:4[X?,wayland?] ) - !gtk4? ( x11-libs/gtk+:3[X?,wayland?] ) - ) -" - -depend_clang_llvm_version() { - echo "sys-devel/clang:$1" - echo "sys-devel/llvm:$1" - echo "=sys-devel/lld-$1*" -} - -# When passed multiple arguments we assume that -# we want a range of versions, inclusive. -depend_clang_llvm_versions() { - local _v - if [[ $# -eq 1 ]]; then - depend_clang_llvm_version "$1" - elif [[ $# -eq 2 ]]; then - if [[ $1 -eq $2 ]]; then - depend_clang_llvm_version "$1" - fi - echo "|| (" - for ((i=$1; i<=$2; i++)); do - echo "(" - depend_clang_llvm_version "${i}" - echo ")" - done - echo ")" - else - die "depend_clang_llvm_versions() requires 1 or 2 arguments" - fi -} - -BDEPEND=" - ${COMMON_SNAPSHOT_DEPEND} - ${PYTHON_DEPS} - $(python_gen_any_dep ' - dev-python/setuptools[${PYTHON_USEDEP}] - ') - >=app-arch/gzip-1.7 - !headless? ( - qt5? ( dev-qt/qtcore:5 ) - qt6? ( dev-qt/qtbase:6 ) - ) - system-toolchain? ( - libcxx? ( >=sys-devel/clang-${LLVM_MIN_SLOT} ) - lto? ( $(depend_clang_llvm_versions ${LLVM_MIN_SLOT} ${LLVM_MAX_SLOT}) ) - pgo? ( - >=dev-python/selenium-3.141.0 - >=dev-util/web_page_replay_go-20220314 - $(depend_clang_llvm_versions ${LLVM_MIN_SLOT} ${LLVM_MAX_SLOT}) - ) - >=virtual/rust-${RUST_MIN_VER}[profiler(-)] - ) - >=dev-build/gn-${GN_MIN_VER} - dev-lang/perl - >=dev-build/ninja-1.7.2 - >=dev-util/gperf-3.0.3 - dev-vcs/git - >=net-libs/nodejs-7.6.0[inspector] - >=sys-devel/bison-2.4.3 - sys-devel/flex - virtual/pkgconfig -" - -if [[ ${CHROMIUM_FORCE_CLANG} == yes ]]; then - BDEPEND+="system-toolchain? ( >=sys-devel/clang-${LLVM_MIN_SLOT} ) " -fi - -if [[ ${CHROMIUM_FORCE_LLD} == yes ]]; then - BDEPEND+="system-toolchain? ( >=sys-devel/lld-${LLVM_MIN_SLOT} ) " -else - # #918897: Hack for arm64 - BDEPEND+=" arm64? ( >=sys-devel/lld-${LLVM_MIN_SLOT} )" -fi - -if ! has chromium_pkg_die ${EBUILD_DEATH_HOOKS}; then - EBUILD_DEATH_HOOKS+=" chromium_pkg_die"; -fi - -DISABLE_AUTOFORMATTING="yes" -DOC_CONTENTS=" -Some web pages may require additional fonts to display properly. -Try installing some of the following packages if some characters -are not displayed properly: -- media-fonts/arphicfonts -- media-fonts/droid -- media-fonts/ipamonafont -- media-fonts/noto -- media-fonts/ja-ipafonts -- media-fonts/takao-fonts -- media-fonts/wqy-microhei -- media-fonts/wqy-zenhei - -To fix broken icons on the Downloads page, you should install an icon -theme that covers the appropriate MIME types, and configure this as your -GTK+ icon theme. - -For native file dialogs in KDE, install kde-apps/kdialog. - -To make password storage work with your desktop environment you may -have install one of the supported credentials management applications: -- app-crypt/libsecret (GNOME) -- kde-frameworks/kwallet (KDE) -If you have one of above packages installed, but don't want to use -them in Chromium, then add --password-store=basic to CHROMIUM_FLAGS -in /etc/chromium/default. -" - -python_check_deps() { - python_has_version "dev-python/setuptools[${PYTHON_USEDEP}]" -} - -needs_clang() { - [[ ${CHROMIUM_FORCE_CLANG} == yes ]] || use libcxx || use lto || use pgo -} - -needs_lld() { - # #641556: Force lld for lto and pgo builds, otherwise disable - # #918897: Temporary hack w/ use arm64 - [[ ${CHROMIUM_FORCE_LLD} == yes ]] || use lto || use pgo || use arm64 -} - -llvm_check_deps() { - if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then - einfo "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - - if ( use lto || use pgo ) && ! has_version -b "=sys-devel/lld-${LLVM_SLOT}*" ; then - einfo "=sys-devel/lld-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2 - return 1 - fi - - einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2 -} - -pre_build_checks() { - # Check build requirements: bugs #471810, #541816, #914220 - # We're going to start doing maths here on the size of an unpacked source tarball, - # this should make updates easier as chromium continues to balloon in size. - local BASE_DISK=18 - local EXTRA_DISK=1 - local CHECKREQS_MEMORY="4G" - tc-is-cross-compiler && EXTRA_DISK=2 - if use lto || use pgo; then - CHECKREQS_MEMORY="9G" - tc-is-cross-compiler && EXTRA_DISK=4 - use pgo && EXTRA_DISK=8 - fi - if is-flagq '-g?(gdb)?([1-9])'; then - if use custom-cflags; then - EXTRA_DISK=13 - fi - CHECKREQS_MEMORY="16G" - fi - CHECKREQS_DISK_BUILD="$((BASE_DISK + EXTRA_DISK))G" - check-reqs_${EBUILD_PHASE_FUNC} -} - -pkg_pretend() { - if [[ ${MERGE_TYPE} != binary ]]; then - # The pre_build_checks are all about compilation resources, no need to run it for a binpkg - pre_build_checks - fi - - if use headless; then - local headless_unused_flags=("cups" "kerberos" "pulseaudio" "qt5" "qt6" "vaapi" "wayland") - for myiuse in ${headless_unused_flags[@]}; do - use ${myiuse} && ewarn "Ignoring USE=${myiuse}, USE=headless is set." - done - fi - - if ! use bindist && use ffmpeg-chromium; then - ewarn "Ignoring USE=ffmpeg-chromium, USE=bindist is not set." - fi -} - -pkg_setup() { - if [[ ${MERGE_TYPE} != binary ]]; then - # The pre_build_checks are all about compilation resources, no need to run it for a binpkg - pre_build_checks - - if use system-toolchain; then - local -x CPP="$(tc-getCXX) -E" - if tc-is-gcc && ! ver_test "$(gcc-version)" -ge ${GCC_MIN_VER}; then - die "At least gcc ${GCC_MIN_VER} is required" - fi - if use pgo && tc-is-cross-compiler; then - die "The pgo USE flag cannot be used when cross-compiling" - fi - if needs_clang && ! tc-is-clang; then - if tc-is-cross-compiler; then - CPP="${CBUILD}-clang++ -E" - else - CPP="${CHOST}-clang++ -E" - fi - fi - if needs_clang || tc-is-clang; then - if ver_test "$(clang-major-version)" -lt ${LLVM_MIN_SLOT}; then - die "At least Clang ${LLVM_MIN_SLOT} is required" - fi - # Ideally we never see this, but it should help prevent bugs like 927154 - if ver_test "$(clang-major-version)" -gt ${LLVM_MAX_SLOT}; then - die "Clang $(clang-major-version) is too new; ${LLVM_MAX_SLOT} is the highest supported version" - fi - fi - fi - # Users should never hit this, it's purely a development convenience - if ver_test $(gn --version || die) -lt ${GN_MIN_VER}; then - die "dev-build/gn >= ${GN_MIN_VER} is required to build this Chromium" - fi - fi - - chromium_suid_sandbox_check_kernel_config -} - -src_prepare() { - # Calling this here supports resumption via FEATURES=keepwork - python_setup - - # disable global media controls, crashes with libstdc++ - sed -i -e \ - "/\"GlobalMediaControlsCastStartStop\"/,+4{s/ENABLED/DISABLED/;}" \ - "chrome/browser/media/router/media_router_feature.cc" || die - - local PATCHES=( - "${FILESDIR}/chromium-cross-compile.patch" - "${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch" - "${FILESDIR}/chromium-109-system-zlib.patch" - "${FILESDIR}/chromium-111-InkDropHost-crash.patch" - "${FILESDIR}/chromium-117-system-zstd.patch" - "${FILESDIR}/chromium-124-libwebp-shim-sharpyuv.patch" - "${FILESDIR}/00swiftshader-MCDissassembler.patch" - "${FILESDIR}/00swiftshader-use-llvm16.patch" - "${FILESDIR}/01fix-rust-target.patch" - "${FILESDIR}/02Debian-fix-rust-linking.patch" - "${FILESDIR}/03riscv-dav1d.patch" - "${FILESDIR}/05riscv-sandbox.patch" - "${FILESDIR}/06riscv-ffmpeg.patch" - "${FILESDIR}/09riscv.patch" - "${FILESDIR}/10cpuinfo.patch" - ) - - if use system-toolchain; then - # The patchset is really only required if we're using the system-toolchain - PATCHES+=( "${WORKDIR}/chromium-patches-${PATCH_V}" ) - # We can't use the bundled compiler builtins - sed -i -e \ - "/if (is_clang && toolchain_has_rust) {/,+2d" \ - build/config/compiler/BUILD.gn || die "Failed to disable bundled compiler builtins" - else - mkdir -p third_party/llvm-build/Release+Asserts || die "Failed to bundle llvm" - ln -s "${WORKDIR}"/bin third_party/llvm-build/Release+Asserts/bin || die "Failed to symlink llvm bin" - ln -s "${WORKDIR}"/lib third_party/llvm-build/Release+Asserts/lib || die "Failed to symlink llvm lib" - echo "${GOOGLE_CLANG_VER}" > third_party/llvm-build/Release+Asserts/cr_build_revision || \ - die "Failed to set clang version" - ln -s "${WORKDIR}"/rust-toolchain third_party/rust-toolchain || die "Failed to bundle rust" - cp "${WORKDIR}"/rust-toolchain/VERSION \ - "${WORKDIR}"/rust-toolchain/INSTALLED_VERSION || die "Failed to set rust version" - fi - - if use ppc64 ; then - local p - for p in $(grep -v "^#" "${WORKDIR}"/debian/patches/series | grep "^ppc64le" || die); do - if [[ ! $p =~ "fix-breakpad-compile.patch" ]]; then - eapply "${WORKDIR}/debian/patches/${p}" - fi - done - PATCHES+=( "${WORKDIR}/ppc64le" ) - PATCHES+=( "${WORKDIR}/debian/patches/fixes/rust-clanglib.patch" ) - fi - - default - - mkdir -p third_party/node/linux/node-linux-x64/bin || die - ln -s "${EPREFIX}"/usr/bin/node third_party/node/linux/node-linux-x64/bin/node || die - - # adjust python interpreter version - sed -i -e "s|\(^script_executable = \).*|\1\"${EPYTHON}\"|g" .gn || die - - local keeplibs=( - base/third_party/cityhash - base/third_party/double_conversion - base/third_party/dynamic_annotations - base/third_party/icu - base/third_party/nspr - base/third_party/superfasthash - base/third_party/symbolize - base/third_party/valgrind - base/third_party/xdg_user_dirs - buildtools/third_party/libc++ - buildtools/third_party/libc++abi - chrome/third_party/mozilla_security_manager - courgette/third_party - net/third_party/mozilla_security_manager - net/third_party/nss - net/third_party/quic - net/third_party/uri_template - third_party/abseil-cpp - third_party/angle - third_party/angle/src/common/third_party/xxhash - third_party/angle/src/third_party/ceval - third_party/angle/src/third_party/libXNVCtrl - third_party/angle/src/third_party/volk - third_party/anonymous_tokens - third_party/apple_apsl - third_party/axe-core - third_party/blink - third_party/bidimapper - third_party/boringssl - third_party/boringssl/src/third_party/fiat - third_party/breakpad - third_party/breakpad/breakpad/src/third_party/curl - third_party/brotli - third_party/catapult - third_party/catapult/common/py_vulcanize/third_party/rcssmin - third_party/catapult/common/py_vulcanize/third_party/rjsmin - third_party/catapult/third_party/beautifulsoup4-4.9.3 - third_party/catapult/third_party/html5lib-1.1 - third_party/catapult/third_party/polymer - third_party/catapult/third_party/six - third_party/catapult/tracing/third_party/d3 - third_party/catapult/tracing/third_party/gl-matrix - third_party/catapult/tracing/third_party/jpeg-js - third_party/catapult/tracing/third_party/jszip - third_party/catapult/tracing/third_party/mannwhitneyu - third_party/catapult/tracing/third_party/oboe - third_party/catapult/tracing/third_party/pako - third_party/ced - third_party/cld_3 - third_party/closure_compiler - third_party/content_analysis_sdk - third_party/cpuinfo - third_party/crashpad - third_party/crashpad/crashpad/third_party/lss - third_party/crashpad/crashpad/third_party/zlib - third_party/crc32c - third_party/cros_system_api - third_party/d3 - third_party/dav1d - third_party/dawn - third_party/dawn/third_party/gn/webgpu-cts - third_party/dawn/third_party/khronos - third_party/depot_tools - third_party/devscripts - third_party/devtools-frontend - third_party/devtools-frontend/src/front_end/third_party/acorn - third_party/devtools-frontend/src/front_end/third_party/additional_readme_paths.json - third_party/devtools-frontend/src/front_end/third_party/axe-core - third_party/devtools-frontend/src/front_end/third_party/chromium - third_party/devtools-frontend/src/front_end/third_party/codemirror - third_party/devtools-frontend/src/front_end/third_party/csp_evaluator - third_party/devtools-frontend/src/front_end/third_party/diff - third_party/devtools-frontend/src/front_end/third_party/i18n - third_party/devtools-frontend/src/front_end/third_party/intl-messageformat - third_party/devtools-frontend/src/front_end/third_party/lighthouse - third_party/devtools-frontend/src/front_end/third_party/lit - third_party/devtools-frontend/src/front_end/third_party/lodash-isequal - third_party/devtools-frontend/src/front_end/third_party/marked - third_party/devtools-frontend/src/front_end/third_party/puppeteer - third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/mitt - third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs - third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data - third_party/devtools-frontend/src/front_end/third_party/wasmparser - third_party/devtools-frontend/src/test/unittests/front_end/third_party/i18n - third_party/devtools-frontend/src/third_party - third_party/distributed_point_functions - third_party/dom_distiller_js - third_party/eigen3 - third_party/emoji-segmenter - third_party/farmhash - third_party/fdlibm - third_party/ffmpeg - third_party/fft2d - third_party/flatbuffers - third_party/fp16 - third_party/freetype - third_party/fusejs - third_party/fxdiv - third_party/highway - third_party/liburlpattern - third_party/libzip - third_party/lit - third_party/gemmlowp - third_party/google_input_tools - third_party/google_input_tools/third_party/closure_library - third_party/google_input_tools/third_party/closure_library/third_party/closure - third_party/googletest - third_party/hunspell - third_party/iccjpeg - third_party/inspector_protocol - third_party/ipcz - third_party/jinja2 - third_party/jsoncpp - third_party/jstemplate - third_party/khronos - third_party/leveldatabase - third_party/libaddressinput - third_party/libaom - third_party/libaom/source/libaom/third_party/fastfeat - third_party/libaom/source/libaom/third_party/SVT-AV1 - third_party/libaom/source/libaom/third_party/vector - third_party/libaom/source/libaom/third_party/x86inc - third_party/libavif - third_party/libevent - third_party/libgav1 - third_party/libjingle - third_party/libphonenumber - third_party/libsecret - third_party/libsrtp - third_party/libsync - third_party/libudev - third_party/libva_protected_content - third_party/libvpx - third_party/libvpx/source/libvpx/third_party/x86inc - third_party/libwebm - third_party/libx11 - third_party/libxcb-keysyms - third_party/libxml/chromium - third_party/libyuv - third_party/lottie - third_party/lss - third_party/lzma_sdk - third_party/mako - third_party/maldoca - third_party/maldoca/src/third_party/tensorflow_protos - third_party/maldoca/src/third_party/zlibwrapper - third_party/markupsafe - third_party/material_color_utilities - third_party/mesa - third_party/metrics_proto - third_party/minigbm - third_party/modp_b64 - third_party/nasm - third_party/nearby - third_party/neon_2_sse - third_party/node - third_party/omnibox_proto - third_party/one_euro_filter - third_party/openscreen - third_party/openscreen/src/third_party/ - third_party/openscreen/src/third_party/tinycbor/src/src - third_party/opus - third_party/ots - third_party/pdfium - third_party/pdfium/third_party/agg23 - third_party/pdfium/third_party/base - third_party/pdfium/third_party/bigint - third_party/pdfium/third_party/freetype - third_party/pdfium/third_party/lcms - third_party/pdfium/third_party/libopenjpeg - third_party/pdfium/third_party/libtiff - third_party/perfetto - third_party/perfetto/protos/third_party/chromium - third_party/pffft - third_party/ply - third_party/polymer - third_party/private-join-and-compute - third_party/private_membership - third_party/protobuf - third_party/pthreadpool - third_party/puffin - third_party/pyjson5 - third_party/pyyaml - third_party/qcms - third_party/re2 - third_party/rnnoise - third_party/rust - third_party/s2cellid - third_party/securemessage - third_party/selenium-atoms - third_party/shell-encryption - third_party/simplejson - third_party/skia - third_party/skia/include/third_party/vulkan - third_party/skia/third_party/vulkan - third_party/smhasher - third_party/snappy - third_party/sqlite - third_party/swiftshader - third_party/swiftshader/third_party/astc-encoder - third_party/swiftshader/third_party/llvm-subzero - third_party/swiftshader/third_party/marl - third_party/swiftshader/third_party/subzero - third_party/swiftshader/third_party/SPIRV-Headers/include/spirv - third_party/swiftshader/third_party/SPIRV-Tools - third_party/tensorflow_models - third_party/tensorflow-text - third_party/tflite - third_party/tflite/src/third_party/eigen3 - third_party/tflite/src/third_party/fft2d - third_party/tflite/src/third_party/xla/third_party/tsl - third_party/ruy - third_party/six - third_party/ukey2 - third_party/unrar - third_party/utf - third_party/vulkan - third_party/wayland - third_party/webdriver - third_party/webgpu-cts - third_party/webrtc - third_party/webrtc/common_audio/third_party/ooura - third_party/webrtc/common_audio/third_party/spl_sqrt_floor - third_party/webrtc/modules/third_party/fft - third_party/webrtc/modules/third_party/g711 - third_party/webrtc/modules/third_party/g722 - third_party/webrtc/rtc_base/third_party/base64 - third_party/webrtc/rtc_base/third_party/sigslot - third_party/widevine - third_party/woff2 - third_party/wuffs - third_party/x11proto - third_party/xcbproto - third_party/xnnpack - third_party/zxcvbn-cpp - third_party/zlib/google - url/third_party/mozilla - v8/src/third_party/siphash - v8/src/third_party/valgrind - v8/src/third_party/utf8-decoder - v8/third_party/glibc - v8/third_party/inspector_protocol - v8/third_party/v8 - - # gyp -> gn leftovers - third_party/speech-dispatcher - third_party/usb_ids - third_party/xdg-utils - ) - - # USE=system-* - if ! use system-harfbuzz; then - keeplibs+=( third_party/harfbuzz-ng ) - fi - - if ! use system-icu; then - keeplibs+=( third_party/icu ) - fi - - if ! use system-png; then - keeplibs+=( third_party/libpng ) - fi - - if ! use system-zstd; then - keeplibs+=( third_party/zstd ) - fi - - if use libcxx || [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then - keeplibs+=( third_party/libc++ ) - fi - - if ! use system-toolchain || [[ ${CHROMIUM_FORCE_GOOGLE_TOOLCHAIN} == yes ]]; then - keeplibs+=( third_party/llvm ) - fi - - # Arch-specific - if use arm64 || use ppc64 ; then - keeplibs+=( third_party/swiftshader/third_party/llvm-10.0 ) - fi - if use riscv ; then - keeplibs+=( third_party/swiftshader/third_party/llvm-16.0 ) - fi - # we need to generate ppc64 stuff because upstream does not ship it yet - # it has to be done before unbundling. - if use ppc64; then - pushd third_party/libvpx >/dev/null || die - mkdir -p source/config/linux/ppc64 || die - # requires git and clang, bug #832803 - # Revert https://chromium.googlesource.com/chromium/src/+/b463d0f40b08b4e896e7f458d89ae58ce2a27165%5E%21/third_party/libvpx/generate_gni.sh - # and https://chromium.googlesource.com/chromium/src/+/71ebcbce867dd31da5f8b405a28fcb0de0657d91%5E%21/third_party/libvpx/generate_gni.sh - # since we're not in a git repo - sed -i -e "s|^update_readme||g; s|clang-format|${EPREFIX}/bin/true|g; /^git -C/d; /git cl/d; /cd \$BASE_DIR\/\$LIBVPX_SRC_DIR/ign format --in-place \$BASE_DIR\/BUILD.gn\ngn format --in-place \$BASE_DIR\/libvpx_srcs.gni" \ - generate_gni.sh || die - ./generate_gni.sh || die - popd >/dev/null || die - - pushd third_party/ffmpeg >/dev/null || die - cp libavcodec/ppc/h264dsp.c libavcodec/ppc/h264dsp_ppc.c || die - cp libavcodec/ppc/h264qpel.c libavcodec/ppc/h264qpel_ppc.c || die - popd >/dev/null || die - fi - - einfo "Unbundling third-party libraries ..." - # Remove most bundled libraries. Some are still needed. - build/linux/unbundle/remove_bundled_libraries.py "${keeplibs[@]}" --do-remove || die - - # bundled eu-strip is for amd64 only and we don't want to pre-stripped binaries - mkdir -p buildtools/third_party/eu-strip/bin || die - ln -s "${EPREFIX}"/bin/true buildtools/third_party/eu-strip/bin/eu-strip || die -} - -chromium_rust_version_check() { - [[ ${MERGE_TYPE} == binary ]] && return - local rustc_version=( $(eselect --brief rust show 2>/dev/null) ) - rustc_version=${rustc_version[0]#rust-bin-} - rustc_version=${rustc_version#rust-} - - [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output" - - echo $rustc_version -} - -chromium_configure() { - # Calling this here supports resumption via FEATURES=keepwork - python_setup - - local myconf_gn="" - - if use system-toolchain && [[ ${CHROMIUM_FORCE_GOOGLE_TOOLCHAIN} == no ]]; then - # Make sure the build system will use the right tools, bug #340795. - tc-export AR CC CXX NM - - if needs_clang && ! tc-is-clang; then - # Force clang since gcc is either broken or build is using libcxx. - if tc-is-cross-compiler; then - CC="${CBUILD}-clang -target ${CHOST} --sysroot ${ESYSROOT}" - CXX="${CBUILD}-clang++ -target ${CHOST} --sysroot ${ESYSROOT}" - BUILD_CC=${CBUILD}-clang - BUILD_CXX=${CBUILD}-clang++ - else - CC=${CHOST}-clang - CXX=${CHOST}-clang++ - fi - strip-unsupported-flags - fi - - if tc-is-clang; then - myconf_gn+=" is_clang=true clang_use_chrome_plugins=false" - else - myconf_gn+=" is_clang=false" - fi - - if needs_lld ; then - # https://bugs.gentoo.org/918897#c32 - append-ldflags -Wl,--undefined-version - myconf_gn+=" use_lld=true" - else - # This doesn't prevent lld from being used, but rather prevents gn from forcing it - myconf_gn+=" use_lld=false" - fi - - if use lto; then - AR=llvm-ar - NM=llvm-nm - if tc-is-cross-compiler; then - BUILD_AR=llvm-ar - BUILD_NM=llvm-nm - fi - fi - - myconf_gn+=" custom_toolchain=\"//build/toolchain/linux/unbundle:default\"" - - if tc-is-cross-compiler; then - tc-export BUILD_{AR,CC,CXX,NM} - myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:host\"" - myconf_gn+=" v8_snapshot_toolchain=\"//build/toolchain/linux/unbundle:host\"" - myconf_gn+=" pkg_config=\"$(tc-getPKG_CONFIG)\"" - myconf_gn+=" host_pkg_config=\"$(tc-getBUILD_PKG_CONFIG)\"" - - # setup cups-config, build system only uses --libs option - if use cups; then - mkdir "${T}/cups-config" || die - cp "${ESYSROOT}/usr/bin/${CHOST}-cups-config" "${T}/cups-config/cups-config" || die - export PATH="${PATH}:${T}/cups-config" - fi - - # Don't inherit PKG_CONFIG_PATH from environment - local -x PKG_CONFIG_PATH= - else - myconf_gn+=" host_toolchain=\"//build/toolchain/linux/unbundle:default\"" - fi - - local rustc_ver - rustc_ver=$(chromium_rust_version_check) - if ver_test "${rustc_ver}" -lt "${RUST_MIN_VER}"; then - eerror "Rust >=${RUST_MIN_VER} is required" - eerror "Please run 'eselect rust' and select the correct rust version" - die "Selected rust version is too old" - else - einfo "Using rust ${rustc_ver} to build" - fi - if [[ "$(eselect --brief rust show 2>/dev/null)" == *"bin"* ]]; then - myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/opt/rust-bin-${rustc_ver}/\"" - else - myconf_gn+=" rust_sysroot_absolute=\"${EPREFIX}/usr/lib/rust/${rustc_ver}/\"" - fi - myconf_gn+=" rustc_version=\"${rustc_ver}\"" - fi - - # GN needs explicit config for Debug/Release as opposed to inferring it from build directory. - myconf_gn+=" is_debug=false" - - # enable DCHECK with USE=debug only, increases chrome binary size by 30%, bug #811138. - # DCHECK is fatal by default, make it configurable at runtime, #bug 807881. - myconf_gn+=" dcheck_always_on=$(usex debug true false)" - myconf_gn+=" dcheck_is_configurable=$(usex debug true false)" - - # Component build isn't generally intended for use by end users. It's mostly useful - # for development and debugging. - myconf_gn+=" is_component_build=false" - - # Disable nacl, we can't build without pnacl (http://crbug.com/269560). - myconf_gn+=" enable_nacl=false" - - # Use system-provided libraries. - # TODO: freetype -- remove sources (https://bugs.chromium.org/p/pdfium/issues/detail?id=733). - # TODO: use_system_hunspell (upstream changes needed). - # TODO: use_system_protobuf (bug #525560). - # TODO: use_system_sqlite (http://crbug.com/22208). - - # libevent: https://bugs.gentoo.org/593458 - local gn_system_libraries=( - flac - fontconfig - freetype - # Need harfbuzz_from_pkgconfig target - #harfbuzz-ng - libdrm - libjpeg - libwebp - libxml - libxslt - openh264 - zlib - ) - if use system-icu; then - gn_system_libraries+=( icu ) - fi - if use system-png; then - gn_system_libraries+=( libpng ) - fi - if use system-zstd; then - gn_system_libraries+=( zstd ) - fi - - build/linux/unbundle/replace_gn_files.py --system-libraries "${gn_system_libraries[@]}" || die - - # See dependency logic in third_party/BUILD.gn - myconf_gn+=" use_system_harfbuzz=$(usex system-harfbuzz true false)" - - # Optional dependencies. - myconf_gn+=" enable_hangout_services_extension=$(usex hangouts true false)" - myconf_gn+=" enable_widevine=$(usex widevine true false)" - - if use headless; then - myconf_gn+=" use_cups=false" - myconf_gn+=" use_kerberos=false" - myconf_gn+=" use_pulseaudio=false" - myconf_gn+=" use_vaapi=false" - myconf_gn+=" rtc_use_pipewire=false" - else - myconf_gn+=" use_cups=$(usex cups true false)" - myconf_gn+=" use_kerberos=$(usex kerberos true false)" - myconf_gn+=" use_pulseaudio=$(usex pulseaudio true false)" - myconf_gn+=" use_vaapi=$(usex vaapi true false)" - myconf_gn+=" rtc_use_pipewire=$(usex screencast true false)" - myconf_gn+=" gtk_version=$(usex gtk4 4 3)" - fi - - # Allows distributions to link pulseaudio directly (DT_NEEDED) instead of - # using dlopen. This helps with automated detection of ABI mismatches and - # prevents silent errors. - if use pulseaudio; then - myconf_gn+=" link_pulseaudio=true" - fi - - # Non-developer builds of Chromium (for example, non-Chrome browsers, or - # Chromium builds provided by Linux distros) should disable the testing config - myconf_gn+=" disable_fieldtrial_testing_config=true" - - if use system-toolchain; then - myconf_gn+=" use_gold=false" - fi - - # The sysroot is the oldest debian image that chromium supports, we don't need it - myconf_gn+=" use_sysroot=false" - - # This determines whether or not GN uses the bundled libcxx - # default: true - if use libcxx || [[ ${CHROMIUM_FORCE_LIBCXX} == yes ]]; then - myconf_gn+=" use_custom_libcxx=true" - else - myconf_gn+=" use_custom_libcxx=false" - fi - - # Disable pseudolocales, only used for testing - myconf_gn+=" enable_pseudolocales=false" - - # Disable code formating of generated files - myconf_gn+=" blink_enable_generated_code_formatting=false" - - if use bindist ; then - # proprietary_codecs just forces Chromium to say that it can use h264/aac, - # the work is still done by ffmpeg. If this is set to no Chromium - # won't be able to load the codec even if the library can handle it - myconf_gn+=" proprietary_codecs=true" - myconf_gn+=" ffmpeg_branding=\"Chrome\"" - # build ffmpeg as an external component (libffmpeg.so) that we can remove / substitute - myconf_gn+=" is_component_ffmpeg=true" - else - ffmpeg_branding="$(usex proprietary-codecs Chrome Chromium)" - myconf_gn+=" proprietary_codecs=$(usex proprietary-codecs true false)" - myconf_gn+=" ffmpeg_branding=\"${ffmpeg_branding}\"" - fi - - # Set up Google API keys, see http://www.chromium.org/developers/how-tos/api-keys . - # Note: these are for Gentoo use ONLY. For your own distribution, - # please get your own set of keys. Feel free to contact chromium@gentoo.org - # for more info. The OAuth2 credentials, however, have been left out. - # Those OAuth2 credentials have been broken for quite some time anyway. - # Instead we apply a patch to use the --oauth2-client-id= and - # --oauth2-client-secret= switches for setting GOOGLE_DEFAULT_CLIENT_ID and - # GOOGLE_DEFAULT_CLIENT_SECRET at runtime. This allows signing into - # Chromium without baked-in values. - local google_api_key="AIzaSyDEAOvatFo0eTgsV_ZlEzx0ObmepsMzfAc" - myconf_gn+=" google_api_key=\"${google_api_key}\"" - local myarch="$(tc-arch)" - - # Avoid CFLAGS problems, bug #352457, bug #390147. - if ! use custom-cflags; then - replace-flags "-Os" "-O2" - strip-flags - - # Debug info section overflows without component build - # Prevent linker from running out of address space, bug #471810 . - filter-flags "-g*" - - # Prevent libvpx/xnnpack build failures. Bug 530248, 544702, 546984, 853646. - if [[ ${myarch} == amd64 ]]; then - filter-flags -mno-mmx -mno-sse2 -mno-ssse3 -mno-sse4.1 -mno-avx -mno-avx2 -mno-fma -mno-fma4 -mno-xop -mno-sse4a - fi - - if tc-is-gcc; then - # https://bugs.gentoo.org/904455 - local -x CPP="$(tc-getCXX) -E" - # https://bugs.gentoo.org/912381 - filter-lto - fi - fi - - if [[ $myarch = amd64 ]] ; then - myconf_gn+=" target_cpu=\"x64\"" - ffmpeg_target_arch=x64 - elif [[ $myarch = arm64 ]] ; then - myconf_gn+=" target_cpu=\"arm64\"" - ffmpeg_target_arch=arm64 - elif [[ $myarch = ppc64 ]] ; then - myconf_gn+=" target_cpu=\"ppc64\"" - ffmpeg_target_arch=ppc64 - elif [[ $myarch = riscv ]] ; then - myconf_gn+=" target_cpu=\"riscv64\"" - ffmpeg_target_arch=riscv64 - else - die "Failed to determine target arch, got '$myarch'." - fi - - # Make sure that -Werror doesn't get added to CFLAGS by the build system. - # Depending on GCC version the warnings are different and we don't want - # the build to fail because of that. - myconf_gn+=" treat_warnings_as_errors=false" - - # Disable fatal linker warnings, bug 506268. - myconf_gn+=" fatal_linker_warnings=false" - - # Disable external code space for V8 for ppc64. It is disabled for ppc64 - # by default, but cross-compiling on amd64 enables it again. - if tc-is-cross-compiler; then - if ! use amd64 && ! use arm64; then - myconf_gn+=" v8_enable_external_code_space=false" - fi - fi - - # Only enabled for clang, but gcc has endian macros too - myconf_gn+=" v8_use_libm_trig_functions=true" - - # Bug 491582. - export TMPDIR="${WORKDIR}/temp" - mkdir -p -m 755 "${TMPDIR}" || die - - # https://bugs.gentoo.org/654216 - addpredict /dev/dri/ #nowarn - - # Disable unknown warning message from clang. - if tc-is-clang; then - append-flags -Wno-unknown-warning-option - if tc-is-cross-compiler; then - export BUILD_CXXFLAGS+=" -Wno-unknown-warning-option" - export BUILD_CFLAGS+=" -Wno-unknown-warning-option" - fi - fi - - # Explicitly disable ICU data file support for system-icu/headless builds. - if use system-icu || use headless; then - myconf_gn+=" icu_use_data_file=false" - fi - - # Don't need nocompile checks and GN crashes with our config - myconf_gn+=" enable_nocompile_tests=false" - - # Enable ozone wayland and/or headless support - myconf_gn+=" use_ozone=true ozone_auto_platforms=false" - myconf_gn+=" ozone_platform_headless=true" - if use headless; then - myconf_gn+=" ozone_platform=\"headless\"" - myconf_gn+=" use_xkbcommon=false use_gtk=false use_qt=false" - myconf_gn+=" use_glib=false use_gio=false" - myconf_gn+=" use_pangocairo=false use_alsa=false" - myconf_gn+=" use_libpci=false use_udev=false" - myconf_gn+=" enable_print_preview=false" - myconf_gn+=" enable_remoting=false" - else - myconf_gn+=" use_system_libdrm=true" - myconf_gn+=" use_system_minigbm=true" - myconf_gn+=" use_xkbcommon=true" - if use qt5 || use qt6; then - local cbuild_libdir=$(get_libdir) - if tc-is-cross-compiler; then - # Hack to workaround get_libdir not being able to handle CBUILD, bug #794181 - local cbuild_libdir=$($(tc-getBUILD_PKG_CONFIG) --keep-system-libs --libs-only-L libxslt) - cbuild_libdir=${cbuild_libdir:2} - cbuild_libdir=${cbuild_libdir/% } - fi - if use qt5; then - if tc-is-cross-compiler; then - myconf_gn+=" moc_qt5_path=\"${EPREFIX}/${cbuild_libdir}/qt5/bin\"" - else - myconf_gn+=" moc_qt5_path=\"$(qt5_get_bindir)\"" - fi - fi - if use qt6; then - myconf_gn+=" moc_qt6_path=\"${EPREFIX}/usr/${cbuild_libdir}/qt6/libexec\"" - fi - - myconf_gn+=" use_qt=true" - myconf_gn+=" use_qt6=$(usex qt6 true false)" - else - myconf_gn+=" use_qt=false" - fi - myconf_gn+=" ozone_platform_x11=$(usex X true false)" - myconf_gn+=" ozone_platform_wayland=$(usex wayland true false)" - myconf_gn+=" ozone_platform=$(usex wayland \"wayland\" \"x11\")" - use wayland && myconf_gn+=" use_system_libffi=true" - fi - - # Results in undefined references in chrome linking, may require CFI to work - if use arm64; then - myconf_gn+=" arm_control_flow_integrity=\"none\"" - fi - - # Enable official builds - myconf_gn+=" is_official_build=$(usex official true false)" - myconf_gn+=" use_thin_lto=$(usex lto true false)" - myconf_gn+=" thin_lto_enable_optimizations=$(usex lto true false)" - if use official; then - # Allow building against system libraries in official builds - sed -i 's/OFFICIAL_BUILD/GOOGLE_CHROME_BUILD/' \ - tools/generate_shim_headers/generate_shim_headers.py || die - # Disable CFI: unsupported for GCC, requires clang+lto+lld - myconf_gn+=" is_cfi=false" - # Don't add symbols to build - myconf_gn+=" symbol_level=0" - fi - - if use pgo; then - myconf_gn+=" chrome_pgo_phase=${1}" - if [[ "$1" == "2" ]]; then - myconf_gn+=" pgo_data_path=\"${2}\"" - fi - else - # Disable PGO - myconf_gn+=" chrome_pgo_phase=0" - fi - - # user CXXFLAGS might overwrite -march=armv8-a+crc+crypto, bug #851639 - if use arm64 && tc-is-gcc; then - sed -i '/^#if HAVE_ARM64_CRC32C/a #pragma GCC target ("+crc+crypto")' \ - third_party/crc32c/src/src/crc32c_arm64.cc || die - fi - - # skipping typecheck is only supported on amd64, bug #876157 - if ! use amd64; then - myconf_gn+=" devtools_skip_typecheck=false" - fi - - einfo "Configuring Chromium ..." - set -- gn gen --args="${myconf_gn} ${EXTRA_GN}" out/Release - echo "$@" - "$@" || die -} - -src_configure() { - chromium_configure $(usex pgo 1 0) -} - -chromium_compile() { - # Final link uses lots of file descriptors. - ulimit -n 2048 - - # Calling this here supports resumption via FEATURES=keepwork - python_setup - - # Don't inherit PYTHONPATH from environment, bug #789021, #812689 - local -x PYTHONPATH= - - # Build mksnapshot and pax-mark it. - if use pax-kernel; then - local x - for x in mksnapshot v8_context_snapshot_generator; do - if tc-is-cross-compiler; then - eninja -C out/Release "host/${x}" - pax-mark m "out/Release/host/${x}" - else - eninja -C out/Release "${x}" - pax-mark m "out/Release/${x}" - fi - done - fi - - # Even though ninja autodetects number of CPUs, we respect - # user's options, for debugging with -j 1 or any other reason. - eninja -C out/Release chrome chromedriver chrome_sandbox - - pax-mark m out/Release/chrome - - if ! use system-toolchain; then - QA_FLAGS_IGNORED=" - usr/lib64/chromium-browser/chrome - usr/lib64/chromium-browser/chrome-sandbox - usr/lib64/chromium-browser/chromedriver - usr/lib64/chromium-browser/chrome_crashpad_handler - usr/lib64/chromium-browser/libEGL.so - usr/lib64/chromium-browser/libGLESv2.so - usr/lib64/chromium-browser/libVkICD_mock_icd.so - usr/lib64/chromium-browser/libVkLayer_khronos_validation.so - usr/lib64/chromium-browser/libqt5_shim.so - usr/lib64/chromium-browser/libvk_swiftshader.so - usr/lib64/chromium-browser/libvulkan.so.1 - " - fi -} - -# This function is called from virtx, and must always return so that Xvfb -# session isn't left running. If we return 1, virtx will call die(). -chromium_profile() { - einfo "Profiling for PGO" - - pushd "${WORKDIR}/chromium-profiler-"* >/dev/null || return 1 - - # Remove old profdata in case profiling was interrupted. - rm -rf "${1}" || return 1 - - if ! "${EPYTHON}" ./chromium_profiler.py \ - --chrome-executable "${S}/out/Release/chrome" \ - --chromedriver-executable "${S}/out/Release/chromedriver.unstripped" \ - --add-arg no-sandbox --add-arg disable-dev-shm-usage \ - --profile-output "${1}"; then - eerror "Profiling failed" - return 1 - fi - - popd >/dev/null || return 1 -} - -src_compile() { - if use pgo; then - local profdata - - profdata="${WORKDIR}/chromium.profdata" - - if [[ ! -e "${WORKDIR}/.pgo-profiled" ]]; then - chromium_compile - virtx chromium_profile "$profdata" - - touch "${WORKDIR}/.pgo-profiled" || die - fi - - if [[ ! -e "${WORKDIR}/.pgo-phase-2-configured" ]]; then - # Remove phase 1 output - rm -r out/Release || die - - chromium_configure 2 "$profdata" - - touch "${WORKDIR}/.pgo-phase-2-configured" || die - fi - - if [[ ! -e "${WORKDIR}/.pgo-phase-2-compiled" ]]; then - chromium_compile - touch "${WORKDIR}/.pgo-phase-2-compiled" || die - fi - else - chromium_compile - fi - - mv out/Release/chromedriver{.unstripped,} || die - - rm -f out/Release/locales/*.pak.info || die - - # Build manpage; bug #684550 - sed -e 's|@@PACKAGE@@|chromium-browser|g; - s|@@MENUNAME@@|Chromium|g;' \ - chrome/app/resources/manpage.1.in > \ - out/Release/chromium-browser.1 || die - - # Build desktop file; bug #706786 - sed -e 's|@@MENUNAME@@|Chromium|g; - s|@@USR_BIN_SYMLINK_NAME@@|chromium-browser|g; - s|@@PACKAGE@@|chromium-browser|g; - s|\(^Exec=\)/usr/bin/|\1|g;' \ - chrome/installer/linux/common/desktop.template > \ - out/Release/chromium-browser-chromium.desktop || die - - # Build vk_swiftshader_icd.json; bug #827861 - sed -e 's|${ICD_LIBRARY_PATH}|./libvk_swiftshader.so|g' \ - third_party/swiftshader/src/Vulkan/vk_swiftshader_icd.json.tmpl > \ - out/Release/vk_swiftshader_icd.json || die -} - -src_install() { - local CHROMIUM_HOME="/usr/$(get_libdir)/chromium-browser" - exeinto "${CHROMIUM_HOME}" - doexe out/Release/chrome - - newexe out/Release/chrome_sandbox chrome-sandbox - fperms 4755 "${CHROMIUM_HOME}/chrome-sandbox" - - doexe out/Release/chromedriver - doexe out/Release/chrome_crashpad_handler - - ozone_auto_session () { - use X && use wayland && ! use headless && echo true || echo false - } - local sedargs=( -e - "s:/usr/lib/:/usr/$(get_libdir)/:g; - s:@@OZONE_AUTO_SESSION@@:$(ozone_auto_session):g" - ) - sed "${sedargs[@]}" "${FILESDIR}/chromium-launcher-r7.sh" > chromium-launcher.sh || die - doexe chromium-launcher.sh - - # It is important that we name the target "chromium-browser", - # xdg-utils expect it; bug #355517. - dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium-browser - # keep the old symlink around for consistency - dosym "${CHROMIUM_HOME}/chromium-launcher.sh" /usr/bin/chromium - - dosym "${CHROMIUM_HOME}/chromedriver" /usr/bin/chromedriver - - # Allow users to override command-line options, bug #357629. - insinto /etc/chromium - newins "${FILESDIR}/chromium.default" "default" - - pushd out/Release/locales > /dev/null || die - chromium_remove_language_paks - popd - - insinto "${CHROMIUM_HOME}" - doins out/Release/*.bin - doins out/Release/*.pak - - if use bindist; then - # We built libffmpeg as a component library, but we can't distribute it - # with proprietary codec support. Remove it and make a symlink to the requested - # system library. - rm -f out/Release/libffmpeg.so \ - || die "Failed to remove bundled libffmpeg.so (with proprietary codecs)" - # symlink the libffmpeg.so from either ffmpeg-chromium or ffmpeg[chromium]. - einfo "Creating symlink to libffmpeg.so from $(usex ffmpeg-chromium ffmpeg-chromium ffmpeg[chromium])..." - dosym ../chromium/libffmpeg.so$(usex ffmpeg-chromium .${PV%%\.*} "") \ - /usr/$(get_libdir)/chromium-browser/libffmpeg.so - fi - - ( - shopt -s nullglob - local files=(out/Release/*.so out/Release/*.so.[0-9]) - [[ ${#files[@]} -gt 0 ]] && doins "${files[@]}" - ) - - # Install bundled xdg-utils, avoids installing X11 libraries with USE="-X wayland" - doins out/Release/xdg-{settings,mime} - - if ! use system-icu && ! use headless; then - doins out/Release/icudtl.dat - fi - - doins -r out/Release/locales - doins -r out/Release/MEIPreload - - # Install vk_swiftshader_icd.json; bug #827861 - doins out/Release/vk_swiftshader_icd.json - - if [[ -d out/Release/swiftshader ]]; then - insinto "${CHROMIUM_HOME}/swiftshader" - doins out/Release/swiftshader/*.so - fi - - # Install icons - local branding size - for size in 16 24 32 48 64 128 256 ; do - case ${size} in - 16|32) branding="chrome/app/theme/default_100_percent/chromium" ;; - *) branding="chrome/app/theme/chromium" ;; - esac - newicon -s ${size} "${branding}/product_logo_${size}.png" \ - chromium-browser.png - done - - # Install desktop entry - domenu out/Release/chromium-browser-chromium.desktop - - # Install GNOME default application entry (bug #303100). - insinto /usr/share/gnome-control-center/default-apps - newins "${FILESDIR}"/chromium-browser.xml chromium-browser.xml - - # Install manpage; bug #684550 - doman out/Release/chromium-browser.1 - dosym chromium-browser.1 /usr/share/man/man1/chromium.1 - - readme.gentoo_create_doc -} - -pkg_postrm() { - xdg_icon_cache_update - xdg_desktop_database_update -} - -pkg_postinst() { - xdg_icon_cache_update - xdg_desktop_database_update - readme.gentoo_print_elog - - if ! use headless; then - if use vaapi; then - elog "VA-API is disabled by default at runtime. You have to enable it" - elog "by adding --enable-features=VaapiVideoDecoder to CHROMIUM_FLAGS" - elog "in /etc/chromium/default." - fi - if use screencast; then - elog "Screencast is disabled by default at runtime. Either enable it" - elog "by navigating to chrome://flags/#enable-webrtc-pipewire-capturer" - elog "inside Chromium or add --enable-features=WebRTCPipeWireCapturer" - elog "to CHROMIUM_FLAGS in /etc/chromium/default." - fi - if use gtk4; then - elog "Chromium prefers GTK3 over GTK4 at runtime. To override this" - elog "behavior you need to pass --gtk-version=4, e.g. by adding it" - elog "to CHROMIUM_FLAGS in /etc/chromium/default." - fi - if use qt5 && use qt6; then - elog "Chromium automatically selects Qt5 or Qt6 based on your desktop" - elog "environment. To override you need to pass --qt-version=5 or" - elog "--qt-version=6, e.g. by adding it to CHROMIUM_FLAGS in" - elog "/etc/chromium/default." - fi - fi -} diff --git a/www-client/chromium/chromium-123.0.6312.122.ebuild b/www-client/chromium/chromium-126.0.6478.114.ebuild index d9b1d00..6416959 100644 --- a/www-client/chromium/chromium-123.0.6312.122.ebuild +++ b/www-client/chromium/chromium-126.0.6478.114.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{11..12} ) +PYTHON_COMPAT=( python3_{11..13} ) PYTHON_REQ_USE="xml(+)" # PACKAGING NOTES @@ -36,15 +36,15 @@ PYTHON_REQ_USE="xml(+)" # These variables let us easily bound supported major dependency versions in one place. GCC_MIN_VER=12 -GN_MIN_VER=0.2154 +GN_MIN_VER=0.2165 # Since Google use prerelease llvm we can let any adventurous users try to build with prerelease # ebuilds; try to keep this up to date with the latest version in the tree. LLVM_MAX_SLOT=19 LLVM_MIN_SLOT=17 RUST_MIN_VER=1.72.0 # chromium-tools/get-chromium-toolchain-strings.sh -GOOGLE_CLANG_VER=llvmorg-19-init-2319-g7c4c2746-1 -GOOGLE_RUST_VER=340bb19fea20fd5f9357bbfac542fad84fc7ea2b-3 +GOOGLE_CLANG_VER=llvmorg-19-init-9433-g76ea5feb-1 +GOOGLE_RUST_VER=31e6e8c6c5b6ce62656c922c7384d3376018c980-2 # https://bugs.chromium.org/p/v8/issues/detail?id=14449 - V8 used in 120 can't build with GCC # Resolved upstream, requires testing and some backporting I'm sure @@ -64,11 +64,11 @@ CHROMIUM_LANGS="af am ar bg bn ca cs da de el en-GB es es-419 et fa fi fil fr gu sv sw ta te th tr uk ur vi zh-CN zh-TW" inherit check-reqs chromium-2 desktop flag-o-matic llvm ninja-utils pax-utils -inherit python-any-r1 qmake-utils readme.gentoo-r1 toolchain-funcs virtualx xdg-utils +inherit python-any-r1 qmake-utils readme.gentoo-r1 systemd toolchain-funcs virtualx xdg-utils DESCRIPTION="Open-source version of Google Chrome web browser" HOMEPAGE="https://www.chromium.org/" -PATCHSET_PPC64="123.0.6312.105-1raptor0~deb12u1" +PATCHSET_PPC64="126.0.6478.56-1raptor0~deb12u2" PATCH_V="${PV%%\.*}" SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P}.tar.xz system-toolchain? ( @@ -88,7 +88,7 @@ SRC_URI="https://commondatastorage.googleapis.com/chromium-browser-official/${P} LICENSE="BSD" SLOT="0/stable" -KEYWORDS="~amd64 arm64 ~ppc64 ~riscv" +KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv" IUSE_SYSTEM_LIBS="+system-harfbuzz +system-icu +system-png +system-zstd" IUSE="+X ${IUSE_SYSTEM_LIBS} bindist cups debug ffmpeg-chromium gtk4 +hangouts headless kerberos libcxx lto +official pax-kernel pgo +proprietary-codecs pulseaudio" IUSE+=" qt5 qt6 +screencast selinux +system-toolchain +vaapi +wayland +widevine" @@ -250,8 +250,8 @@ BDEPEND=" >=virtual/rust-${RUST_MIN_VER}[profiler(-)] ) >=dev-build/gn-${GN_MIN_VER} + dev-build/ninja dev-lang/perl - >=dev-build/ninja-1.7.2 >=dev-util/gperf-3.0.3 dev-vcs/git >=net-libs/nodejs-7.6.0[inspector] @@ -336,7 +336,7 @@ pre_build_checks() { # Check build requirements: bugs #471810, #541816, #914220 # We're going to start doing maths here on the size of an unpacked source tarball, # this should make updates easier as chromium continues to balloon in size. - local BASE_DISK=18 + local BASE_DISK=22 local EXTRA_DISK=1 local CHECKREQS_MEMORY="4G" tc-is-cross-compiler && EXTRA_DISK=2 @@ -422,22 +422,20 @@ src_prepare() { "chrome/browser/media/router/media_router_feature.cc" || die local PATCHES=( - "${FILESDIR}/chromium-cross-compile.patch" - "${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch" "${FILESDIR}/chromium-109-system-zlib.patch" "${FILESDIR}/chromium-111-InkDropHost-crash.patch" - "${FILESDIR}/chromium-117-system-zstd.patch" - "${FILESDIR}/chromium-124-libwebp-shim-sharpyuv.patch" - "${FILESDIR}/chromium-123-qt-gui-check.patch" - "${FILESDIR}/00swiftshader-MCDissassembler.patch" - "${FILESDIR}/00swiftshader-use-llvm16.patch" - "${FILESDIR}/01fix-rust-target.patch" - "${FILESDIR}/02Debian-fix-rust-linking.patch" - "${FILESDIR}/03riscv-dav1d.patch" - "${FILESDIR}/05riscv-sandbox.patch" - "${FILESDIR}/06riscv-ffmpeg.patch" - "${FILESDIR}/09riscv.patch" - "${FILESDIR}/10cpuinfo.patch" + "${FILESDIR}/chromium-125-system-zstd.patch" + "${FILESDIR}/chromium-126-oauth2-client-switches.patch" + "${FILESDIR}/chromium-cross-compile.patch" + "${FILESDIR}/swiftshader-MCDissassembler.patch" + "${FILESDIR}/swiftshader-use-llvm16.patch" + "${FILESDIR}/fix-rust-target.patch" + "${FILESDIR}/Debian-fix-rust-linking.patch" + "${FILESDIR}/riscv-dav1d.patch" + "${FILESDIR}/riscv-sandbox.patch" + "${FILESDIR}/riscv-ffmpeg.patch" + "${FILESDIR}/riscv.patch" + "${FILESDIR}/cpuinfo.patch" ) if use system-toolchain; then @@ -467,7 +465,6 @@ src_prepare() { done PATCHES+=( "${WORKDIR}/ppc64le" ) PATCHES+=( "${WORKDIR}/debian/patches/fixes/rust-clanglib.patch" ) - PATCHES+=( "${WORKDIR}/debian/patches/fixes/blink-fonts-shape-result.patch" ) fi default @@ -481,7 +478,6 @@ src_prepare() { local keeplibs=( base/third_party/cityhash base/third_party/double_conversion - base/third_party/dynamic_annotations base/third_party/icu base/third_party/nspr base/third_party/superfasthash @@ -562,7 +558,6 @@ src_prepare() { third_party/devtools-frontend/src/front_end/third_party/puppeteer/package/lib/esm/third_party/rxjs third_party/devtools-frontend/src/front_end/third_party/vscode.web-custom-data third_party/devtools-frontend/src/front_end/third_party/wasmparser - third_party/devtools-frontend/src/test/unittests/front_end/third_party/i18n third_party/devtools-frontend/src/third_party third_party/distributed_point_functions third_party/dom_distiller_js @@ -594,6 +589,7 @@ src_prepare() { third_party/jsoncpp third_party/jstemplate third_party/khronos + third_party/lens_server_proto third_party/leveldatabase third_party/libaddressinput third_party/libaom @@ -644,7 +640,6 @@ src_prepare() { third_party/ots third_party/pdfium third_party/pdfium/third_party/agg23 - third_party/pdfium/third_party/base third_party/pdfium/third_party/bigint third_party/pdfium/third_party/freetype third_party/pdfium/third_party/lcms @@ -669,6 +664,8 @@ src_prepare() { third_party/s2cellid third_party/securemessage third_party/selenium-atoms + third_party/sentencepiece + third_party/sentencepiece/src/third_party/darts_clone third_party/shell-encryption third_party/simplejson third_party/skia @@ -690,6 +687,7 @@ src_prepare() { third_party/tflite/src/third_party/eigen3 third_party/tflite/src/third_party/fft2d third_party/tflite/src/third_party/xla/third_party/tsl + third_party/tflite/src/third_party/xla/xla/tsl/util third_party/ruy third_party/six third_party/ukey2 @@ -827,6 +825,12 @@ chromium_configure() { if tc-is-clang; then myconf_gn+=" is_clang=true clang_use_chrome_plugins=false" + # Workaround for build failure with clang-18 and -march=native without + # avx512. Does not affect e.g. -march=skylake, only native (bug #931623). + use amd64 && is-flagq -march=native && + [[ $(clang-major-version) -eq 18 ]] && [[ $(clang-minor-version) -lt 6 ]] && + tc-cpp-is-true "!defined(__AVX512F__)" ${CXXFLAGS} && + append-flags -mevex512 else myconf_gn+=" is_clang=false" fi @@ -1051,7 +1055,7 @@ chromium_configure() { elif [[ $myarch = riscv ]] ; then myconf_gn+=" target_cpu=\"riscv64\"" ffmpeg_target_arch=riscv64 - else + else die "Failed to determine target arch, got '$myarch'." fi @@ -1452,4 +1456,12 @@ pkg_postinst() { elog "/etc/chromium/default." fi fi + + if systemd_is_booted && ! [[ -f "/etc/machine-id" ]]; then + ewarn "The lack of an '/etc/machine-id' file on this system booted with systemd" + ewarn "indicates that the Gentoo handbook was not followed to completion." + ewarn "" + ewarn "Chromium is known to behave unpredictably with this system configuration;" + ewarn "please complete the configuration of this system before logging any bugs." + fi } diff --git a/www-client/chromium/files/02Debian-fix-rust-linking.patch b/www-client/chromium/files/Debian-fix-rust-linking.patch index 0f6de73..0f6de73 100644 --- a/www-client/chromium/files/02Debian-fix-rust-linking.patch +++ b/www-client/chromium/files/Debian-fix-rust-linking.patch diff --git a/www-client/chromium/files/chromium-125-ninja-1-12.patch b/www-client/chromium/files/chromium-125-ninja-1-12.patch new file mode 100644 index 0000000..55d0887 --- /dev/null +++ b/www-client/chromium/files/chromium-125-ninja-1-12.patch @@ -0,0 +1,17 @@ +https://chromium-review.googlesource.com/c/chromium/src/+/5487538 +commit a976cb05b4024b7a6452d1541378d718cdfe33e6 +Author: Takuto Ikuta <tikuta@chromium.org> +Date: Thu Apr 25 07:25:32 2024 + + [devtools] fix a missing build dependency to a generated file + +--- a/chrome/browser/devtools/BUILD.gn ++++ b/chrome/browser/devtools/BUILD.gn +@@ -117,6 +117,7 @@ + "//chrome/browser/autofill:autofill", + "//components/autofill/content/browser:browser", + "//components/autofill/core/browser:browser", ++ "//components/enterprise/buildflags", + "//components/paint_preview/buildflags:buildflags", + "//components/variations/service:service", + "//components/webapps/common:common", diff --git a/www-client/chromium/files/chromium-125-oauth2-client-switches.patch b/www-client/chromium/files/chromium-125-oauth2-client-switches.patch new file mode 100644 index 0000000..6c7f56b --- /dev/null +++ b/www-client/chromium/files/chromium-125-oauth2-client-switches.patch @@ -0,0 +1,45 @@ +From 6a84205d0399a94e8b526176a7dcafd6c2051a95 Mon Sep 17 00:00:00 2001 +From: Matt Jolly <Matt.Jolly@footclan.ninja> +Date: Thu, 18 Apr 2024 21:15:20 +1000 +Subject: [PATCH] www-client/chromium: work around dead oauth2 credentials - + 125 update + +125 moved the content to a new file. + +Google doesn't let us bake in OAuth2 credentials, and for some time, +Google sign-in has been broken. Arch dealt with this in March, and so +did we to some degree, but in the last few months, our sign-in +credentials have been broken. It appears that we actually did remove API +credentials in March around Chrome 89, but they got added back, perhaps +when rotating newer versions to replace older versions. Work around this +by following Arch's lead: we remove the predefined credentials, as +before, but also we patch Chromium so that people can use their own +easily, using Arch's patch for that. + +For more info, see: + +https://archlinux.org/news/chromium-losing-sync-support-in-early-march/ +https://bodhi.fedoraproject.org/updates/FEDORA-2021-48866282e5 +https://hackaday.com/2021/01/26/whats-the-deal-with-chromium-on-linux-google-at-odds-with-package-maintainers/ + +Bug: https://bugs.gentoo.org/791871 +Signed-off-by: Matt Jolly <kangie@gentoo.org> +--- a/google_apis/google_api_keys-inc.cc ++++ b/google_apis/google_api_keys-inc.cc +@@ -182,11 +182,11 @@ class APIKeyCache { + + std::string default_client_id = CalculateKeyValue( + GOOGLE_DEFAULT_CLIENT_ID, +- STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), nullptr, ++ STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), ::switches::kOAuth2ClientID, + std::string(), environment.get(), command_line, gaia_config); + std::string default_client_secret = CalculateKeyValue( + GOOGLE_DEFAULT_CLIENT_SECRET, +- STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), nullptr, ++ STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), ::switches::kOAuth2ClientSecret, + std::string(), environment.get(), command_line, gaia_config); + + // We currently only allow overriding the baked-in values for the +-- +2.44.0 + diff --git a/www-client/chromium/files/chromium-125-system-zstd.patch b/www-client/chromium/files/chromium-125-system-zstd.patch new file mode 100644 index 0000000..6211662 --- /dev/null +++ b/www-client/chromium/files/chromium-125-system-zstd.patch @@ -0,0 +1,53 @@ +From 4ac5e29c999c7bbcb8409a2008b0061e1ae365dd Mon Sep 17 00:00:00 2001 +From: Matt Jolly <Matt.Jolly@footclan.ninja> +Date: Thu, 18 Apr 2024 21:54:54 +1000 +Subject: [PATCH] Zstd now needs compress, too + +Existing patch updated for 125, added source_set("compress") + +--- a/build/linux/unbundle/replace_gn_files.py ++++ b/build/linux/unbundle/replace_gn_files.py +@@ -80,6 +80,7 @@ REPLACEMENTS = { + 'vulkan_memory_allocator' : 'third_party/vulkan_memory_allocator/BUILD.gn', + 'woff2': 'third_party/woff2/BUILD.gn', + 'zlib': 'third_party/zlib/BUILD.gn', ++ 'zstd': 'third_party/zstd/BUILD.gn', + } + + +--- /dev/null ++++ b/build/linux/unbundle/zstd.gn +@@ -0,0 +1,30 @@ ++import("//build/config/linux/pkg_config.gni") ++import("//build/shim_headers.gni") ++ ++pkg_config("system_zstd") { ++ packages = [ "libzstd" ] ++} ++ ++shim_headers("zstd_shim") { ++ root_path = "src/lib" ++ headers = [ ++ "zdict.h", ++ "zstd.h", ++ "zstd_errors.h", ++ ] ++} ++ ++source_set("zstd") { ++ deps = [ ":zstd_shim" ] ++ public_configs = [ ":system_zstd" ] ++} ++ ++source_set("compress") { ++ deps = [ ":zstd_shim" ] ++ public_configs = [ ":system_zstd" ] ++} ++ ++source_set("decompress") { ++ deps = [ ":zstd_shim" ] ++ public_configs = [ ":system_zstd" ] ++} +-- +2.44.0 + diff --git a/www-client/chromium/files/chromium-126-oauth2-client-switches.patch b/www-client/chromium/files/chromium-126-oauth2-client-switches.patch new file mode 100644 index 0000000..b7ddf79 --- /dev/null +++ b/www-client/chromium/files/chromium-126-oauth2-client-switches.patch @@ -0,0 +1,45 @@ +From b6cda4bc2283a02a5b5209c0f4282a8365f6f33e Mon Sep 17 00:00:00 2001 +From: Matt Jolly <Matt.Jolly@footclan.ninja> +Date: Tue, 21 May 2024 10:04:24 +1000 +Subject: [PATCH] www-client/chromium: work around dead oauth2 credentials - + 126 update + +126 changed the function proto; patch rebased. + +Google doesn't let us bake in OAuth2 credentials, and for some time, +Google sign-in has been broken. Arch dealt with this in March, and so +did we to some degree, but in the last few months, our sign-in +credentials have been broken. It appears that we actually did remove API +credentials in March around Chrome 89, but they got added back, perhaps +when rotating newer versions to replace older versions. Work around this +by following Arch's lead: we remove the predefined credentials, as +before, but also we patch Chromium so that people can use their own +easily, using Arch's patch for that. + +For more info, see: + +https://archlinux.org/news/chromium-losing-sync-support-in-early-march/ +https://bodhi.fedoraproject.org/updates/FEDORA-2021-48866282e5 +https://hackaday.com/2021/01/26/whats-the-deal-with-chromium-on-linux-google-at-odds-with-package-maintainers/ + +Bug: https://bugs.gentoo.org/791871 +Signed-off-by: Matt Jolly <kangie@gentoo.org> +--- a/google_apis/google_api_keys-inc.cc ++++ b/google_apis/google_api_keys-inc.cc +@@ -193,11 +193,11 @@ class APIKeyCache { + std::string default_client_id = CalculateKeyValue( + GOOGLE_DEFAULT_CLIENT_ID, + STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), std::string(), +- nullptr, std::string(), environment.get(), command_line, gaia_config); ++ ::switches::kOAuth2ClientID, std::string(), environment.get(), command_line, gaia_config); + std::string default_client_secret = CalculateKeyValue( + GOOGLE_DEFAULT_CLIENT_SECRET, + STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), std::string(), +- nullptr, std::string(), environment.get(), command_line, gaia_config); ++ ::switches::kOAuth2ClientSecret, std::string(), environment.get(), command_line, gaia_config); + + // We currently only allow overriding the baked-in values for the + // default OAuth2 client ID and secret using a command-line +-- +2.45.1 + diff --git a/www-client/chromium/files/10cpuinfo.patch b/www-client/chromium/files/cpuinfo.patch index 942a658..942a658 100644 --- a/www-client/chromium/files/10cpuinfo.patch +++ b/www-client/chromium/files/cpuinfo.patch diff --git a/www-client/chromium/files/01fix-rust-target.patch b/www-client/chromium/files/fix-rust-target.patch index 51d7056..51d7056 100644 --- a/www-client/chromium/files/01fix-rust-target.patch +++ b/www-client/chromium/files/fix-rust-target.patch diff --git a/www-client/chromium/files/03riscv-dav1d.patch b/www-client/chromium/files/riscv-dav1d.patch index e20413d..e20413d 100644 --- a/www-client/chromium/files/03riscv-dav1d.patch +++ b/www-client/chromium/files/riscv-dav1d.patch diff --git a/www-client/chromium/files/06riscv-ffmpeg.patch b/www-client/chromium/files/riscv-ffmpeg.patch index 2914148..9bb4826 100644 --- a/www-client/chromium/files/06riscv-ffmpeg.patch +++ b/www-client/chromium/files/riscv-ffmpeg.patch @@ -1,24 +1,20 @@ -Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h -@@ -0,0 +1,768 @@ ++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h +@@ -0,0 +1,775 @@ +/* Automatically generated by configure - do not modify! */ +#ifndef FFMPEG_CONFIG_H +#define FFMPEG_CONFIG_H -+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/home/hacker/chromium/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=riscv64 --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */ ++/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/home/hacker/chromium/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --arch=riscv64 --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264'" -- elide long configuration string from binary */ +#define FFMPEG_LICENSE "LGPL version 2.1 or later" +#define CONFIG_THIS_YEAR 2024 +#define FFMPEG_DATADIR "/usr/local/share/ffmpeg" +#define AVCONV_DATADIR "/usr/local/share/ffmpeg" -+#define CC_IDENT "gcc 13.2.1 (GCC) 20230801" ++#define CC_IDENT "Debian clang version 16.0.6 (27)" +#define OS_NAME linux -+#define av_restrict restrict +#define EXTERN_PREFIX "" +#define EXTERN_ASM +#define BUILDSUF "" +#define SLIBSUF ".so" -+#define HAVE_MMX2 HAVE_MMXEXT +#define SWS_MAX_FILTER_SIZE 256 +#define ARCH_AARCH64 0 +#define ARCH_ALPHA 0 @@ -63,8 +59,8 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h +#define HAVE_POWER8 0 +#define HAVE_PPC4XX 0 +#define HAVE_VSX 0 -+#define HAVE_RV 1 -+#define HAVE_RVV 1 ++#define HAVE_RV 0 ++#define HAVE_RVV 0 +#define HAVE_AESNI 0 +#define HAVE_AMD3DNOW 0 +#define HAVE_AMD3DNOWEXT 0 @@ -250,6 +246,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h +#define HAVE_OPENCV2_CORE_CORE_C_H 0 +#define HAVE_OPENGL_GL3_H 0 +#define HAVE_POLL_H 1 ++#define HAVE_PTHREAD_NP_H 0 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_RESOURCE_H 1 +#define HAVE_SYS_SELECT_H 1 @@ -340,6 +337,8 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h +#define HAVE_POSIX_MEMALIGN 1 +#define HAVE_PRCTL 0 /* #define HAVE_PRCTL 1 -- forced to 0 for Fuchsia */ +#define HAVE_PTHREAD_CANCEL 1 ++#define HAVE_PTHREAD_SET_NAME_NP 0 ++#define HAVE_PTHREAD_SETNAME_NP 0 +#define HAVE_SCHED_GETAFFINITY 1 +#define HAVE_SECITEMIMPORT 0 +#define HAVE_SETCONSOLETEXTATTRIBUTE 0 @@ -383,7 +382,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h +#define HAVE_INLINE_ASM_NONLOCAL_LABELS 1 +#define HAVE_PRAGMA_DEPRECATED 1 +#define HAVE_RSYNC_CONTIMEOUT 0 -+#define HAVE_SYMVER_ASM_LABEL 0 ++#define HAVE_SYMVER_ASM_LABEL 1 +#define HAVE_SYMVER_GNU_ASM 1 +#define HAVE_VFP_ARGS 0 +#define HAVE_XFORM_ASM 0 @@ -423,18 +422,19 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h +#define HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE 0 +#define HAVE_GZIP 1 +#define HAVE_LIBDRM_GETFB2 0 -+#define HAVE_MAKEINFO 1 -+#define HAVE_MAKEINFO_HTML 1 ++#define HAVE_MAKEINFO 0 ++#define HAVE_MAKEINFO_HTML 0 +#define HAVE_OPENCL_D3D11 0 +#define HAVE_OPENCL_DRM_ARM 0 +#define HAVE_OPENCL_DRM_BEIGNET 0 +#define HAVE_OPENCL_DXVA2 0 +#define HAVE_OPENCL_VAAPI_BEIGNET 0 +#define HAVE_OPENCL_VAAPI_INTEL_MEDIA 0 ++#define HAVE_OPENCL_VIDEOTOOLBOX 0 +#define HAVE_PERL 1 +#define HAVE_POD2MAN 1 +#define HAVE_TEXI2HTML 0 -+#define HAVE_XMLLINT 1 ++#define HAVE_XMLLINT 0 +#define HAVE_ZLIB_GZIP 0 +#define HAVE_OPENVINO2 0 +#define CONFIG_DOC 0 @@ -470,6 +470,8 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h +#define CONFIG_FREI0R 0 +#define CONFIG_LIBCDIO 0 +#define CONFIG_LIBDAVS2 0 ++#define CONFIG_LIBDVDNAV 0 ++#define CONFIG_LIBDVDREAD 0 +#define CONFIG_LIBRUBBERBAND 0 +#define CONFIG_LIBVIDSTAB 0 +#define CONFIG_LIBX264 0 @@ -549,6 +551,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h +#define CONFIG_LIBTENSORFLOW 0 +#define CONFIG_LIBTESSERACT 0 +#define CONFIG_LIBTHEORA 0 ++#define CONFIG_LIBTORCH 0 +#define CONFIG_LIBTWOLAME 0 +#define CONFIG_LIBUAVS3D 0 +#define CONFIG_LIBV4L2 0 @@ -598,7 +601,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h +#define CONFIG_OPENCL 0 +#define CONFIG_AMF 0 +#define CONFIG_AUDIOTOOLBOX 0 -+#define CONFIG_CRYSTALHD 0 +#define CONFIG_CUDA 0 +#define CONFIG_CUDA_LLVM 0 +#define CONFIG_CUVID 0 @@ -711,10 +713,12 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h +#define CONFIG_H264_SEI 1 +#define CONFIG_HEVCPARSE 0 +#define CONFIG_HEVC_SEI 0 -+#define CONFIG_HPELDSP 1 ++#define CONFIG_HPELDSP 0 +#define CONFIG_HUFFMAN 0 +#define CONFIG_HUFFYUVDSP 0 +#define CONFIG_HUFFYUVENCDSP 0 ++#define CONFIG_IAMFDEC 0 ++#define CONFIG_IAMFENC 0 +#define CONFIG_IDCTDSP 0 +#define CONFIG_IIRFILTER 0 +#define CONFIG_INFLATE_WRAPPER 0 @@ -724,6 +728,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h +#define CONFIG_JPEGTABLES 0 +#define CONFIG_LGPLV3 0 +#define CONFIG_LIBX262 0 ++#define CONFIG_LIBX264_HDR10 0 +#define CONFIG_LLAUDDSP 0 +#define CONFIG_LLVIDDSP 0 +#define CONFIG_LLVIDENCDSP 0 @@ -765,17 +770,15 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config.h +#define CONFIG_VAAPI_ENCODE 0 +#define CONFIG_VC1DSP 0 +#define CONFIG_VIDEODSP 1 -+#define CONFIG_VP3DSP 1 ++#define CONFIG_VP3DSP 0 +#define CONFIG_VP56DSP 0 -+#define CONFIG_VP8DSP 1 ++#define CONFIG_VP8DSP 0 +#define CONFIG_WMA_FREQS 0 +#define CONFIG_WMV2DSP 0 +#endif /* FFMPEG_CONFIG_H */ -Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_components.h -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_components.h -@@ -0,0 +1,2217 @@ ++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_components.h +@@ -0,0 +1,2210 @@ +/* Automatically generated by configure - do not modify! */ +#ifndef FFMPEG_CONFIG_COMPONENTS_H +#define FFMPEG_CONFIG_COMPONENTS_H @@ -801,7 +804,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_MEDIA100_TO_MJPEGB_BSF 0 +#define CONFIG_MJPEG2JPEG_BSF 0 +#define CONFIG_MJPEGA_DUMP_HEADER_BSF 0 -+#define CONFIG_MP3_HEADER_DECOMPRESS_BSF 0 +#define CONFIG_MPEG2_METADATA_BSF 0 +#define CONFIG_MPEG4_UNPACK_BFRAMES_BSF 0 +#define CONFIG_MOV2TEXTSUB_BSF 0 @@ -813,6 +815,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_PRORES_METADATA_BSF 0 +#define CONFIG_REMOVE_EXTRADATA_BSF 0 +#define CONFIG_SETTS_BSF 0 ++#define CONFIG_SHOWINFO_BSF 0 +#define CONFIG_TEXT2MOVSUB_BSF 0 +#define CONFIG_TRACE_HEADERS_BSF 0 +#define CONFIG_TRUEHD_CORE_BSF 0 @@ -841,7 +844,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_AVRN_DECODER 0 +#define CONFIG_AVS_DECODER 0 +#define CONFIG_AVUI_DECODER 0 -+#define CONFIG_AYUV_DECODER 0 +#define CONFIG_BETHSOFTVID_DECODER 0 +#define CONFIG_BFI_DECODER 0 +#define CONFIG_BINK_DECODER 0 @@ -908,7 +910,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_H263P_DECODER 0 +#define CONFIG_H263_V4L2M2M_DECODER 0 +#define CONFIG_H264_DECODER 1 -+#define CONFIG_H264_CRYSTALHD_DECODER 0 +#define CONFIG_H264_V4L2M2M_DECODER 0 +#define CONFIG_H264_MEDIACODEC_DECODER 0 +#define CONFIG_H264_MMAL_DECODER 0 @@ -956,13 +957,11 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_MPEG1VIDEO_DECODER 0 +#define CONFIG_MPEG2VIDEO_DECODER 0 +#define CONFIG_MPEG4_DECODER 0 -+#define CONFIG_MPEG4_CRYSTALHD_DECODER 0 +#define CONFIG_MPEG4_V4L2M2M_DECODER 0 +#define CONFIG_MPEG4_MMAL_DECODER 0 +#define CONFIG_MPEGVIDEO_DECODER 0 +#define CONFIG_MPEG1_V4L2M2M_DECODER 0 +#define CONFIG_MPEG2_MMAL_DECODER 0 -+#define CONFIG_MPEG2_CRYSTALHD_DECODER 0 +#define CONFIG_MPEG2_V4L2M2M_DECODER 0 +#define CONFIG_MPEG2_QSV_DECODER 0 +#define CONFIG_MPEG2_MEDIACODEC_DECODER 0 @@ -971,7 +970,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_MSMPEG4V1_DECODER 0 +#define CONFIG_MSMPEG4V2_DECODER 0 +#define CONFIG_MSMPEG4V3_DECODER 0 -+#define CONFIG_MSMPEG4_CRYSTALHD_DECODER 0 +#define CONFIG_MSP2_DECODER 0 +#define CONFIG_MSRLE_DECODER 0 +#define CONFIG_MSS1_DECODER 0 @@ -1048,7 +1046,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_TARGA_DECODER 0 +#define CONFIG_TARGA_Y216_DECODER 0 +#define CONFIG_TDSC_DECODER 0 -+#define CONFIG_THEORA_DECODER 1 ++#define CONFIG_THEORA_DECODER 0 +#define CONFIG_THP_DECODER 0 +#define CONFIG_TIERTEXSEQVIDEO_DECODER 0 +#define CONFIG_TIFF_DECODER 0 @@ -1070,7 +1068,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_VBN_DECODER 0 +#define CONFIG_VBLE_DECODER 0 +#define CONFIG_VC1_DECODER 0 -+#define CONFIG_VC1_CRYSTALHD_DECODER 0 +#define CONFIG_VC1IMAGE_DECODER 0 +#define CONFIG_VC1_MMAL_DECODER 0 +#define CONFIG_VC1_QSV_DECODER 0 @@ -1079,14 +1076,14 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_VMDVIDEO_DECODER 0 +#define CONFIG_VMIX_DECODER 0 +#define CONFIG_VMNC_DECODER 0 -+#define CONFIG_VP3_DECODER 1 ++#define CONFIG_VP3_DECODER 0 +#define CONFIG_VP4_DECODER 0 +#define CONFIG_VP5_DECODER 0 +#define CONFIG_VP6_DECODER 0 +#define CONFIG_VP6A_DECODER 0 +#define CONFIG_VP6F_DECODER 0 +#define CONFIG_VP7_DECODER 0 -+#define CONFIG_VP8_DECODER 1 ++#define CONFIG_VP8_DECODER 0 +#define CONFIG_VP8_RKMPP_DECODER 0 +#define CONFIG_VP8_V4L2M2M_DECODER 0 +#define CONFIG_VP9_DECODER 0 @@ -1102,7 +1099,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_WMV1_DECODER 0 +#define CONFIG_WMV2_DECODER 0 +#define CONFIG_WMV3_DECODER 0 -+#define CONFIG_WMV3_CRYSTALHD_DECODER 0 +#define CONFIG_WMV3IMAGE_DECODER 0 +#define CONFIG_WNV1_DECODER 0 +#define CONFIG_XAN_WC3_DECODER 0 @@ -1416,7 +1412,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_ASV2_ENCODER 0 +#define CONFIG_AVRP_ENCODER 0 +#define CONFIG_AVUI_ENCODER 0 -+#define CONFIG_AYUV_ENCODER 0 +#define CONFIG_BITPACKED_ENCODER 0 +#define CONFIG_BMP_ENCODER 0 +#define CONFIG_CFHD_ENCODER 0 @@ -1426,6 +1421,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_DNXHD_ENCODER 0 +#define CONFIG_DPX_ENCODER 0 +#define CONFIG_DVVIDEO_ENCODER 0 ++#define CONFIG_DXV_ENCODER 0 +#define CONFIG_EXR_ENCODER 0 +#define CONFIG_FFV1_ENCODER 0 +#define CONFIG_FFVHUFF_ENCODER 0 @@ -1786,8 +1782,8 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_TAK_PARSER 0 +#define CONFIG_VC1_PARSER 0 +#define CONFIG_VORBIS_PARSER 1 -+#define CONFIG_VP3_PARSER 1 -+#define CONFIG_VP8_PARSER 1 ++#define CONFIG_VP3_PARSER 0 ++#define CONFIG_VP8_PARSER 0 +#define CONFIG_VP9_PARSER 1 +#define CONFIG_VVC_PARSER 0 +#define CONFIG_WEBP_PARSER 0 @@ -2399,8 +2395,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_AVSYNCTEST_FILTER 0 +#define CONFIG_AMOVIE_FILTER 0 +#define CONFIG_MOVIE_FILTER 0 -+#define CONFIG_AFIFO_FILTER 0 -+#define CONFIG_FIFO_FILTER 0 +#define CONFIG_AA_DEMUXER 0 +#define CONFIG_AAC_DEMUXER 1 +#define CONFIG_AAX_DEMUXER 0 @@ -2484,6 +2478,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_DV_DEMUXER 0 +#define CONFIG_DVBSUB_DEMUXER 0 +#define CONFIG_DVBTXT_DEMUXER 0 ++#define CONFIG_DVDVIDEO_DEMUXER 0 +#define CONFIG_DXA_DEMUXER 0 +#define CONFIG_EA_DEMUXER 0 +#define CONFIG_EA_CDATA_DEMUXER 0 @@ -2765,6 +2760,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_AC4_MUXER 0 +#define CONFIG_ADTS_MUXER 0 +#define CONFIG_ADX_MUXER 0 ++#define CONFIG_AEA_MUXER 0 +#define CONFIG_AIFF_MUXER 0 +#define CONFIG_ALP_MUXER 0 +#define CONFIG_AMR_MUXER 0 @@ -2804,7 +2800,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_F4V_MUXER 0 +#define CONFIG_FFMETADATA_MUXER 0 +#define CONFIG_FIFO_MUXER 0 -+#define CONFIG_FIFO_TEST_MUXER 0 +#define CONFIG_FILMSTRIP_MUXER 0 +#define CONFIG_FITS_MUXER 0 +#define CONFIG_FLAC_MUXER 0 @@ -2894,6 +2889,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_PCM_U8_MUXER 0 +#define CONFIG_PSP_MUXER 0 +#define CONFIG_RAWVIDEO_MUXER 0 ++#define CONFIG_RCWT_MUXER 0 +#define CONFIG_RM_MUXER 0 +#define CONFIG_ROQ_MUXER 0 +#define CONFIG_RSO_MUXER 0 @@ -2993,23 +2989,16 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/config_compon +#define CONFIG_IPFS_GATEWAY_PROTOCOL 0 +#define CONFIG_IPNS_GATEWAY_PROTOCOL 0 +#endif /* FFMPEG_CONFIG_COMPONENTS_H */ -Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/bsf_list.c -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/bsf_list.c ++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/bsf_list.c @@ -0,0 +1,2 @@ +static const FFBitStreamFilter * const bitstream_filters[] = { + NULL }; -Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/codec_list.c -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/codec_list.c -@@ -0,0 +1,20 @@ ++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/codec_list.c +@@ -0,0 +1,17 @@ +static const FFCodec * const codec_list[] = { + &ff_h264_decoder, -+ &ff_theora_decoder, -+ &ff_vp3_decoder, -+ &ff_vp8_decoder, + &ff_aac_decoder, + &ff_flac_decoder, + &ff_mp3_decoder, @@ -3025,11 +3014,9 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/co + &ff_pcm_u8_decoder, + &ff_libopus_decoder, + NULL }; -Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/parser_list.c -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/parser_list.c -@@ -0,0 +1,11 @@ ++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/parser_list.c +@@ -0,0 +1,9 @@ +static const AVCodecParser * const parser_list[] = { + &ff_aac_parser, + &ff_flac_parser, @@ -3037,16 +3024,12 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavcodec/pa + &ff_mpegaudio_parser, + &ff_opus_parser, + &ff_vorbis_parser, -+ &ff_vp3_parser, -+ &ff_vp8_parser, + &ff_vp9_parser, + NULL }; -Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/demuxer_list.c -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/demuxer_list.c ++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/demuxer_list.c @@ -0,0 +1,9 @@ -+static const AVInputFormat * const demuxer_list[] = { ++static const FFInputFormat * const demuxer_list[] = { + &ff_aac_demuxer, + &ff_flac_demuxer, + &ff_matroska_demuxer, @@ -3055,24 +3038,18 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/d + &ff_ogg_demuxer, + &ff_wav_demuxer, + NULL }; -Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/muxer_list.c -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/muxer_list.c ++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/muxer_list.c @@ -0,0 +1,2 @@ +static const FFOutputFormat * const muxer_list[] = { + NULL }; -Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/protocol_list.c -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/protocol_list.c ++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavformat/protocol_list.c @@ -0,0 +1,2 @@ +static const URLProtocol * const url_protocols[] = { + NULL }; -Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavutil/avconfig.h -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavutil/avconfig.h ++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavutil/avconfig.h @@ -0,0 +1,6 @@ +/* Generated by ffmpeg configure */ +#ifndef AVUTIL_AVCONFIG_H @@ -3080,37 +3057,31 @@ Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavutil/avc +#define AV_HAVE_BIGENDIAN 0 +#define AV_HAVE_FAST_UNALIGNED 0 +#endif /* AVUTIL_AVCONFIG_H */ -Index: src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavutil/ffversion.h -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavutil/ffversion.h ++++ b/third_party/ffmpeg/chromium/config/Chrome/linux/riscv64/libavutil/ffversion.h @@ -0,0 +1,5 @@ +/* Automatically generated by version.sh, do not manually edit! */ +#ifndef AVUTIL_FFVERSION_H +#define AVUTIL_FFVERSION_H +#define FFMPEG_VERSION "5.1.git" +#endif /* AVUTIL_FFVERSION_H */ -Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h -@@ -0,0 +1,768 @@ ++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h +@@ -0,0 +1,775 @@ +/* Automatically generated by configure - do not modify! */ +#ifndef FFMPEG_CONFIG_H +#define FFMPEG_CONFIG_H -+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/home/hacker/chromium/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=riscv64 --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi" -- elide long configuration string from binary */ ++/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/home/hacker/chromium/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --arch=riscv64 --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld' --enable-decoder='aac,h264' --enable-demuxer=aac --enable-parser='aac,h264' --enable-decoder=mpeg4 --enable-parser='h263,mpeg4video' --enable-demuxer=avi" -- elide long configuration string from binary */ +#define FFMPEG_LICENSE "LGPL version 2.1 or later" +#define CONFIG_THIS_YEAR 2024 +#define FFMPEG_DATADIR "/usr/local/share/ffmpeg" +#define AVCONV_DATADIR "/usr/local/share/ffmpeg" -+#define CC_IDENT "gcc 13.2.1 (GCC) 20230801" ++#define CC_IDENT "Debian clang version 16.0.6 (27)" +#define OS_NAME linux -+#define av_restrict restrict +#define EXTERN_PREFIX "" +#define EXTERN_ASM +#define BUILDSUF "" +#define SLIBSUF ".so" -+#define HAVE_MMX2 HAVE_MMXEXT +#define SWS_MAX_FILTER_SIZE 256 +#define ARCH_AARCH64 0 +#define ARCH_ALPHA 0 @@ -3155,8 +3126,8 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h +#define HAVE_POWER8 0 +#define HAVE_PPC4XX 0 +#define HAVE_VSX 0 -+#define HAVE_RV 1 -+#define HAVE_RVV 1 ++#define HAVE_RV 0 ++#define HAVE_RVV 0 +#define HAVE_AESNI 0 +#define HAVE_AMD3DNOW 0 +#define HAVE_AMD3DNOWEXT 0 @@ -3342,6 +3313,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h +#define HAVE_OPENCV2_CORE_CORE_C_H 0 +#define HAVE_OPENGL_GL3_H 0 +#define HAVE_POLL_H 1 ++#define HAVE_PTHREAD_NP_H 0 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_RESOURCE_H 1 +#define HAVE_SYS_SELECT_H 1 @@ -3432,6 +3404,8 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h +#define HAVE_POSIX_MEMALIGN 1 +#define HAVE_PRCTL 0 /* #define HAVE_PRCTL 1 -- forced to 0 for Fuchsia */ +#define HAVE_PTHREAD_CANCEL 1 ++#define HAVE_PTHREAD_SET_NAME_NP 0 ++#define HAVE_PTHREAD_SETNAME_NP 0 +#define HAVE_SCHED_GETAFFINITY 1 +#define HAVE_SECITEMIMPORT 0 +#define HAVE_SETCONSOLETEXTATTRIBUTE 0 @@ -3475,7 +3449,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h +#define HAVE_INLINE_ASM_NONLOCAL_LABELS 1 +#define HAVE_PRAGMA_DEPRECATED 1 +#define HAVE_RSYNC_CONTIMEOUT 0 -+#define HAVE_SYMVER_ASM_LABEL 0 ++#define HAVE_SYMVER_ASM_LABEL 1 +#define HAVE_SYMVER_GNU_ASM 1 +#define HAVE_VFP_ARGS 0 +#define HAVE_XFORM_ASM 0 @@ -3515,18 +3489,19 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h +#define HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE 0 +#define HAVE_GZIP 1 +#define HAVE_LIBDRM_GETFB2 0 -+#define HAVE_MAKEINFO 1 -+#define HAVE_MAKEINFO_HTML 1 ++#define HAVE_MAKEINFO 0 ++#define HAVE_MAKEINFO_HTML 0 +#define HAVE_OPENCL_D3D11 0 +#define HAVE_OPENCL_DRM_ARM 0 +#define HAVE_OPENCL_DRM_BEIGNET 0 +#define HAVE_OPENCL_DXVA2 0 +#define HAVE_OPENCL_VAAPI_BEIGNET 0 +#define HAVE_OPENCL_VAAPI_INTEL_MEDIA 0 ++#define HAVE_OPENCL_VIDEOTOOLBOX 0 +#define HAVE_PERL 1 +#define HAVE_POD2MAN 1 +#define HAVE_TEXI2HTML 0 -+#define HAVE_XMLLINT 1 ++#define HAVE_XMLLINT 0 +#define HAVE_ZLIB_GZIP 0 +#define HAVE_OPENVINO2 0 +#define CONFIG_DOC 0 @@ -3562,6 +3537,8 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h +#define CONFIG_FREI0R 0 +#define CONFIG_LIBCDIO 0 +#define CONFIG_LIBDAVS2 0 ++#define CONFIG_LIBDVDNAV 0 ++#define CONFIG_LIBDVDREAD 0 +#define CONFIG_LIBRUBBERBAND 0 +#define CONFIG_LIBVIDSTAB 0 +#define CONFIG_LIBX264 0 @@ -3641,6 +3618,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h +#define CONFIG_LIBTENSORFLOW 0 +#define CONFIG_LIBTESSERACT 0 +#define CONFIG_LIBTHEORA 0 ++#define CONFIG_LIBTORCH 0 +#define CONFIG_LIBTWOLAME 0 +#define CONFIG_LIBUAVS3D 0 +#define CONFIG_LIBV4L2 0 @@ -3690,7 +3668,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h +#define CONFIG_OPENCL 0 +#define CONFIG_AMF 0 +#define CONFIG_AUDIOTOOLBOX 0 -+#define CONFIG_CRYSTALHD 0 +#define CONFIG_CUDA 0 +#define CONFIG_CUDA_LLVM 0 +#define CONFIG_CUVID 0 @@ -3807,6 +3784,8 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h +#define CONFIG_HUFFMAN 0 +#define CONFIG_HUFFYUVDSP 0 +#define CONFIG_HUFFYUVENCDSP 0 ++#define CONFIG_IAMFDEC 0 ++#define CONFIG_IAMFENC 0 +#define CONFIG_IDCTDSP 1 +#define CONFIG_IIRFILTER 0 +#define CONFIG_INFLATE_WRAPPER 0 @@ -3816,6 +3795,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h +#define CONFIG_JPEGTABLES 0 +#define CONFIG_LGPLV3 0 +#define CONFIG_LIBX262 0 ++#define CONFIG_LIBX264_HDR10 0 +#define CONFIG_LLAUDDSP 0 +#define CONFIG_LLVIDDSP 0 +#define CONFIG_LLVIDENCDSP 0 @@ -3857,17 +3837,15 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config.h +#define CONFIG_VAAPI_ENCODE 0 +#define CONFIG_VC1DSP 0 +#define CONFIG_VIDEODSP 1 -+#define CONFIG_VP3DSP 1 ++#define CONFIG_VP3DSP 0 +#define CONFIG_VP56DSP 0 -+#define CONFIG_VP8DSP 1 ++#define CONFIG_VP8DSP 0 +#define CONFIG_WMA_FREQS 0 +#define CONFIG_WMV2DSP 0 +#endif /* FFMPEG_CONFIG_H */ -Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_components.h -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_components.h -@@ -0,0 +1,2217 @@ ++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_components.h +@@ -0,0 +1,2210 @@ +/* Automatically generated by configure - do not modify! */ +#ifndef FFMPEG_CONFIG_COMPONENTS_H +#define FFMPEG_CONFIG_COMPONENTS_H @@ -3893,7 +3871,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_MEDIA100_TO_MJPEGB_BSF 0 +#define CONFIG_MJPEG2JPEG_BSF 0 +#define CONFIG_MJPEGA_DUMP_HEADER_BSF 0 -+#define CONFIG_MP3_HEADER_DECOMPRESS_BSF 0 +#define CONFIG_MPEG2_METADATA_BSF 0 +#define CONFIG_MPEG4_UNPACK_BFRAMES_BSF 0 +#define CONFIG_MOV2TEXTSUB_BSF 0 @@ -3905,6 +3882,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_PRORES_METADATA_BSF 0 +#define CONFIG_REMOVE_EXTRADATA_BSF 0 +#define CONFIG_SETTS_BSF 0 ++#define CONFIG_SHOWINFO_BSF 0 +#define CONFIG_TEXT2MOVSUB_BSF 0 +#define CONFIG_TRACE_HEADERS_BSF 0 +#define CONFIG_TRUEHD_CORE_BSF 0 @@ -3933,7 +3911,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_AVRN_DECODER 0 +#define CONFIG_AVS_DECODER 0 +#define CONFIG_AVUI_DECODER 0 -+#define CONFIG_AYUV_DECODER 0 +#define CONFIG_BETHSOFTVID_DECODER 0 +#define CONFIG_BFI_DECODER 0 +#define CONFIG_BINK_DECODER 0 @@ -4000,7 +3977,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_H263P_DECODER 0 +#define CONFIG_H263_V4L2M2M_DECODER 0 +#define CONFIG_H264_DECODER 1 -+#define CONFIG_H264_CRYSTALHD_DECODER 0 +#define CONFIG_H264_V4L2M2M_DECODER 0 +#define CONFIG_H264_MEDIACODEC_DECODER 0 +#define CONFIG_H264_MMAL_DECODER 0 @@ -4048,13 +4024,11 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_MPEG1VIDEO_DECODER 0 +#define CONFIG_MPEG2VIDEO_DECODER 0 +#define CONFIG_MPEG4_DECODER 1 -+#define CONFIG_MPEG4_CRYSTALHD_DECODER 0 +#define CONFIG_MPEG4_V4L2M2M_DECODER 0 +#define CONFIG_MPEG4_MMAL_DECODER 0 +#define CONFIG_MPEGVIDEO_DECODER 0 +#define CONFIG_MPEG1_V4L2M2M_DECODER 0 +#define CONFIG_MPEG2_MMAL_DECODER 0 -+#define CONFIG_MPEG2_CRYSTALHD_DECODER 0 +#define CONFIG_MPEG2_V4L2M2M_DECODER 0 +#define CONFIG_MPEG2_QSV_DECODER 0 +#define CONFIG_MPEG2_MEDIACODEC_DECODER 0 @@ -4063,7 +4037,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_MSMPEG4V1_DECODER 0 +#define CONFIG_MSMPEG4V2_DECODER 0 +#define CONFIG_MSMPEG4V3_DECODER 0 -+#define CONFIG_MSMPEG4_CRYSTALHD_DECODER 0 +#define CONFIG_MSP2_DECODER 0 +#define CONFIG_MSRLE_DECODER 0 +#define CONFIG_MSS1_DECODER 0 @@ -4140,7 +4113,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_TARGA_DECODER 0 +#define CONFIG_TARGA_Y216_DECODER 0 +#define CONFIG_TDSC_DECODER 0 -+#define CONFIG_THEORA_DECODER 1 ++#define CONFIG_THEORA_DECODER 0 +#define CONFIG_THP_DECODER 0 +#define CONFIG_TIERTEXSEQVIDEO_DECODER 0 +#define CONFIG_TIFF_DECODER 0 @@ -4162,7 +4135,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_VBN_DECODER 0 +#define CONFIG_VBLE_DECODER 0 +#define CONFIG_VC1_DECODER 0 -+#define CONFIG_VC1_CRYSTALHD_DECODER 0 +#define CONFIG_VC1IMAGE_DECODER 0 +#define CONFIG_VC1_MMAL_DECODER 0 +#define CONFIG_VC1_QSV_DECODER 0 @@ -4171,14 +4143,14 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_VMDVIDEO_DECODER 0 +#define CONFIG_VMIX_DECODER 0 +#define CONFIG_VMNC_DECODER 0 -+#define CONFIG_VP3_DECODER 1 ++#define CONFIG_VP3_DECODER 0 +#define CONFIG_VP4_DECODER 0 +#define CONFIG_VP5_DECODER 0 +#define CONFIG_VP6_DECODER 0 +#define CONFIG_VP6A_DECODER 0 +#define CONFIG_VP6F_DECODER 0 +#define CONFIG_VP7_DECODER 0 -+#define CONFIG_VP8_DECODER 1 ++#define CONFIG_VP8_DECODER 0 +#define CONFIG_VP8_RKMPP_DECODER 0 +#define CONFIG_VP8_V4L2M2M_DECODER 0 +#define CONFIG_VP9_DECODER 0 @@ -4194,7 +4166,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_WMV1_DECODER 0 +#define CONFIG_WMV2_DECODER 0 +#define CONFIG_WMV3_DECODER 0 -+#define CONFIG_WMV3_CRYSTALHD_DECODER 0 +#define CONFIG_WMV3IMAGE_DECODER 0 +#define CONFIG_WNV1_DECODER 0 +#define CONFIG_XAN_WC3_DECODER 0 @@ -4508,7 +4479,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_ASV2_ENCODER 0 +#define CONFIG_AVRP_ENCODER 0 +#define CONFIG_AVUI_ENCODER 0 -+#define CONFIG_AYUV_ENCODER 0 +#define CONFIG_BITPACKED_ENCODER 0 +#define CONFIG_BMP_ENCODER 0 +#define CONFIG_CFHD_ENCODER 0 @@ -4518,6 +4488,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_DNXHD_ENCODER 0 +#define CONFIG_DPX_ENCODER 0 +#define CONFIG_DVVIDEO_ENCODER 0 ++#define CONFIG_DXV_ENCODER 0 +#define CONFIG_EXR_ENCODER 0 +#define CONFIG_FFV1_ENCODER 0 +#define CONFIG_FFVHUFF_ENCODER 0 @@ -4878,8 +4849,8 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_TAK_PARSER 0 +#define CONFIG_VC1_PARSER 0 +#define CONFIG_VORBIS_PARSER 1 -+#define CONFIG_VP3_PARSER 1 -+#define CONFIG_VP8_PARSER 1 ++#define CONFIG_VP3_PARSER 0 ++#define CONFIG_VP8_PARSER 0 +#define CONFIG_VP9_PARSER 1 +#define CONFIG_VVC_PARSER 0 +#define CONFIG_WEBP_PARSER 0 @@ -5491,8 +5462,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_AVSYNCTEST_FILTER 0 +#define CONFIG_AMOVIE_FILTER 0 +#define CONFIG_MOVIE_FILTER 0 -+#define CONFIG_AFIFO_FILTER 0 -+#define CONFIG_FIFO_FILTER 0 +#define CONFIG_AA_DEMUXER 0 +#define CONFIG_AAC_DEMUXER 1 +#define CONFIG_AAX_DEMUXER 0 @@ -5576,6 +5545,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_DV_DEMUXER 0 +#define CONFIG_DVBSUB_DEMUXER 0 +#define CONFIG_DVBTXT_DEMUXER 0 ++#define CONFIG_DVDVIDEO_DEMUXER 0 +#define CONFIG_DXA_DEMUXER 0 +#define CONFIG_EA_DEMUXER 0 +#define CONFIG_EA_CDATA_DEMUXER 0 @@ -5857,6 +5827,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_AC4_MUXER 0 +#define CONFIG_ADTS_MUXER 0 +#define CONFIG_ADX_MUXER 0 ++#define CONFIG_AEA_MUXER 0 +#define CONFIG_AIFF_MUXER 0 +#define CONFIG_ALP_MUXER 0 +#define CONFIG_AMR_MUXER 0 @@ -5896,7 +5867,6 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_F4V_MUXER 0 +#define CONFIG_FFMETADATA_MUXER 0 +#define CONFIG_FIFO_MUXER 0 -+#define CONFIG_FIFO_TEST_MUXER 0 +#define CONFIG_FILMSTRIP_MUXER 0 +#define CONFIG_FITS_MUXER 0 +#define CONFIG_FLAC_MUXER 0 @@ -5986,6 +5956,7 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_PCM_U8_MUXER 0 +#define CONFIG_PSP_MUXER 0 +#define CONFIG_RAWVIDEO_MUXER 0 ++#define CONFIG_RCWT_MUXER 0 +#define CONFIG_RM_MUXER 0 +#define CONFIG_ROQ_MUXER 0 +#define CONFIG_RSO_MUXER 0 @@ -6085,25 +6056,18 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/config_comp +#define CONFIG_IPFS_GATEWAY_PROTOCOL 0 +#define CONFIG_IPNS_GATEWAY_PROTOCOL 0 +#endif /* FFMPEG_CONFIG_COMPONENTS_H */ -Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/bsf_list.c -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/bsf_list.c ++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/bsf_list.c @@ -0,0 +1,2 @@ +static const FFBitStreamFilter * const bitstream_filters[] = { + NULL }; -Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/codec_list.c -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/codec_list.c -@@ -0,0 +1,22 @@ ++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/codec_list.c +@@ -0,0 +1,19 @@ +static const FFCodec * const codec_list[] = { + &ff_h263_decoder, + &ff_h264_decoder, + &ff_mpeg4_decoder, -+ &ff_theora_decoder, -+ &ff_vp3_decoder, -+ &ff_vp8_decoder, + &ff_aac_decoder, + &ff_flac_decoder, + &ff_mp3_decoder, @@ -6119,11 +6083,9 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/ + &ff_pcm_u8_decoder, + &ff_libopus_decoder, + NULL }; -Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/parser_list.c -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/parser_list.c -@@ -0,0 +1,13 @@ ++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/parser_list.c +@@ -0,0 +1,11 @@ +static const AVCodecParser * const parser_list[] = { + &ff_aac_parser, + &ff_flac_parser, @@ -6133,16 +6095,12 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavcodec/ + &ff_mpegaudio_parser, + &ff_opus_parser, + &ff_vorbis_parser, -+ &ff_vp3_parser, -+ &ff_vp8_parser, + &ff_vp9_parser, + NULL }; -Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat/demuxer_list.c -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat/demuxer_list.c ++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat/demuxer_list.c @@ -0,0 +1,10 @@ -+static const AVInputFormat * const demuxer_list[] = { ++static const FFInputFormat * const demuxer_list[] = { + &ff_aac_demuxer, + &ff_avi_demuxer, + &ff_flac_demuxer, @@ -6152,24 +6110,18 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat + &ff_ogg_demuxer, + &ff_wav_demuxer, + NULL }; -Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat/muxer_list.c -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat/muxer_list.c ++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat/muxer_list.c @@ -0,0 +1,2 @@ +static const FFOutputFormat * const muxer_list[] = { + NULL }; -Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat/protocol_list.c -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat/protocol_list.c ++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavformat/protocol_list.c @@ -0,0 +1,2 @@ +static const URLProtocol * const url_protocols[] = { + NULL }; -Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavutil/avconfig.h -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavutil/avconfig.h ++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavutil/avconfig.h @@ -0,0 +1,6 @@ +/* Generated by ffmpeg configure */ +#ifndef AVUTIL_AVCONFIG_H @@ -6177,37 +6129,31 @@ Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavutil/a +#define AV_HAVE_BIGENDIAN 0 +#define AV_HAVE_FAST_UNALIGNED 0 +#endif /* AVUTIL_AVCONFIG_H */ -Index: src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavutil/ffversion.h -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavutil/ffversion.h ++++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/riscv64/libavutil/ffversion.h @@ -0,0 +1,5 @@ +/* Automatically generated by version.sh, do not manually edit! */ +#ifndef AVUTIL_FFVERSION_H +#define AVUTIL_FFVERSION_H +#define FFMPEG_VERSION "5.1.git" +#endif /* AVUTIL_FFVERSION_H */ -Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h -@@ -0,0 +1,768 @@ ++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h +@@ -0,0 +1,775 @@ +/* Automatically generated by configure - do not modify! */ +#ifndef FFMPEG_CONFIG_H +#define FFMPEG_CONFIG_H -+/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/home/hacker/chromium/chromium/src/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --enable-decoder='theora,vp8' --enable-parser='vp3,vp8' --arch=riscv64" -- elide long configuration string from binary */ ++/* #define FFMPEG_CONFIGURATION "--disable-everything --disable-all --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-static --enable-avcodec --enable-avformat --enable-avutil --enable-static --enable-libopus --disable-debug --disable-bzlib --disable-error-resilience --disable-iconv --disable-network --disable-schannel --disable-sdl2 --disable-symver --disable-xlib --disable-zlib --disable-securetransport --disable-faan --disable-alsa --disable-autodetect --enable-decoder='vorbis,libopus,flac' --enable-decoder='pcm_u8,pcm_s16le,pcm_s24le,pcm_s32le,pcm_f32le,mp3' --enable-decoder='pcm_s16be,pcm_s24be,pcm_mulaw,pcm_alaw' --enable-demuxer='ogg,matroska,wav,flac,mp3,mov' --enable-parser='opus,vorbis,flac,mpegaudio,vp9' --extra-cflags=-I/home/hacker/chromium/third_party/opus/src/include --disable-linux-perf --x86asmexe=nasm --optflags='\"-O2\"' --arch=riscv64 --enable-pic --cc=clang --cxx=clang++ --ld=clang --extra-ldflags='-fuse-ld=lld'" -- elide long configuration string from binary */ +#define FFMPEG_LICENSE "LGPL version 2.1 or later" +#define CONFIG_THIS_YEAR 2024 +#define FFMPEG_DATADIR "/usr/local/share/ffmpeg" +#define AVCONV_DATADIR "/usr/local/share/ffmpeg" -+#define CC_IDENT "gcc 13.2.1 (GCC) 20230801" ++#define CC_IDENT "Debian clang version 16.0.6 (27)" +#define OS_NAME linux -+#define av_restrict restrict +#define EXTERN_PREFIX "" +#define EXTERN_ASM +#define BUILDSUF "" +#define SLIBSUF ".so" -+#define HAVE_MMX2 HAVE_MMXEXT +#define SWS_MAX_FILTER_SIZE 256 +#define ARCH_AARCH64 0 +#define ARCH_ALPHA 0 @@ -6252,8 +6198,8 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h +#define HAVE_POWER8 0 +#define HAVE_PPC4XX 0 +#define HAVE_VSX 0 -+#define HAVE_RV 1 -+#define HAVE_RVV 1 ++#define HAVE_RV 0 ++#define HAVE_RVV 0 +#define HAVE_AESNI 0 +#define HAVE_AMD3DNOW 0 +#define HAVE_AMD3DNOWEXT 0 @@ -6439,6 +6385,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h +#define HAVE_OPENCV2_CORE_CORE_C_H 0 +#define HAVE_OPENGL_GL3_H 0 +#define HAVE_POLL_H 1 ++#define HAVE_PTHREAD_NP_H 0 +#define HAVE_SYS_PARAM_H 1 +#define HAVE_SYS_RESOURCE_H 1 +#define HAVE_SYS_SELECT_H 1 @@ -6529,6 +6476,8 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h +#define HAVE_POSIX_MEMALIGN 1 +#define HAVE_PRCTL 0 /* #define HAVE_PRCTL 1 -- forced to 0 for Fuchsia */ +#define HAVE_PTHREAD_CANCEL 1 ++#define HAVE_PTHREAD_SET_NAME_NP 0 ++#define HAVE_PTHREAD_SETNAME_NP 0 +#define HAVE_SCHED_GETAFFINITY 1 +#define HAVE_SECITEMIMPORT 0 +#define HAVE_SETCONSOLETEXTATTRIBUTE 0 @@ -6572,7 +6521,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h +#define HAVE_INLINE_ASM_NONLOCAL_LABELS 1 +#define HAVE_PRAGMA_DEPRECATED 1 +#define HAVE_RSYNC_CONTIMEOUT 0 -+#define HAVE_SYMVER_ASM_LABEL 0 ++#define HAVE_SYMVER_ASM_LABEL 1 +#define HAVE_SYMVER_GNU_ASM 1 +#define HAVE_VFP_ARGS 0 +#define HAVE_XFORM_ASM 0 @@ -6612,18 +6561,19 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h +#define HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE 0 +#define HAVE_GZIP 1 +#define HAVE_LIBDRM_GETFB2 0 -+#define HAVE_MAKEINFO 1 -+#define HAVE_MAKEINFO_HTML 1 ++#define HAVE_MAKEINFO 0 ++#define HAVE_MAKEINFO_HTML 0 +#define HAVE_OPENCL_D3D11 0 +#define HAVE_OPENCL_DRM_ARM 0 +#define HAVE_OPENCL_DRM_BEIGNET 0 +#define HAVE_OPENCL_DXVA2 0 +#define HAVE_OPENCL_VAAPI_BEIGNET 0 +#define HAVE_OPENCL_VAAPI_INTEL_MEDIA 0 ++#define HAVE_OPENCL_VIDEOTOOLBOX 0 +#define HAVE_PERL 1 +#define HAVE_POD2MAN 1 +#define HAVE_TEXI2HTML 0 -+#define HAVE_XMLLINT 1 ++#define HAVE_XMLLINT 0 +#define HAVE_ZLIB_GZIP 0 +#define HAVE_OPENVINO2 0 +#define CONFIG_DOC 0 @@ -6659,6 +6609,8 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h +#define CONFIG_FREI0R 0 +#define CONFIG_LIBCDIO 0 +#define CONFIG_LIBDAVS2 0 ++#define CONFIG_LIBDVDNAV 0 ++#define CONFIG_LIBDVDREAD 0 +#define CONFIG_LIBRUBBERBAND 0 +#define CONFIG_LIBVIDSTAB 0 +#define CONFIG_LIBX264 0 @@ -6738,6 +6690,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h +#define CONFIG_LIBTENSORFLOW 0 +#define CONFIG_LIBTESSERACT 0 +#define CONFIG_LIBTHEORA 0 ++#define CONFIG_LIBTORCH 0 +#define CONFIG_LIBTWOLAME 0 +#define CONFIG_LIBUAVS3D 0 +#define CONFIG_LIBV4L2 0 @@ -6787,7 +6740,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h +#define CONFIG_OPENCL 0 +#define CONFIG_AMF 0 +#define CONFIG_AUDIOTOOLBOX 0 -+#define CONFIG_CRYSTALHD 0 +#define CONFIG_CUDA 0 +#define CONFIG_CUDA_LLVM 0 +#define CONFIG_CUVID 0 @@ -6895,15 +6847,17 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h +#define CONFIG_H264CHROMA 0 +#define CONFIG_H264DSP 0 +#define CONFIG_H264PARSE 0 -+#define CONFIG_H264PRED 1 ++#define CONFIG_H264PRED 0 +#define CONFIG_H264QPEL 0 +#define CONFIG_H264_SEI 0 +#define CONFIG_HEVCPARSE 0 +#define CONFIG_HEVC_SEI 0 -+#define CONFIG_HPELDSP 1 ++#define CONFIG_HPELDSP 0 +#define CONFIG_HUFFMAN 0 +#define CONFIG_HUFFYUVDSP 0 +#define CONFIG_HUFFYUVENCDSP 0 ++#define CONFIG_IAMFDEC 0 ++#define CONFIG_IAMFENC 0 +#define CONFIG_IDCTDSP 0 +#define CONFIG_IIRFILTER 0 +#define CONFIG_INFLATE_WRAPPER 0 @@ -6913,6 +6867,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h +#define CONFIG_JPEGTABLES 0 +#define CONFIG_LGPLV3 0 +#define CONFIG_LIBX262 0 ++#define CONFIG_LIBX264_HDR10 0 +#define CONFIG_LLAUDDSP 0 +#define CONFIG_LLVIDDSP 0 +#define CONFIG_LLVIDENCDSP 0 @@ -6953,18 +6908,16 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config.h +#define CONFIG_VAAPI_1 0 +#define CONFIG_VAAPI_ENCODE 0 +#define CONFIG_VC1DSP 0 -+#define CONFIG_VIDEODSP 1 -+#define CONFIG_VP3DSP 1 ++#define CONFIG_VIDEODSP 0 ++#define CONFIG_VP3DSP 0 +#define CONFIG_VP56DSP 0 -+#define CONFIG_VP8DSP 1 ++#define CONFIG_VP8DSP 0 +#define CONFIG_WMA_FREQS 0 +#define CONFIG_WMV2DSP 0 +#endif /* FFMPEG_CONFIG_H */ -Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_components.h -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_components.h -@@ -0,0 +1,2217 @@ ++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_components.h +@@ -0,0 +1,2210 @@ +/* Automatically generated by configure - do not modify! */ +#ifndef FFMPEG_CONFIG_COMPONENTS_H +#define FFMPEG_CONFIG_COMPONENTS_H @@ -6990,7 +6943,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_MEDIA100_TO_MJPEGB_BSF 0 +#define CONFIG_MJPEG2JPEG_BSF 0 +#define CONFIG_MJPEGA_DUMP_HEADER_BSF 0 -+#define CONFIG_MP3_HEADER_DECOMPRESS_BSF 0 +#define CONFIG_MPEG2_METADATA_BSF 0 +#define CONFIG_MPEG4_UNPACK_BFRAMES_BSF 0 +#define CONFIG_MOV2TEXTSUB_BSF 0 @@ -7002,6 +6954,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_PRORES_METADATA_BSF 0 +#define CONFIG_REMOVE_EXTRADATA_BSF 0 +#define CONFIG_SETTS_BSF 0 ++#define CONFIG_SHOWINFO_BSF 0 +#define CONFIG_TEXT2MOVSUB_BSF 0 +#define CONFIG_TRACE_HEADERS_BSF 0 +#define CONFIG_TRUEHD_CORE_BSF 0 @@ -7030,7 +6983,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_AVRN_DECODER 0 +#define CONFIG_AVS_DECODER 0 +#define CONFIG_AVUI_DECODER 0 -+#define CONFIG_AYUV_DECODER 0 +#define CONFIG_BETHSOFTVID_DECODER 0 +#define CONFIG_BFI_DECODER 0 +#define CONFIG_BINK_DECODER 0 @@ -7097,7 +7049,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_H263P_DECODER 0 +#define CONFIG_H263_V4L2M2M_DECODER 0 +#define CONFIG_H264_DECODER 0 -+#define CONFIG_H264_CRYSTALHD_DECODER 0 +#define CONFIG_H264_V4L2M2M_DECODER 0 +#define CONFIG_H264_MEDIACODEC_DECODER 0 +#define CONFIG_H264_MMAL_DECODER 0 @@ -7145,13 +7096,11 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_MPEG1VIDEO_DECODER 0 +#define CONFIG_MPEG2VIDEO_DECODER 0 +#define CONFIG_MPEG4_DECODER 0 -+#define CONFIG_MPEG4_CRYSTALHD_DECODER 0 +#define CONFIG_MPEG4_V4L2M2M_DECODER 0 +#define CONFIG_MPEG4_MMAL_DECODER 0 +#define CONFIG_MPEGVIDEO_DECODER 0 +#define CONFIG_MPEG1_V4L2M2M_DECODER 0 +#define CONFIG_MPEG2_MMAL_DECODER 0 -+#define CONFIG_MPEG2_CRYSTALHD_DECODER 0 +#define CONFIG_MPEG2_V4L2M2M_DECODER 0 +#define CONFIG_MPEG2_QSV_DECODER 0 +#define CONFIG_MPEG2_MEDIACODEC_DECODER 0 @@ -7160,7 +7109,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_MSMPEG4V1_DECODER 0 +#define CONFIG_MSMPEG4V2_DECODER 0 +#define CONFIG_MSMPEG4V3_DECODER 0 -+#define CONFIG_MSMPEG4_CRYSTALHD_DECODER 0 +#define CONFIG_MSP2_DECODER 0 +#define CONFIG_MSRLE_DECODER 0 +#define CONFIG_MSS1_DECODER 0 @@ -7237,7 +7185,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_TARGA_DECODER 0 +#define CONFIG_TARGA_Y216_DECODER 0 +#define CONFIG_TDSC_DECODER 0 -+#define CONFIG_THEORA_DECODER 1 ++#define CONFIG_THEORA_DECODER 0 +#define CONFIG_THP_DECODER 0 +#define CONFIG_TIERTEXSEQVIDEO_DECODER 0 +#define CONFIG_TIFF_DECODER 0 @@ -7259,7 +7207,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_VBN_DECODER 0 +#define CONFIG_VBLE_DECODER 0 +#define CONFIG_VC1_DECODER 0 -+#define CONFIG_VC1_CRYSTALHD_DECODER 0 +#define CONFIG_VC1IMAGE_DECODER 0 +#define CONFIG_VC1_MMAL_DECODER 0 +#define CONFIG_VC1_QSV_DECODER 0 @@ -7268,14 +7215,14 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_VMDVIDEO_DECODER 0 +#define CONFIG_VMIX_DECODER 0 +#define CONFIG_VMNC_DECODER 0 -+#define CONFIG_VP3_DECODER 1 ++#define CONFIG_VP3_DECODER 0 +#define CONFIG_VP4_DECODER 0 +#define CONFIG_VP5_DECODER 0 +#define CONFIG_VP6_DECODER 0 +#define CONFIG_VP6A_DECODER 0 +#define CONFIG_VP6F_DECODER 0 +#define CONFIG_VP7_DECODER 0 -+#define CONFIG_VP8_DECODER 1 ++#define CONFIG_VP8_DECODER 0 +#define CONFIG_VP8_RKMPP_DECODER 0 +#define CONFIG_VP8_V4L2M2M_DECODER 0 +#define CONFIG_VP9_DECODER 0 @@ -7291,7 +7238,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_WMV1_DECODER 0 +#define CONFIG_WMV2_DECODER 0 +#define CONFIG_WMV3_DECODER 0 -+#define CONFIG_WMV3_CRYSTALHD_DECODER 0 +#define CONFIG_WMV3IMAGE_DECODER 0 +#define CONFIG_WNV1_DECODER 0 +#define CONFIG_XAN_WC3_DECODER 0 @@ -7605,7 +7551,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_ASV2_ENCODER 0 +#define CONFIG_AVRP_ENCODER 0 +#define CONFIG_AVUI_ENCODER 0 -+#define CONFIG_AYUV_ENCODER 0 +#define CONFIG_BITPACKED_ENCODER 0 +#define CONFIG_BMP_ENCODER 0 +#define CONFIG_CFHD_ENCODER 0 @@ -7615,6 +7560,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_DNXHD_ENCODER 0 +#define CONFIG_DPX_ENCODER 0 +#define CONFIG_DVVIDEO_ENCODER 0 ++#define CONFIG_DXV_ENCODER 0 +#define CONFIG_EXR_ENCODER 0 +#define CONFIG_FFV1_ENCODER 0 +#define CONFIG_FFVHUFF_ENCODER 0 @@ -7975,8 +7921,8 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_TAK_PARSER 0 +#define CONFIG_VC1_PARSER 0 +#define CONFIG_VORBIS_PARSER 1 -+#define CONFIG_VP3_PARSER 1 -+#define CONFIG_VP8_PARSER 1 ++#define CONFIG_VP3_PARSER 0 ++#define CONFIG_VP8_PARSER 0 +#define CONFIG_VP9_PARSER 1 +#define CONFIG_VVC_PARSER 0 +#define CONFIG_WEBP_PARSER 0 @@ -8588,8 +8534,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_AVSYNCTEST_FILTER 0 +#define CONFIG_AMOVIE_FILTER 0 +#define CONFIG_MOVIE_FILTER 0 -+#define CONFIG_AFIFO_FILTER 0 -+#define CONFIG_FIFO_FILTER 0 +#define CONFIG_AA_DEMUXER 0 +#define CONFIG_AAC_DEMUXER 0 +#define CONFIG_AAX_DEMUXER 0 @@ -8673,6 +8617,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_DV_DEMUXER 0 +#define CONFIG_DVBSUB_DEMUXER 0 +#define CONFIG_DVBTXT_DEMUXER 0 ++#define CONFIG_DVDVIDEO_DEMUXER 0 +#define CONFIG_DXA_DEMUXER 0 +#define CONFIG_EA_DEMUXER 0 +#define CONFIG_EA_CDATA_DEMUXER 0 @@ -8954,6 +8899,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_AC4_MUXER 0 +#define CONFIG_ADTS_MUXER 0 +#define CONFIG_ADX_MUXER 0 ++#define CONFIG_AEA_MUXER 0 +#define CONFIG_AIFF_MUXER 0 +#define CONFIG_ALP_MUXER 0 +#define CONFIG_AMR_MUXER 0 @@ -8993,7 +8939,6 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_F4V_MUXER 0 +#define CONFIG_FFMETADATA_MUXER 0 +#define CONFIG_FIFO_MUXER 0 -+#define CONFIG_FIFO_TEST_MUXER 0 +#define CONFIG_FILMSTRIP_MUXER 0 +#define CONFIG_FITS_MUXER 0 +#define CONFIG_FLAC_MUXER 0 @@ -9083,6 +9028,7 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_PCM_U8_MUXER 0 +#define CONFIG_PSP_MUXER 0 +#define CONFIG_RAWVIDEO_MUXER 0 ++#define CONFIG_RCWT_MUXER 0 +#define CONFIG_RM_MUXER 0 +#define CONFIG_ROQ_MUXER 0 +#define CONFIG_RSO_MUXER 0 @@ -9182,22 +9128,15 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/config_comp +#define CONFIG_IPFS_GATEWAY_PROTOCOL 0 +#define CONFIG_IPNS_GATEWAY_PROTOCOL 0 +#endif /* FFMPEG_CONFIG_COMPONENTS_H */ -Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/bsf_list.c -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/bsf_list.c ++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/bsf_list.c @@ -0,0 +1,2 @@ +static const FFBitStreamFilter * const bitstream_filters[] = { + NULL }; -Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/codec_list.c -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/codec_list.c -@@ -0,0 +1,18 @@ ++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/codec_list.c +@@ -0,0 +1,15 @@ +static const FFCodec * const codec_list[] = { -+ &ff_theora_decoder, -+ &ff_vp3_decoder, -+ &ff_vp8_decoder, + &ff_flac_decoder, + &ff_mp3_decoder, + &ff_vorbis_decoder, @@ -9212,26 +9151,20 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/ + &ff_pcm_u8_decoder, + &ff_libopus_decoder, + NULL }; -Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/parser_list.c -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/parser_list.c -@@ -0,0 +1,9 @@ ++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavcodec/parser_list.c +@@ -0,0 +1,7 @@ +static const AVCodecParser * const parser_list[] = { + &ff_flac_parser, + &ff_mpegaudio_parser, + &ff_opus_parser, + &ff_vorbis_parser, -+ &ff_vp3_parser, -+ &ff_vp8_parser, + &ff_vp9_parser, + NULL }; -Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat/demuxer_list.c -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat/demuxer_list.c ++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat/demuxer_list.c @@ -0,0 +1,8 @@ -+static const AVInputFormat * const demuxer_list[] = { ++static const FFInputFormat * const demuxer_list[] = { + &ff_flac_demuxer, + &ff_matroska_demuxer, + &ff_mov_demuxer, @@ -9239,24 +9172,18 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat + &ff_ogg_demuxer, + &ff_wav_demuxer, + NULL }; -Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat/muxer_list.c -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat/muxer_list.c ++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat/muxer_list.c @@ -0,0 +1,2 @@ +static const FFOutputFormat * const muxer_list[] = { + NULL }; -Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat/protocol_list.c -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat/protocol_list.c ++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavformat/protocol_list.c @@ -0,0 +1,2 @@ +static const URLProtocol * const url_protocols[] = { + NULL }; -Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavutil/avconfig.h -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavutil/avconfig.h ++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavutil/avconfig.h @@ -0,0 +1,6 @@ +/* Generated by ffmpeg configure */ +#ifndef AVUTIL_AVCONFIG_H @@ -9264,30 +9191,83 @@ Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavutil/a +#define AV_HAVE_BIGENDIAN 0 +#define AV_HAVE_FAST_UNALIGNED 0 +#endif /* AVUTIL_AVCONFIG_H */ -Index: src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavutil/ffversion.h -=================================================================== --- /dev/null -+++ src/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavutil/ffversion.h ++++ b/third_party/ffmpeg/chromium/config/Chromium/linux/riscv64/libavutil/ffversion.h @@ -0,0 +1,5 @@ +/* Automatically generated by version.sh, do not manually edit! */ +#ifndef AVUTIL_FFVERSION_H +#define AVUTIL_FFVERSION_H +#define FFMPEG_VERSION "5.1.git" +#endif /* AVUTIL_FFVERSION_H */ -Index: src/third_party/ffmpeg/ffmpeg_generated.gni -=================================================================== ---- src.orig/third_party/ffmpeg/ffmpeg_generated.gni -+++ src/third_party/ffmpeg/ffmpeg_generated.gni -@@ -638,3 +638,64 @@ if (use_linux_config && current_cpu == " - ] +--- a/media/ffmpeg/scripts/build_ffmpeg.py ++++ b/media/ffmpeg/scripts/build_ffmpeg.py +@@ -43,7 +43,7 @@ + + 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'], } +@@ -672,7 +672,7 @@ + '--disable-securetransport', + '--disable-faan', + '--disable-alsa', +- '--disable-iamf', ++ # '--disable-iamf', + # Disable automatically detected external libraries. This prevents + # automatic inclusion of things like hardware decoders. Each roll should +@@ -898,6 +898,10 @@ + '--extra-cflags=--target=mips64el-linux-gnuabi64', + '--extra-ldflags=--target=mips64el-linux-gnuabi64', + ]) ++ elif target_arch == 'riscv64': ++ configure_flags['Common'].extend([ ++ '--arch=riscv64', ++ ]) + else: + print('Error: Unknown target arch %r for target OS %r!' % + (target_arch, target_os), +--- a/third_party/ffmpeg/chromium/scripts/generate_gn.py ++++ b/third_party/ffmpeg/chromium/scripts/generate_gn.py +@@ -77,7 +77,7 @@ + _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']) + } +--- a/media/ffmpeg/scripts/robo_lib/config.py ++++ b/media/ffmpeg/scripts/robo_lib/config.py +@@ -189,6 +189,8 @@ + self._host_architecture = "mips64el" + elif platform.machine().startswith("arm"): + self._host_architecture = "arm" ++ elif platform.machine() == "riscv64": ++ self._host_architecture = "riscv64" + else: + raise ValueError( + f"Unrecognized CPU architecture: {platform.machine()}") +--- a/third_party/ffmpeg/ffmpeg_generated.gni ++++ b/third_party/ffmpeg/ffmpeg_generated.gni +@@ -697,3 +697,90 @@ + if (use_linux_config && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") { + ffmpeg_asm_sources += [ "libavcodec/x86/simple_idct10.asm" ] + } ++ +if (use_linux_config && current_cpu == "riscv64") { + ffmpeg_c_sources += [ ++ "libavcodec/riscv/aacencdsp_init.c", + "libavcodec/riscv/aacpsdsp_init.c", + "libavcodec/riscv/ac3dsp_init.c", + "libavcodec/riscv/alacdsp_init.c", + "libavcodec/riscv/audiodsp_init.c", ++ "libavcodec/riscv/blockdsp_init.c", ++ "libavcodec/riscv/bswapdsp_init.c", + "libavcodec/riscv/exrdsp_init.c", + "libavcodec/riscv/flacdsp_init.c", + "libavcodec/riscv/fmtconvert_init.c", @@ -9298,12 +9278,20 @@ Index: src/third_party/ffmpeg/ffmpeg_generated.gni + "libavcodec/riscv/jpeg2000dsp_init.c", + "libavcodec/riscv/llauddsp_init.c", + "libavcodec/riscv/llviddsp_init.c", ++ "libavcodec/riscv/llvidencdsp_init.c", ++ "libavcodec/riscv/lpc_init.c", ++ "libavcodec/riscv/me_cmp_init.c", + "libavcodec/riscv/opusdsp_init.c", + "libavcodec/riscv/pixblockdsp_init.c", ++ "libavcodec/riscv/rv34dsp_init.c", + "libavcodec/riscv/sbrdsp_init.c", ++ "libavcodec/riscv/svqenc_init.c", ++ "libavcodec/riscv/takdsp_init.c", + "libavcodec/riscv/utvideodsp_init.c", ++ "libavcodec/riscv/vc1dsp_init.c", + "libavcodec/riscv/vorbisdsp_init.c", -+ "libavcodec/riscv/bswapdsp_init.c", ++ "libavcodec/riscv/vp8dsp_init.c", ++ "libavfilter/riscv/af_afir_init.c", + "libavutil/riscv/cpu.c", + "libavutil/riscv/fixed_dsp_init.c", + "libavutil/riscv/float_dsp_init.c", @@ -9314,11 +9302,14 @@ Index: src/third_party/ffmpeg/ffmpeg_generated.gni + "libavutil/riscv/timer.h", + ] + ffmpeg_gas_sources += [ ++ "libavcodec/riscv/aacencdsp_rvv.S", + "libavcodec/riscv/aacpsdsp_rvv.S", + "libavcodec/riscv/ac3dsp_rvb.S", ++ "libavcodec/riscv/ac3dsp_rvv.S", + "libavcodec/riscv/alacdsp_rvv.S", + "libavcodec/riscv/audiodsp_rvf.S", + "libavcodec/riscv/audiodsp_rvv.S", ++ "libavcodec/riscv/blockdsp_rvv.S", + "libavcodec/riscv/bswapdsp_rvb.S", + "libavcodec/riscv/bswapdsp_rvv.S", + "libavcodec/riscv/exrdsp_rvv.S", @@ -9331,141 +9322,27 @@ Index: src/third_party/ffmpeg/ffmpeg_generated.gni + "libavcodec/riscv/jpeg2000dsp_rvv.S", + "libavcodec/riscv/llauddsp_rvv.S", + "libavcodec/riscv/llviddsp_rvv.S", ++ "libavcodec/riscv/llvidencdsp_rvv.S", ++ "libavcodec/riscv/lpc_rvv.S", ++ "libavcodec/riscv/me_cmp_rvv.S", + "libavcodec/riscv/opusdsp_rvv.S", + "libavcodec/riscv/pixblockdsp_rvi.S", + "libavcodec/riscv/pixblockdsp_rvv.S", ++ "libavcodec/riscv/rv34dsp_rvv.S", + "libavcodec/riscv/sbrdsp_rvv.S", ++ "libavcodec/riscv/svqenc_rvv.S", ++ "libavcodec/riscv/takdsp_rvv.S", + "libavcodec/riscv/utvideodsp_rvv.S", ++ "libavcodec/riscv/vc1dsp_rvv.S", + "libavcodec/riscv/vorbisdsp_rvv.S", ++ "libavcodec/riscv/vp8dsp_rvv.S", ++ "libavfilter/riscv/af_afir_rvv.S", + "libavutil/riscv/asm.S", ++ "libavutil/riscv/bswap_rvb.S", + "libavutil/riscv/fixed_dsp_rvv.S", + "libavutil/riscv/float_dsp_rvv.S", ++ "libswscale/riscv/rgb2rgb_rvb.S", + "libswscale/riscv/rgb2rgb_rvv.S", + ] +} -Index: src/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py -=================================================================== ---- src.orig/third_party/ffmpeg/chromium/scripts/build_ffmpeg.py -+++ src/third_party/ffmpeg/chromium/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' -+ 'ia32', 'x64', 'noasm-x64', 'arm', 'arm-neon', 'arm64', 'riscv64' - ], - 'mac': ['x64', 'arm64'], - 'win': ['ia32', 'x64', 'arm64'], -@@ -889,6 +889,10 @@ def ConfigureAndBuild(target_arch, targe - '--extra-cflags=--target=mips64el-linux-gnuabi64', - '--extra-ldflags=--target=mips64el-linux-gnuabi64', - ]) -+ elif target_arch == 'riscv64': -+ configure_flags['Common'].extend([ -+ '--arch=riscv64', -+ ]) - else: - print( - 'Error: Unknown target arch %r for target OS %r!' % (target_arch, -@@ -902,7 +906,7 @@ def ConfigureAndBuild(target_arch, targe - '--disable-inline-asm', - ]) - -- if 'win' not in target_os and 'android' not in target_os: -+ if 'win' not in target_os and 'android' not in target_os and 'riscv64' not in target_arch: - configure_flags['Common'].extend([ - '--enable-pic', - '--cc=clang', -Index: src/third_party/ffmpeg/chromium/scripts/copy_config.sh -=================================================================== ---- src.orig/third_party/ffmpeg/chromium/scripts/copy_config.sh -+++ src/third_party/ffmpeg/chromium/scripts/copy_config.sh -@@ -10,7 +10,7 @@ for os in android linux linux-noasm mac - # Copy config files for various architectures: - # - ia32/x64 have config.asm, config.h - # - arm/arm-neon have config.h -- for arch in arm arm-neon arm64 ia32 x64 mipsel mips64el; do -+ 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_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 -Index: src/third_party/ffmpeg/chromium/scripts/generate_gn.py -=================================================================== ---- src.orig/third_party/ffmpeg/chromium/scripts/generate_gn.py -+++ src/third_party/ffmpeg/chromium/scripts/generate_gn.py -@@ -82,7 +82,7 @@ _Attrs = ('ARCHITECTURE', 'TARGET', 'PLA - Attr = collections.namedtuple('Attr', _Attrs)(*_Attrs) - SUPPORT_MATRIX = { - Attr.ARCHITECTURE: -- set(['ia32', 'x64', 'arm', 'arm64', 'arm-neon']), -+ set(['ia32', 'x64', 'arm', 'arm64', 'arm-neon', 'riscv64']), - Attr.TARGET: - set(['Chromium', 'Chrome', 'ChromeOS']), - Attr.PLATFORM: -Index: src/third_party/ffmpeg/chromium/scripts/generate_gn_unittest.py -=================================================================== ---- src.orig/third_party/ffmpeg/chromium/scripts/generate_gn_unittest.py -+++ src/third_party/ffmpeg/chromium/scripts/generate_gn_unittest.py -@@ -329,6 +329,10 @@ class SourceSetUnittest(unittest.TestCas - f = SourceSet( - set(['common', 'arm-neon', 'chrome', 'chromeos']), - set([SourceListCondition('arm-neon', 'ChromeOS', 'linux')])) -+ g = SourceSet( -+ set(['common']), -+ set([SourceListCondition('riscv64', 'Chromium', 'linux')])) -+ - - expected = set() - expected.add( -@@ -340,7 +344,8 @@ class SourceSetUnittest(unittest.TestCas - SourceListCondition('x64', 'Chromium', 'linux'), - SourceListCondition('x64', 'Chrome', 'linux'), - SourceListCondition('arm', 'Chromium', 'linux'), -- SourceListCondition('arm-neon', 'ChromeOS', 'linux') -+ SourceListCondition('arm-neon', 'ChromeOS', 'linux'), -+ SourceListCondition('riscv64', 'Chromium', 'linux') - ]))) - expected.add( - SourceSet( -@@ -368,7 +373,7 @@ class SourceSetUnittest(unittest.TestCas - set(['arm-neon', 'chromeos']), - set([SourceListCondition('arm-neon', 'ChromeOS', 'linux')]))) - -- source_sets = gg.CreatePairwiseDisjointSets([a, b, c, d, e, f]) -+ source_sets = gg.CreatePairwiseDisjointSets([a, b, c, d, e, f, g]) - self.assertEqualSourceSets(expected, set(source_sets)) - - def testReduceConditions(self): -@@ -381,6 +386,7 @@ class SourceSetUnittest(unittest.TestCas - SourceListCondition('arm', 'Chromium', 'linux'), - SourceListCondition('arm64', 'Chromium', 'linux'), - SourceListCondition('arm-neon', 'Chromium', 'linux'), -+ SourceListCondition('riscv64', 'Chromium', 'linux'), - ])) - gg.ReduceConditionalLogic(a) - -Index: src/third_party/ffmpeg/chromium/scripts/robo_lib/config.py -=================================================================== ---- src.orig/third_party/ffmpeg/chromium/scripts/robo_lib/config.py -+++ src/third_party/ffmpeg/chromium/scripts/robo_lib/config.py -@@ -162,6 +162,8 @@ class RoboConfiguration: - self._host_architecture = "mips64el" - elif platform.machine().startswith("arm"): - self._host_architecture = "arm" -+ elif platform.machine() == "riscv64": -+ self._host_architecture = "riscv64" - else: - raise ValueError(f"Unrecognized CPU architecture: {platform.machine()}") - -@@ -235,9 +237,7 @@ class RoboConfiguration: - def EnsureNoMakeInfo(self): - """Ensure that makeinfo is not available.""" - if os.system("makeinfo --version > /dev/null 2>&1") == 0: -- raise errors.UserInstructions( -- "makeinfo is available and we don't need it, so please remove it\nExample: sudo apt-get remove texinfo" -- ) -+ pass - - def llvm_path(self): - return self._llvm_path diff --git a/www-client/chromium/files/05riscv-sandbox.patch b/www-client/chromium/files/riscv-sandbox.patch index eb14a7d..0753bb1 100644 --- a/www-client/chromium/files/05riscv-sandbox.patch +++ b/www-client/chromium/files/riscv-sandbox.patch @@ -1,33 +1,13 @@ -From 50538ec46b4ef930fedf96aa8d5519f678240dfa Mon Sep 17 00:00:00 2001 -From: kxxt <rsworktech@outlook.com> -Date: Sat, 12 Aug 2023 08:34:05 +0800 -Subject: [PATCH] upgpatch: fix sandbox for chromium +From 90499f55f949f95b01c84257d306cf209c04b431 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab <schwab@suse.de> +Date: Fri, 04 Mar 2022 15:27:35 +0100 +Subject: [PATCH] Add support for riscv64-linux +Change-Id: Ibcdaaba1b0c92a1cd85361b9859370c686832c49 --- - sandbox/features.gni | 3 +- - sandbox/linux/bpf_dsl/linux_syscall_ranges.h | 7 + - sandbox/linux/bpf_dsl/seccomp_macros.h | 40 + - .../seccomp-bpf-helpers/baseline_policy.cc | 11 +- - .../syscall_parameters_restrictions.cc | 3 +- - .../linux/seccomp-bpf-helpers/syscall_sets.cc | 69 +- - .../linux/seccomp-bpf-helpers/syscall_sets.h | 14 +- - sandbox/linux/seccomp-bpf/syscall.cc | 36 +- - sandbox/linux/services/credentials.cc | 2 +- - sandbox/linux/services/syscall_wrappers.cc | 2 +- - .../linux/syscall_broker/broker_process.cc | 20 +- - sandbox/linux/system_headers/linux_seccomp.h | 8 + - sandbox/linux/system_headers/linux_signal.h | 2 +- - sandbox/linux/system_headers/linux_stat.h | 2 +- - sandbox/linux/system_headers/linux_syscalls.h | 4 + - .../system_headers/riscv64_linux_syscalls.h | 1222 +++++++++++++++++ - .../linux/bpf_cros_amd_gpu_policy_linux.cc | 2 +- - sandbox/policy/linux/bpf_gpu_policy_linux.cc | 2 +- - .../policy/linux/bpf_network_policy_linux.cc | 2 +- - 19 files changed, 1397 insertions(+), 54 deletions(-) - create mode 100644 sandbox/linux/system_headers/riscv64_linux_syscalls.h diff --git a/sandbox/features.gni b/sandbox/features.gni -index 8434144118b49..8aa52983f78f8 100644 +index 8434144..8aa52983 100644 --- a/sandbox/features.gni +++ b/sandbox/features.gni @@ -9,7 +9,8 @@ @@ -41,7 +21,7 @@ index 8434144118b49..8aa52983f78f8 100644 # 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 diff --git a/sandbox/linux/bpf_dsl/linux_syscall_ranges.h b/sandbox/linux/bpf_dsl/linux_syscall_ranges.h -index 1d0590b7dd6ce..b722fbc95ee3e 100644 +index 1d0590b..b722fbc9 100644 --- a/sandbox/linux/bpf_dsl/linux_syscall_ranges.h +++ b/sandbox/linux/bpf_dsl/linux_syscall_ranges.h @@ -56,6 +56,13 @@ @@ -59,10 +39,10 @@ index 1d0590b7dd6ce..b722fbc95ee3e 100644 #error "Unsupported architecture" #endif diff --git a/sandbox/linux/bpf_dsl/seccomp_macros.h b/sandbox/linux/bpf_dsl/seccomp_macros.h -index 87d5825aa3ddb..cc9b89ba3714a 100644 +index 87d5825..49fc9a6 100644 --- a/sandbox/linux/bpf_dsl/seccomp_macros.h +++ b/sandbox/linux/bpf_dsl/seccomp_macros.h -@@ -343,6 +343,46 @@ struct regs_struct { +@@ -343,6 +343,48 @@ #define SECCOMP_PT_PARM4(_regs) (_regs).regs[3] #define SECCOMP_PT_PARM5(_regs) (_regs).regs[4] #define SECCOMP_PT_PARM6(_regs) (_regs).regs[5] @@ -85,6 +65,7 @@ index 87d5825aa3ddb..cc9b89ba3714a 100644 +#define SECCOMP_PARM4(_ctx) SECCOMP_REG(_ctx, REG_A0+3) +#define SECCOMP_PARM5(_ctx) SECCOMP_REG(_ctx, REG_A0+4) +#define SECCOMP_PARM6(_ctx) SECCOMP_REG(_ctx, REG_A0+5) ++#define SECCOMP_PARM7(_ctx) SECCOMP_REG(_ctx, REG_A0+6) + +#define SECCOMP_NR_IDX (offsetof(struct arch_seccomp_data, nr)) +#define SECCOMP_ARCH_IDX (offsetof(struct arch_seccomp_data, arch)) @@ -106,24 +87,82 @@ index 87d5825aa3ddb..cc9b89ba3714a 100644 +#define SECCOMP_PT_PARM4(_regs) (_regs).regs[REG_A0+3] +#define SECCOMP_PT_PARM5(_regs) (_regs).regs[REG_A0+4] +#define SECCOMP_PT_PARM6(_regs) (_regs).regs[REG_A0+5] ++#define SECCOMP_PT_PARM7(_regs) (_regs).regs[REG_A0+6] #else #error Unsupported target platform +diff --git a/sandbox/linux/integration_tests/bpf_dsl_seccomp_unittest.cc b/sandbox/linux/integration_tests/bpf_dsl_seccomp_unittest.cc +index 4a2721c..8ef9f51a 100644 +--- a/sandbox/linux/integration_tests/bpf_dsl_seccomp_unittest.cc ++++ b/sandbox/linux/integration_tests/bpf_dsl_seccomp_unittest.cc +@@ -17,6 +17,7 @@ + #include <sys/types.h> + #include <sys/utsname.h> + #include <unistd.h> ++#include <linux/elf.h> + + #include <memory> + #include <vector> +@@ -2029,7 +2030,15 @@ + BPF_ASSERT_EQ(kTraceData, data); + + regs_struct regs; ++#if defined(__riscv) ++ iovec iov; ++ iov.iov_base = ®s; ++ iov.iov_len = sizeof(regs); ++ BPF_ASSERT_NE(-1, ptrace(PTRACE_GETREGSET, pid, ++ reinterpret_case<void*>(NT_PRSTATUS), &iov)); ++#else + BPF_ASSERT_NE(-1, ptrace(PTRACE_GETREGS, pid, NULL, ®s)); ++#endif + switch (SECCOMP_PT_SYSCALL(regs)) { + case __NR_write: + // Skip writes to stdout, make it return kExpectedReturnValue. Allow +@@ -2037,7 +2046,14 @@ + if (SECCOMP_PT_PARM1(regs) == STDOUT_FILENO) { + BPF_ASSERT_NE(-1, SetSyscall(pid, ®s, -1)); + SECCOMP_PT_RESULT(regs) = kExpectedReturnValue; ++#if defined(__riscv) ++ iov.iov_len = sizeof(regs); ++ BPF_ASSERT_NE(-1, ptrace(PTRACE_SETREGSET, pid, ++ reinterpret_cast<void*>(NT_PRSTATUS), ++ &iov)); ++#else + BPF_ASSERT_NE(-1, ptrace(PTRACE_SETREGS, pid, NULL, ®s)); ++#endif + } + break; + +@@ -2045,7 +2061,13 @@ + // Rewrite to exit(kExpectedReturnValue). + BPF_ASSERT_NE(-1, SetSyscall(pid, ®s, __NR_exit)); + SECCOMP_PT_PARM1(regs) = kExpectedReturnValue; ++#if defined(__riscv) ++ iov.iov_len = sizeof(regs); ++ BPF_ASSERT_NE(-1, ptrace(PTRACE_SETREGSET, pid, ++ reinterpret_cast<void*>(NT_PRSTATUS), &iov)); ++#else + BPF_ASSERT_NE(-1, ptrace(PTRACE_SETREGS, pid, NULL, ®s)); ++#endif + break; + + default: diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc -index 7bde501115bdf..b92ab3901acd8 100644 +index 7bde501..b92ab39 100644 --- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc +++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc -@@ -59,6 +59,9 @@ bool IsBaselinePolicyAllowed(int sysno) { - #endif +@@ -60,6 +60,9 @@ #if defined(__mips__) SyscallSets::IsMipsPrivate(sysno) || -+#endif + #endif +#if defined(__riscv) + SyscallSets::IsRiscvPrivate(sysno) || - #endif ++#endif SyscallSets::IsAllowedOperationOnFd(sysno); // clang-format on -@@ -193,7 +196,7 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, + } +@@ -193,7 +196,7 @@ return RestrictFcntlCommands(); #endif @@ -132,7 +171,7 @@ index 7bde501115bdf..b92ab3901acd8 100644 // fork() is never used as a system call (clone() is used instead), but we // have seen it in fallback code on Android. if (sysno == __NR_fork) { -@@ -255,7 +258,7 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, +@@ -255,7 +258,7 @@ } #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ @@ -141,7 +180,7 @@ index 7bde501115bdf..b92ab3901acd8 100644 if (sysno == __NR_mmap) return RestrictMmapFlags(); #endif -@@ -276,7 +279,7 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, +@@ -276,7 +279,7 @@ return RestrictPrctl(); #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ @@ -150,7 +189,7 @@ index 7bde501115bdf..b92ab3901acd8 100644 if (sysno == __NR_socketpair) { // Only allow AF_UNIX, PF_UNIX. Crash if anything else is seen. static_assert(AF_UNIX == PF_UNIX, -@@ -366,7 +369,7 @@ ResultExpr EvaluateSyscallImpl(int fs_denied_errno, +@@ -366,7 +369,7 @@ // Allow creating pipes, but don't allow weird flags to pipe2(). // O_NOTIFICATION_PIPE (== O_EXCL) can be used to create // "notification pipes", which are rarely used. @@ -159,8 +198,39 @@ index 7bde501115bdf..b92ab3901acd8 100644 if (sysno == __NR_pipe) { return Allow(); } +diff --git a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc +index a0a8796..8bea4c9 100644 +--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc ++++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc +@@ -270,7 +270,7 @@ + } + + // Not all architectures can restrict the domain for socketpair(). +-#if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) ++#if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv) + BPF_DEATH_TEST_C(BaselinePolicy, + SocketpairWrongDomain, + DEATH_SEGV_MESSAGE(GetErrorMessageContentForTests()), +@@ -279,7 +279,7 @@ + std::ignore = socketpair(AF_INET, SOCK_STREAM, 0, sv); + _exit(1); + } +-#endif // defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) ++#endif // defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || defined(__riscv) + + BPF_TEST_C(BaselinePolicy, EPERM_open, BaselinePolicy) { + errno = 0; +@@ -343,7 +343,7 @@ + TEST_BASELINE_SIGSYS(__NR_syslog) + TEST_BASELINE_SIGSYS(__NR_timer_create) + +-#if !defined(__aarch64__) ++#if !defined(__aarch64__) && !defined(__riscv) + TEST_BASELINE_SIGSYS(__NR_inotify_init) + TEST_BASELINE_SIGSYS(__NR_vserver) + #endif diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc -index 026e86bd85bec..ebb72ddcd5f67 100644 +index 74112e8..b451c19 100644 --- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc +++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc @@ -37,6 +37,7 @@ @@ -171,20 +241,35 @@ index 026e86bd85bec..ebb72ddcd5f67 100644 !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. -@@ -449,7 +450,7 @@ ResultExpr RestrictPtrace() { +@@ -463,8 +464,10 @@ #endif return Switch(request) .Cases({ -#if !defined(__aarch64__) +#if !defined(__aarch64__) && !defined(__riscv) PTRACE_GETREGS, PTRACE_GETFPREGS, PTRACE_GET_THREAD_AREA, ++#endif ++#if !defined(__aarch64__) PTRACE_GETREGSET, #endif + #if defined(__arm__) +diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc +index 10e64a2c..ddfd6a7 100644 +--- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc ++++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc +@@ -7,6 +7,7 @@ + #include <errno.h> + #include <fcntl.h> + #include <linux/elf.h> ++#include <asm/ptrace.h> + #include <sched.h> + #include <sys/prctl.h> + #include <sys/ptrace.h> diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -index 27ea264070dcd..8fc2d3c354adb 100644 +index 4cde283..bc680424 100644 --- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc +++ b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc -@@ -103,7 +103,7 @@ bool SyscallSets::IsUmask(int sysno) { +@@ -103,7 +103,7 @@ // Both EPERM and ENOENT are valid errno unless otherwise noted in comment. bool SyscallSets::IsFileSystem(int sysno) { switch (sysno) { @@ -193,7 +278,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_access: // EPERM not a valid errno. case __NR_chmod: case __NR_chown: -@@ -136,7 +136,7 @@ bool SyscallSets::IsFileSystem(int sysno) { +@@ -136,7 +136,7 @@ case __NR_faccessat2: case __NR_fchmodat: case __NR_fchownat: // Should be called chownat ? @@ -202,7 +287,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_newfstatat: // fstatat(). EPERM not a valid errno. #elif defined(__i386__) || defined(__arm__) || \ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) -@@ -241,7 +241,7 @@ bool SyscallSets::IsAllowedFileSystemAccessViaFd(int sysno) { +@@ -241,7 +241,7 @@ case __NR_oldfstat: #endif #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ @@ -211,7 +296,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_sync_file_range: // EPERM not a valid errno. #elif defined(__arm__) case __NR_arm_sync_file_range: // EPERM not a valid errno. -@@ -260,7 +260,7 @@ bool SyscallSets::IsDeniedFileSystemAccessViaFd(int sysno) { +@@ -260,7 +260,7 @@ #if defined(__i386__) || defined(__arm__) case __NR_fchown32: #endif @@ -220,7 +305,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_getdents: // EPERM not a valid errno. #endif case __NR_getdents64: // EPERM not a valid errno. -@@ -339,7 +339,7 @@ bool SyscallSets::IsProcessPrivilegeChange(int sysno) { +@@ -339,7 +339,7 @@ bool SyscallSets::IsProcessGroupOrSession(int sysno) { switch (sysno) { case __NR_setpgid: @@ -229,7 +314,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_getpgrp: #endif case __NR_setsid: -@@ -373,7 +373,7 @@ bool SyscallSets::IsAllowedSignalHandling(int sysno) { +@@ -373,7 +373,7 @@ case __NR_rt_sigqueueinfo: case __NR_rt_sigsuspend: case __NR_rt_tgsigqueueinfo: @@ -238,7 +323,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_signalfd: #endif case __NR_signalfd4: -@@ -397,12 +397,12 @@ bool SyscallSets::IsAllowedOperationOnFd(int sysno) { +@@ -397,12 +397,12 @@ switch (sysno) { case __NR_close: case __NR_dup: @@ -253,7 +338,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_shutdown: #endif return true; -@@ -441,7 +441,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { +@@ -441,7 +441,7 @@ return true; case __NR_clone: // Should be parameter-restricted. case __NR_setns: // Privileged. @@ -262,7 +347,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_fork: #endif #if defined(__i386__) || defined(__x86_64__) -@@ -452,7 +452,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) { +@@ -452,7 +452,7 @@ #endif case __NR_set_tid_address: case __NR_unshare: @@ -271,7 +356,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_vfork: #endif default: -@@ -477,7 +477,7 @@ bool SyscallSets::IsAllowedFutex(int sysno) { +@@ -477,7 +477,7 @@ bool SyscallSets::IsAllowedEpoll(int sysno) { switch (sysno) { @@ -280,7 +365,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_epoll_create: case __NR_epoll_wait: #endif -@@ -499,7 +499,7 @@ bool SyscallSets::IsAllowedEpoll(int sysno) { +@@ -499,7 +499,7 @@ bool SyscallSets::IsDeniedGetOrModifySocket(int sysno) { switch (sysno) { #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ @@ -289,7 +374,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_accept: case __NR_accept4: case __NR_bind: -@@ -553,7 +553,7 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) { +@@ -553,7 +553,7 @@ case __NR_mincore: case __NR_mlockall: #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ @@ -298,7 +383,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_mmap: #endif #if defined(__i386__) || defined(__arm__) || \ -@@ -586,7 +586,7 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) { +@@ -586,7 +586,7 @@ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) case __NR__llseek: #endif @@ -307,7 +392,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_poll: #endif case __NR_ppoll: -@@ -607,7 +607,7 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) { +@@ -607,7 +607,7 @@ case __NR_recv: #endif #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ @@ -316,7 +401,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_recvfrom: // Could specify source. case __NR_recvmsg: // Could specify source. #endif -@@ -622,7 +622,7 @@ bool SyscallSets::IsAllowedGeneralIo(int sysno) { +@@ -622,7 +622,7 @@ case __NR_send: #endif #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ @@ -325,7 +410,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_sendmsg: // Could specify destination. case __NR_sendto: // Could specify destination. #endif -@@ -671,7 +671,7 @@ bool SyscallSets::IsSeccomp(int sysno) { +@@ -671,7 +671,7 @@ bool SyscallSets::IsAllowedBasicScheduler(int sysno) { switch (sysno) { case __NR_sched_yield: @@ -334,7 +419,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_pause: #endif case __NR_nanosleep: -@@ -755,7 +755,7 @@ bool SyscallSets::IsNuma(int sysno) { +@@ -755,7 +755,7 @@ case __NR_getcpu: case __NR_mbind: #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ @@ -343,7 +428,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_migrate_pages: #endif case __NR_move_pages: -@@ -790,7 +790,7 @@ bool SyscallSets::IsGlobalProcessEnvironment(int sysno) { +@@ -790,7 +790,7 @@ switch (sysno) { case __NR_acct: // Privileged. #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ @@ -352,7 +437,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_getrlimit: #endif #if defined(__i386__) || defined(__arm__) -@@ -825,7 +825,7 @@ bool SyscallSets::IsDebug(int sysno) { +@@ -825,7 +825,7 @@ bool SyscallSets::IsGlobalSystemStatus(int sysno) { switch (sysno) { @@ -361,7 +446,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR__sysctl: case __NR_sysfs: #endif -@@ -843,7 +843,7 @@ bool SyscallSets::IsGlobalSystemStatus(int sysno) { +@@ -843,7 +843,7 @@ bool SyscallSets::IsEventFd(int sysno) { switch (sysno) { @@ -370,47 +455,40 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_eventfd: #endif case __NR_eventfd2: -@@ -895,7 +895,8 @@ bool SyscallSets::IsKeyManagement(int sysno) { +@@ -895,6 +895,7 @@ } #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \ -+ defined(__riscv) ++ defined(__riscv) || \ + (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) bool SyscallSets::IsSystemVSemaphores(int sysno) { switch (sysno) { - case __NR_semctl: -@@ -915,7 +916,8 @@ bool SyscallSets::IsSystemVSemaphores(int sysno) { +@@ -914,7 +915,7 @@ + #endif #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \ - defined(__aarch64__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \ -+ defined(__riscv) +- defined(__aarch64__) || \ ++ defined(__aarch64__) || defined(__riscv) || \ + (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) // These give a lot of ambient authority and bypass the setuid sandbox. bool SyscallSets::IsSystemVSharedMemory(int sysno) { - switch (sysno) { -@@ -931,7 +933,8 @@ bool SyscallSets::IsSystemVSharedMemory(int sysno) { +@@ -931,6 +932,7 @@ #endif #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \ -+ defined(__riscv) ++ defined(__riscv) || \ + (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) bool SyscallSets::IsSystemVMessageQueue(int sysno) { switch (sysno) { - case __NR_msgctl: -@@ -962,7 +965,8 @@ bool SyscallSets::IsSystemVIpc(int sysno) { +@@ -962,6 +964,7 @@ bool SyscallSets::IsAnySystemV(int sysno) { #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ -- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) -+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \ -+ defined(__riscv) ++ defined(__riscv) || \ + (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) return IsSystemVMessageQueue(sysno) || IsSystemVSemaphores(sysno) || IsSystemVSharedMemory(sysno); - #elif defined(__i386__) || \ -@@ -999,7 +1003,7 @@ bool SyscallSets::IsAdvancedScheduler(int sysno) { +@@ -999,7 +1002,7 @@ bool SyscallSets::IsInotify(int sysno) { switch (sysno) { case __NR_inotify_add_watch: @@ -419,7 +497,7 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_inotify_init: #endif case __NR_inotify_init1: -@@ -1137,7 +1141,7 @@ bool SyscallSets::IsMisc(int sysno) { +@@ -1134,7 +1137,7 @@ #if defined(__x86_64__) case __NR_tuxcall: #endif @@ -428,13 +506,14 @@ index 27ea264070dcd..8fc2d3c354adb 100644 case __NR_vserver: #endif return true; -@@ -1196,6 +1200,17 @@ bool SyscallSets::IsMipsMisc(int sysno) { +@@ -1193,6 +1196,18 @@ } #endif // defined(__mips__) +#if defined(__riscv) +bool SyscallSets::IsRiscvPrivate(int sysno) { + switch (sysno) { ++ case __NR_riscv_hwprobe: + case __NR_riscv_flush_icache: + return true; + default: @@ -447,10 +526,10 @@ index 27ea264070dcd..8fc2d3c354adb 100644 switch (sysno) { case __NR_getitimer: diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h -index 9be7b03ec4377..41b3605dce15d 100644 +index 9be7b03..41b3605 100644 --- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h +++ b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h -@@ -52,7 +52,7 @@ class SANDBOX_EXPORT SyscallSets { +@@ -52,7 +52,7 @@ #endif #if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \ @@ -459,7 +538,7 @@ index 9be7b03ec4377..41b3605dce15d 100644 static bool IsNetworkSocketInformation(int sysno); #endif -@@ -79,18 +79,21 @@ class SANDBOX_EXPORT SyscallSets { +@@ -79,18 +79,21 @@ static bool IsAsyncIo(int sysno); static bool IsKeyManagement(int sysno); #if defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) || \ @@ -484,7 +563,7 @@ index 9be7b03ec4377..41b3605dce15d 100644 static bool IsSystemVMessageQueue(int sysno); #endif -@@ -117,6 +120,9 @@ class SANDBOX_EXPORT SyscallSets { +@@ -117,6 +120,9 @@ static bool IsMipsPrivate(int sysno); static bool IsMipsMisc(int sysno); #endif // defined(__mips__) @@ -495,10 +574,10 @@ index 9be7b03ec4377..41b3605dce15d 100644 }; diff --git a/sandbox/linux/seccomp-bpf/syscall.cc b/sandbox/linux/seccomp-bpf/syscall.cc -index 02cbb047c1558..57da8c1754f46 100644 +index 02cbb04..9eb97f27 100644 --- a/sandbox/linux/seccomp-bpf/syscall.cc +++ b/sandbox/linux/seccomp-bpf/syscall.cc -@@ -18,7 +18,7 @@ namespace sandbox { +@@ -18,7 +18,7 @@ namespace { #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \ @@ -507,7 +586,7 @@ index 02cbb047c1558..57da8c1754f46 100644 // Number that's not currently used by any Linux kernel ABIs. const int kInvalidSyscallNumber = 0x351d3; #else -@@ -308,6 +308,28 @@ asm(// We need to be able to tell the kernel exactly where we made a +@@ -308,6 +308,28 @@ "2:ret\n" ".cfi_endproc\n" ".size SyscallAsm, .-SyscallAsm\n" @@ -518,16 +597,16 @@ index 02cbb047c1558..57da8c1754f46 100644 + "SyscallAsm:\n" + ".cfi_startproc\n" + "bgez a0,1f\n" -+ "la a0,2f\n" ++ "lla a0,2f\n" + "j 2f\n" + "1:mv a7, a0\n" -+ "ld a0, (t0)\n" -+ "ld a1, 8(t0)\n" -+ "ld a2, 16(t0)\n" -+ "ld a3, 24(t0)\n" -+ "ld a4, 32(t0)\n" -+ "ld a5, 40(t0)\n" -+ "ld a6, 48(t0)\n" ++ "ld a0, (a1)\n" ++ "ld a2, 16(a1)\n" ++ "ld a3, 24(a1)\n" ++ "ld a4, 32(a1)\n" ++ "ld a5, 40(a1)\n" ++ "ld a6, 48(a1)\n" ++ "ld a1, 8(a1)\n" + // Enter the kernel + "scall\n" + "2:ret\n" @@ -536,30 +615,65 @@ index 02cbb047c1558..57da8c1754f46 100644 #endif ); // asm -@@ -425,6 +447,18 @@ intptr_t Syscall::Call(int nr, +@@ -319,6 +341,10 @@ + extern "C" { + intptr_t SyscallAsm(intptr_t nr, const intptr_t args[8]); + } ++#elif defined(__riscv) ++extern "C" { ++intptr_t SyscallAsm(intptr_t nr, const intptr_t args[7]); ++} + #endif + + } // namespace +@@ -351,6 +377,10 @@ + // where that makes sense. + #if defined(__mips__) + const intptr_t args[8] = {p0, p1, p2, p3, p4, p5, p6, p7}; ++#elif defined(__riscv) ++ DCHECK_EQ(p7, 0) << " Support for syscalls with more than seven arguments " ++ "not added for this architecture"; ++ const intptr_t args[7] = {p0, p1, p2, p3, p4, p5, p6}; + #else + DCHECK_EQ(p6, 0) << " Support for syscalls with more than six arguments not " + "added for this architecture"; +@@ -425,6 +455,8 @@ ret = inout; } +#elif defined(__riscv) -+ intptr_t ret; -+ { -+ register intptr_t inout __asm__("a0") = nr; -+ register const intptr_t* data __asm__("t0") = args; -+ asm volatile("jal SyscallAsm\n" -+ : "=r"(inout) -+ : "0"(inout), "r"(data) -+ : "memory", "a1", "a2", "a3", "a4", "a5", "a6", "a7"); -+ ret = inout; -+ } -+ ++ intptr_t ret = SyscallAsm(nr, args); #else #error "Unimplemented architecture" #endif +diff --git a/sandbox/linux/seccomp-bpf/trap.cc b/sandbox/linux/seccomp-bpf/trap.cc +index d466e62..a5ed98b7 100644 +--- a/sandbox/linux/seccomp-bpf/trap.cc ++++ b/sandbox/linux/seccomp-bpf/trap.cc +@@ -216,6 +216,18 @@ + SECCOMP_PARM6(ctx), + SECCOMP_PARM7(ctx), + SECCOMP_PARM8(ctx)); ++#elif defined(__riscv) ++ // RISC-V supports up to seven arguments for syscall. ++ // However, seccomp bpf can filter only up to six arguments, so using seven ++ // arguments has sense only when using UnsafeTrap() handler. ++ rc = Syscall::Call(SECCOMP_SYSCALL(ctx), ++ SECCOMP_PARM1(ctx), ++ SECCOMP_PARM2(ctx), ++ SECCOMP_PARM3(ctx), ++ SECCOMP_PARM4(ctx), ++ SECCOMP_PARM5(ctx), ++ SECCOMP_PARM6(ctx), ++ SECCOMP_PARM7(ctx)); + #else + rc = Syscall::Call(SECCOMP_SYSCALL(ctx), + SECCOMP_PARM1(ctx), diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc -index e284c59d239ae..5b5346a2778bc 100644 +index a33597c..d4180ac 100644 --- a/sandbox/linux/services/credentials.cc +++ b/sandbox/linux/services/credentials.cc -@@ -80,7 +80,7 @@ bool ChrootToSafeEmptyDir() { +@@ -80,7 +80,7 @@ pid_t pid = -1; alignas(16) char stack_buf[PTHREAD_STACK_MIN]; #if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \ @@ -569,10 +683,10 @@ index e284c59d239ae..5b5346a2778bc 100644 void* stack = stack_buf + sizeof(stack_buf); #else diff --git a/sandbox/linux/services/syscall_wrappers.cc b/sandbox/linux/services/syscall_wrappers.cc -index 7650e983b3802..bb4bd33236381 100644 +index 7650e98..bb4bd332 100644 --- a/sandbox/linux/services/syscall_wrappers.cc +++ b/sandbox/linux/services/syscall_wrappers.cc -@@ -61,7 +61,7 @@ long sys_clone(unsigned long flags, +@@ -61,7 +61,7 @@ #if defined(ARCH_CPU_X86_64) return syscall(__NR_clone, flags, child_stack, ptid, ctid, tls); #elif defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARM_FAMILY) || \ @@ -582,10 +696,10 @@ index 7650e983b3802..bb4bd33236381 100644 return syscall(__NR_clone, flags, child_stack, ptid, tls, ctid); #endif diff --git a/sandbox/linux/syscall_broker/broker_process.cc b/sandbox/linux/syscall_broker/broker_process.cc -index a55b548a8ec75..39279b947828e 100644 +index c6c1117..779065a 100644 --- a/sandbox/linux/syscall_broker/broker_process.cc +++ b/sandbox/linux/syscall_broker/broker_process.cc -@@ -122,44 +122,46 @@ bool BrokerProcess::IsSyscallBrokerable(int sysno, bool fast_check) const { +@@ -122,44 +122,46 @@ // and are default disabled in Android. So, we should refuse to broker them // to be consistent with the platform's restrictions. switch (sysno) { @@ -639,7 +753,7 @@ index a55b548a8ec75..39279b947828e 100644 case __NR_stat: case __NR_lstat: #endif -@@ -169,7 +171,7 @@ bool BrokerProcess::IsSyscallBrokerable(int sysno, bool fast_check) const { +@@ -169,7 +171,7 @@ #if defined(__NR_fstatat64) case __NR_fstatat64: #endif @@ -648,7 +762,7 @@ index a55b548a8ec75..39279b947828e 100644 case __NR_newfstatat: #endif return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT); -@@ -184,7 +186,7 @@ bool BrokerProcess::IsSyscallBrokerable(int sysno, bool fast_check) const { +@@ -184,7 +186,7 @@ return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT); #endif @@ -658,7 +772,7 @@ index a55b548a8ec75..39279b947828e 100644 return !fast_check || policy_->allowed_command_set.test(COMMAND_UNLINK); #endif diff --git a/sandbox/linux/system_headers/linux_seccomp.h b/sandbox/linux/system_headers/linux_seccomp.h -index 8690a96eb01b1..dec2afc744985 100644 +index 8690a96..dec2afc7 100644 --- a/sandbox/linux/system_headers/linux_seccomp.h +++ b/sandbox/linux/system_headers/linux_seccomp.h @@ -39,6 +39,10 @@ @@ -684,7 +798,7 @@ index 8690a96eb01b1..dec2afc744985 100644 #ifndef PR_SET_SECCOMP #define PR_SET_SECCOMP 22 diff --git a/sandbox/linux/system_headers/linux_signal.h b/sandbox/linux/system_headers/linux_signal.h -index 69ccaf1081578..2ffe30973cd32 100644 +index 69ccaf1..2ffe3097 100644 --- a/sandbox/linux/system_headers/linux_signal.h +++ b/sandbox/linux/system_headers/linux_signal.h @@ -13,7 +13,7 @@ @@ -697,10 +811,10 @@ index 69ccaf1081578..2ffe30973cd32 100644 #define LINUX_SIGHUP 1 #define LINUX_SIGINT 2 diff --git a/sandbox/linux/system_headers/linux_stat.h b/sandbox/linux/system_headers/linux_stat.h -index 3aae8cbced775..74977adb53caf 100644 +index 3aae8cb..74977adb 100644 --- a/sandbox/linux/system_headers/linux_stat.h +++ b/sandbox/linux/system_headers/linux_stat.h -@@ -150,7 +150,7 @@ struct kernel_stat { +@@ -150,7 +150,7 @@ int st_blocks; int st_pad4[14]; }; @@ -710,7 +824,7 @@ index 3aae8cbced775..74977adb53caf 100644 unsigned long st_dev; unsigned long st_ino; diff --git a/sandbox/linux/system_headers/linux_syscalls.h b/sandbox/linux/system_headers/linux_syscalls.h -index 438147b4018b6..d6de8c1cb2340 100644 +index 438147b..d6de8c1 100644 --- a/sandbox/linux/system_headers/linux_syscalls.h +++ b/sandbox/linux/system_headers/linux_syscalls.h @@ -35,5 +35,9 @@ @@ -725,10 +839,10 @@ index 438147b4018b6..d6de8c1cb2340 100644 diff --git a/sandbox/linux/system_headers/riscv64_linux_syscalls.h b/sandbox/linux/system_headers/riscv64_linux_syscalls.h new file mode 100644 -index 0000000000000..822f660dc5086 +index 0000000..50e043d0 --- /dev/null +++ b/sandbox/linux/system_headers/riscv64_linux_syscalls.h -@@ -0,0 +1,1222 @@ +@@ -0,0 +1,1226 @@ +// Copyright 2014 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -1714,6 +1828,10 @@ index 0000000000000..822f660dc5086 +#define __NR_recvmmsg 243 +#endif + ++#if !defined(__NR_riscv_hwprobe) ++#define __NR_riscv_hwprobe 258 ++#endif ++ +#if !defined(__NR_riscv_flush_icache) +#define __NR_riscv_flush_icache 259 +#endif @@ -1951,11 +2069,24 @@ index 0000000000000..822f660dc5086 +#endif + +#endif // SANDBOX_LINUX_SYSTEM_HEADERS_RISCV64_LINUX_SYSCALLS_H_ +diff --git a/sandbox/policy/linux/bpf_cdm_policy_linux.cc b/sandbox/policy/linux/bpf_cdm_policy_linux.cc +index 433720f..482ce1d 100644 +--- a/sandbox/policy/linux/bpf_cdm_policy_linux.cc ++++ b/sandbox/policy/linux/bpf_cdm_policy_linux.cc +@@ -33,7 +33,7 @@ + case __NR_ftruncate: + case __NR_fallocate: + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + case __NR_getrlimit: + #endif + #if defined(__i386__) || defined(__arm__) diff --git a/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc b/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc -index df2567f74981f..41e158a292369 100644 +index df2567f..41e158a 100644 --- a/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc +++ b/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc -@@ -38,7 +38,7 @@ ResultExpr CrosAmdGpuProcessPolicy::EvaluateSyscall(int sysno) const { +@@ -38,7 +38,7 @@ case __NR_sched_setscheduler: case __NR_sysinfo: case __NR_uname: @@ -1965,10 +2096,10 @@ index df2567f74981f..41e158a292369 100644 case __NR_stat: #endif diff --git a/sandbox/policy/linux/bpf_gpu_policy_linux.cc b/sandbox/policy/linux/bpf_gpu_policy_linux.cc -index 35ccbb7a7f82b..65a0587e25af5 100644 +index 35ccbb7..65a0587 100644 --- a/sandbox/policy/linux/bpf_gpu_policy_linux.cc +++ b/sandbox/policy/linux/bpf_gpu_policy_linux.cc -@@ -73,7 +73,7 @@ ResultExpr GpuProcessPolicy::EvaluateSyscall(int sysno) const { +@@ -73,7 +73,7 @@ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) case __NR_ftruncate64: #endif @@ -1978,10 +2109,10 @@ index 35ccbb7a7f82b..65a0587e25af5 100644 #endif case __NR_getdents64: diff --git a/sandbox/policy/linux/bpf_network_policy_linux.cc b/sandbox/policy/linux/bpf_network_policy_linux.cc -index 98e738a7e38be..b72914eafc775 100644 +index e5168ff0..3e6f821 100644 --- a/sandbox/policy/linux/bpf_network_policy_linux.cc +++ b/sandbox/policy/linux/bpf_network_policy_linux.cc -@@ -255,7 +255,7 @@ ResultExpr NetworkProcessPolicy::EvaluateSyscall(int sysno) const { +@@ -260,7 +260,7 @@ case __NR_fdatasync: case __NR_fsync: case __NR_mremap: @@ -1990,6 +2121,56 @@ index 98e738a7e38be..b72914eafc775 100644 case __NR_getdents: #endif case __NR_getdents64: --- -2.41.0 +diff --git a/sandbox/policy/linux/bpf_print_compositor_policy_linux.cc b/sandbox/policy/linux/bpf_print_compositor_policy_linux.cc +index bff338a..36acee52 100644 +--- a/sandbox/policy/linux/bpf_print_compositor_policy_linux.cc ++++ b/sandbox/policy/linux/bpf_print_compositor_policy_linux.cc +@@ -33,7 +33,7 @@ + case __NR_fdatasync: + case __NR_fsync: + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined (__riscv) + case __NR_getrlimit: + #endif + #if defined(__i386__) || defined(__arm__) +diff --git a/sandbox/policy/linux/bpf_renderer_policy_linux.cc b/sandbox/policy/linux/bpf_renderer_policy_linux.cc +index 0555a85..8f8907f 100644 +--- a/sandbox/policy/linux/bpf_renderer_policy_linux.cc ++++ b/sandbox/policy/linux/bpf_renderer_policy_linux.cc +@@ -82,7 +82,7 @@ + case __NR_ftruncate64: + #endif + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + case __NR_getrlimit: + case __NR_setrlimit: + // We allow setrlimit to dynamically adjust the address space limit as +diff --git a/sandbox/policy/linux/bpf_service_policy_linux.cc b/sandbox/policy/linux/bpf_service_policy_linux.cc +index 32754e6..3f42eabb 100644 +--- a/sandbox/policy/linux/bpf_service_policy_linux.cc ++++ b/sandbox/policy/linux/bpf_service_policy_linux.cc +@@ -26,7 +26,7 @@ + return RestrictIoctl(); + // Allow the system calls below. + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + case __NR_getrlimit: + #endif + #if defined(__i386__) || defined(__arm__) +diff --git a/sandbox/policy/linux/bpf_utility_policy_linux.cc b/sandbox/policy/linux/bpf_utility_policy_linux.cc +index e299ce99..ed110689 100644 +--- a/sandbox/policy/linux/bpf_utility_policy_linux.cc ++++ b/sandbox/policy/linux/bpf_utility_policy_linux.cc +@@ -34,7 +34,7 @@ + case __NR_fdatasync: + case __NR_fsync: + #if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \ +- defined(__aarch64__) ++ defined(__aarch64__) || defined(__riscv) + case __NR_getrlimit: + #endif + #if defined(__i386__) || defined(__arm__) diff --git a/www-client/chromium/files/09riscv.patch b/www-client/chromium/files/riscv.patch index f72a56c..f72a56c 100644 --- a/www-client/chromium/files/09riscv.patch +++ b/www-client/chromium/files/riscv.patch diff --git a/www-client/chromium/files/00swiftshader-MCDissassembler.patch b/www-client/chromium/files/swiftshader-MCDissassembler.patch index 59a06a1..59a06a1 100644 --- a/www-client/chromium/files/00swiftshader-MCDissassembler.patch +++ b/www-client/chromium/files/swiftshader-MCDissassembler.patch diff --git a/www-client/chromium/files/00swiftshader-use-llvm16.patch b/www-client/chromium/files/swiftshader-use-llvm16.patch index 107990b..107990b 100644 --- a/www-client/chromium/files/00swiftshader-use-llvm16.patch +++ b/www-client/chromium/files/swiftshader-use-llvm16.patch |