chromium: update to 97.0.4692.71.

ppc64le fixes by q66.
This commit is contained in:
Duncaen 2022-01-05 13:23:56 +01:00 committed by q66
parent 7dc61ee8ea
commit dc3f3b21af
13 changed files with 88 additions and 254 deletions

View File

@ -38,19 +38,20 @@
base::Optional<AddressInfo> ai;
--- net/dns/dns_config_service_linux.cc.orig
+++ net/dns/dns_config_service_linux.cc
@@ -432,12 +432,6 @@
@@ -443,11 +443,13 @@
base::ScopedBlockingCall scoped_blocking_call(
FROM_HERE, base::BlockingType::MAY_BLOCK);
- std::unique_ptr<struct __res_state> res = resolv_reader_->GetResState();
- if (res) {
- dns_config_ = ConvertResStateToDnsConfig(*res.get());
- resolv_reader_->CloseResState(res.get());
- }
-
+#if defined(__GLIBC__)
std::unique_ptr<struct __res_state> res = resolv_reader_->GetResState();
if (res) {
dns_config_ = ConvertResStateToDnsConfig(*res.get());
resolv_reader_->CloseResState(res.get());
}
+#endif
UMA_HISTOGRAM_BOOLEAN("Net.DNS.DnsConfig.Resolv.Read",
dns_config_.has_value());
if (!dns_config_.has_value())
--- net/dns/public/resolv_reader.cc.orig
+++ net/dns/public/resolv_reader.cc
@@ -20,19 +20,10 @@

View File

@ -1,15 +1,3 @@
--- base/allocator/partition_allocator/partition_alloc_config.h.orig
+++ base/allocator/partition_allocator/partition_alloc_config.h
@@ -114,7 +114,8 @@
// platforms complicates things. Note that Chromium is not officially supported
// on any big endian architecture as well.
#if !BUILDFLAG(PUT_REF_COUNT_IN_PREVIOUS_SLOT) && \
- defined(ARCH_CPU_LITTLE_ENDIAN)
+ defined(ARCH_CPU_LITTLE_ENDIAN) && \
+ !defined(__powerpc64__)
#define PA_HAS_FREELIST_HARDENING
#endif
diff --git sandbox/linux/bpf_dsl/seccomp_macros.h sandbox/linux/bpf_dsl/seccomp_macros.h
index a6aec544e..2a4a7f1bc 100644
--- sandbox/linux/bpf_dsl/seccomp_macros.h

View File

@ -1,49 +0,0 @@
From b94755e4633045be96ab5e0bdde0db7e16a804bd Mon Sep 17 00:00:00 2001
From: "liberato@chromium.org" <liberato@chromium.org>
Date: Fri, 6 Aug 2021 04:25:31 +0000
Subject: [PATCH] FFmpeg M94 roll.
Contains DEPS update + chromium-side fixes.
Bug: 1227259
Change-Id: I61c5eaa789ea12c17d0cbcbf837435b9cf32479b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3011889
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Commit-Queue: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#909174}
---
media/ffmpeg/ffmpeg_common.h | 1 +
media/filters/ffmpeg_demuxer.cc | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h
index cede8ac5a7..97d6307e28 100644
--- a/media/ffmpeg/ffmpeg_common.h
+++ b/media/ffmpeg/ffmpeg_common.h
@@ -29,6 +29,7 @@ extern "C" {
#include <libavformat/avformat.h>
#include <libavformat/avio.h>
#include <libavutil/avutil.h>
+#include <libavutil/channel_layout.h>
#include <libavutil/imgutils.h>
#include <libavutil/log.h>
#include <libavutil/mastering_display_metadata.h>
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index ac4713b072..605001d935 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -106,12 +106,12 @@ static base::TimeDelta ExtractStartTime(AVStream* stream) {
// Next try to use the first DTS value, for codecs where we know PTS == DTS
// (excludes all H26x codecs). The start time must be returned in PTS.
- if (stream->first_dts != kNoFFmpegTimestamp &&
+ if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp &&
stream->codecpar->codec_id != AV_CODEC_ID_HEVC &&
stream->codecpar->codec_id != AV_CODEC_ID_H264 &&
stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) {
const base::TimeDelta first_pts =
- ConvertFromTimeBase(stream->time_base, stream->first_dts);
+ ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream));
if (first_pts < start_time)
start_time = first_pts;
}

View File

@ -1,24 +0,0 @@
From 39e6e77798d86033e5eb1fb2a2caf20a5bca2262 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Sat, 9 Oct 2021 08:27:04 +0000
Subject: [PATCH] IWYU: add memory for std::unique_ptr in base::CommandLine
---
base/command_line.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/base/command_line.h b/base/command_line.h
index 706726a..ad02812 100644
--- a/base/command_line.h
+++ b/base/command_line.h
@@ -19,6 +19,7 @@
#include <stddef.h>
#include <functional>
#include <map>
+#include <memory>
#include <string>
#include <vector>
--
2.32.0

View File

@ -1,25 +0,0 @@
From 3a7b8dd0fcceffcfd0ea7e3186d2850deed7a00b Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Wed, 6 Oct 2021 15:36:47 +0000
Subject: [PATCH] IWYU: add vector for std::vector in CouponDB
---
chrome/browser/commerce/coupons/coupon_db.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/chrome/browser/commerce/coupons/coupon_db.h b/chrome/browser/commerce/coupons/coupon_db.h
index f0758f4..93e2dd3 100644
--- a/chrome/browser/commerce/coupons/coupon_db.h
+++ b/chrome/browser/commerce/coupons/coupon_db.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_COMMERCE_COUPONS_COUPON_DB_H_
#define CHROME_BROWSER_COMMERCE_COUPONS_COUPON_DB_H_
+#include <vector>
+
#include "base/callback_helpers.h"
#include "base/memory/weak_ptr.h"
#include "url/gurl.h"
--
2.32.0

View File

@ -1,24 +0,0 @@
From 9e36b3c28935fb50d43ccef443be786a8e3f8a5f Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Sat, 9 Oct 2021 16:17:34 +0000
Subject: [PATCH] IWYU: add string.h for memcmp in ui:: DrmRenderNodePathFinder
---
ui/ozone/platform/wayland/gpu/drm_render_node_path_finder.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/ui/ozone/platform/wayland/gpu/drm_render_node_path_finder.cc b/ui/ozone/platform/wayland/gpu/drm_render_node_path_finder.cc
index 06776a7..d5b7b71 100644
--- a/ui/ozone/platform/wayland/gpu/drm_render_node_path_finder.cc
+++ b/ui/ozone/platform/wayland/gpu/drm_render_node_path_finder.cc
@@ -5,6 +5,7 @@
#include "ui/ozone/platform/wayland/gpu/drm_render_node_path_finder.h"
#include <fcntl.h>
+#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
--
2.32.0

View File

@ -1,31 +0,0 @@
From 86b1886673c3e75d3a7b8c802b3e9fa6ea945a1e Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Fri, 08 Oct 2021 06:32:55 +0000
Subject: [PATCH] libstdc++: no implicit conversion from tuple created with std::tie to an std::pair in restricted cookie manager.
Fix compilation error:
../../services/network/restricted_cookie_manager.cc:164:30: error: no match for operator[] (operand types are network::CookieAccessesByURLAndSite {aka std::map<std::pair<GURL, net::SiteForCookies>, std::unique_ptr<std::set<net::CookieWithAccessResult, network::CookieWithAccessResultComparer> > >} and std::tuple<const GURL&, const net::SiteForCookies&>)
There is no conversion from tuple to pair.
Bug: 957519
Change-Id: Idf29c7b21895ae28f45b35d6193ab4ac555945c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3211752
Reviewed-by: Robbie McElrath <rmcelrath@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/main@{#929597}
---
diff --git a/services/network/restricted_cookie_manager.cc b/services/network/restricted_cookie_manager.cc
index 425426f..c8c10c6 100644
--- a/services/network/restricted_cookie_manager.cc
+++ b/services/network/restricted_cookie_manager.cc
@@ -161,7 +161,7 @@
const GURL& url,
const net::SiteForCookies& site_for_cookies) {
std::unique_ptr<CookieAccesses>& entry =
- recent_cookie_accesses_[std::tie(url, site_for_cookies)];
+ recent_cookie_accesses_[std::make_pair(url, site_for_cookies)];
if (!entry) {
entry = std::make_unique<CookieAccesses>();
}

View File

@ -0,0 +1,12 @@
diff --git a/build/linux/unbundle/ffmpeg.gn b/build/linux/unbundle/ffmpeg.gn
index 16e20744706..6a079b32221 100644
--- a/build/linux/unbundle/ffmpeg.gn
+++ b/build/linux/unbundle/ffmpeg.gn
@@ -12,6 +12,7 @@ pkg_config("system_ffmpeg") {
"libavformat",
"libavutil",
]
+ defines = [ "av_stream_get_first_dts(stream)=stream->first_dts" ]
}
buildflag_header("ffmpeg_features") {

View File

@ -1,31 +0,0 @@
From 271e45339b7b969e98ccef7837cb1b15480b07fc Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Thu, 4 Nov 2021 18:58:34 +0000
Subject: [PATCH] unbundle: fix visibility of //build/config/freetype
For system freetype //build/linux:freetype_from_pkgconfig is restricted
to //third_party:freetype_harfbuzz and //third_party/harfbuzz-ng:harfbuzz_source.
However //build/config/freetype:freetype is accessing it too.
Bug: None
Change-Id: Ic4a37b01e4ae221372a9220cbad04c598b844c21
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3259304
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/main@{#938388}
---
build/linux/BUILD.gn | 1 +
1 file changed, 1 insertion(+)
diff --git a/build/linux/BUILD.gn b/build/linux/BUILD.gn
index 54314c7687..cd49e3d524 100644
--- a/build/linux/BUILD.gn
+++ b/build/linux/BUILD.gn
@@ -23,6 +23,7 @@ if (use_system_freetype) {
# the system, use with caution,for details see build/config/freetype/BUILD.gn.
pkg_config("freetype_from_pkgconfig") {
visibility = [
+ "//build/config/freetype:freetype",
"//third_party:freetype_harfbuzz",
"//third_party/harfbuzz-ng:harfbuzz_source",
]

View File

@ -0,0 +1,56 @@
commit 45809f85bc3524f867e6e954f444fddd2333245a
Author: q66 <daniel@octaforge.org>
Date: Fri Jan 7 18:18:52 2022 +0100
switch ppc64 to 4k pages
since the partition allocator appears to hate larger constants
and at this point errors at compile time and i am not willing
to wade through this pile of curse and we use 4k kernels anyway,
assume 4K pages for ppc64
diff --git a/base/allocator/partition_allocator/page_allocator_constants.h b/base/allocator/partition_allocator/page_allocator_constants.h
index bfd5753..045082b 100644
--- a/base/allocator/partition_allocator/page_allocator_constants.h
+++ b/base/allocator/partition_allocator/page_allocator_constants.h
@@ -40,7 +40,7 @@ namespace base {
PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t
PageAllocationGranularityShift() {
-#if defined(OS_WIN) || defined(ARCH_CPU_PPC64)
+#if defined(OS_WIN)
// Modern ppc64 systems support 4kB (shift = 12) and 64kB (shift = 16) page
// sizes. Since 64kB is the de facto standard on the platform and binaries
// compiled for 64kB are likely to work on 4kB systems, 64kB is a good choice
diff --git a/base/allocator/partition_allocator/partition_alloc_constants.h b/base/allocator/partition_allocator/partition_alloc_constants.h
index 0b9260d..3e054ec 100644
--- a/base/allocator/partition_allocator/partition_alloc_constants.h
+++ b/base/allocator/partition_allocator/partition_alloc_constants.h
@@ -54,11 +54,6 @@ PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t
PartitionPageShift() {
return 16; // 64 KiB
}
-#elif defined(ARCH_CPU_PPC64)
-PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t
-PartitionPageShift() {
- return 18; // 256 KiB
-}
#elif defined(OS_APPLE) && defined(ARCH_CPU_64_BITS)
PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t
PartitionPageShift() {
diff --git a/base/allocator/partition_allocator/partition_alloc_forward.h b/base/allocator/partition_allocator/partition_alloc_forward.h
index 938ea38..9414b41 100644
--- a/base/allocator/partition_allocator/partition_alloc_forward.h
+++ b/base/allocator/partition_allocator/partition_alloc_forward.h
@@ -26,7 +26,10 @@ namespace base {
//
// __STDCPP_DEFAULT_NEW_ALIGNMENT__ is C++17. As such, it is not defined on all
// platforms, as Chrome's requirement is C++14 as of 2020.
-#if defined(__STDCPP_DEFAULT_NEW_ALIGNMENT__)
+#if defined(__powerpc64__)
+/* we want this to be 16 here always */
+constexpr size_t kAlignment = 16;
+#elif defined(__STDCPP_DEFAULT_NEW_ALIGNMENT__)
constexpr size_t kAlignment =
std::max(alignof(max_align_t), __STDCPP_DEFAULT_NEW_ALIGNMENT__);
#else

View File

@ -3242,44 +3242,6 @@ index 30a2ab21d..60509f21d 100644
#endif
}
diff --git a/third_party/crashpad/crashpad/util/posix/signals_test.cc b/third_party/crashpad/crashpad/util/posix/signals_test.cc
index 54cc2f19f..298b5c993 100644
--- a/third_party/crashpad/crashpad/util/posix/signals_test.cc
+++ b/third_party/crashpad/crashpad/util/posix/signals_test.cc
@@ -46,9 +46,9 @@ bool CanCauseSignal(int sig) {
return sig == SIGABRT ||
sig == SIGALRM ||
sig == SIGBUS ||
-#if !defined(ARCH_CPU_ARM64)
+#if !defined(ARCH_CPU_ARM64) && !defined(ARCH_CPU_PPC64)
sig == SIGFPE ||
-#endif // !defined(ARCH_CPU_ARM64)
+#endif // !defined(ARCH_CPU_ARM64) && !defined(ARCH_CPU_PPC64)
#if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARMEL)
sig == SIGILL ||
#endif // defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARMEL)
@@ -117,9 +117,11 @@ void CauseSignal(int sig) {
break;
}
-#if !defined(ARCH_CPU_ARM64)
+#if !defined(ARCH_CPU_ARM64) && !defined(ARCH_CPU_PPC64)
// ARM64 has hardware integer division instructions that dont generate a
// trap for divide-by-zero, so this doesnt produce SIGFPE.
+ //
+ // PPC64 fixed-point division by zero also doesn't produce a SIGFPE.
case SIGFPE: {
// Optimization makes this tricky, so get zero from a system call likely
// to succeed, and try to do something with the result.
@@ -137,7 +139,7 @@ void CauseSignal(int sig) {
fstat(quotient, &stat_buf);
break;
}
-#endif // ARCH_CPU_ARM64
+#endif // !defined(ARCH_CPU_ARM64) && !defined(ARCH_CPU_PPC64)
#if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARMEL)
case SIGILL: {
diff --git a/third_party/dav1d/BUILD.gn b/third_party/dav1d/BUILD.gn
index 6b4566fc3..c07f732ad 100644
--- a/third_party/dav1d/BUILD.gn

View File

@ -1,7 +1,7 @@
# Template file for 'chromium'
pkgname=chromium
# See https://chromiumdash.appspot.com/releases?platform=Linux for the latest version
version=96.0.4664.110
version=97.0.4692.71
revision=1
archs="i686* x86_64* aarch64* armv7l* ppc64le*"
short_desc="Google's attempt at creating a safer, faster, and more stable browser"
@ -9,7 +9,7 @@ maintainer="Duncaen <duncaen@voidlinux.org>"
license="BSD-3-Clause"
homepage="https://www.chromium.org/"
distfiles="https://commondatastorage.googleapis.com/chromium-browser-official/${pkgname}-${version}.tar.xz"
checksum=36a99d29c2e93a9975be53648f2cd3ffa4ee43730f217a2e7ed88c1901a671e8
checksum=8ae189d44b782fe4d4942962260dbf5f753abf141148727d9fe82852778dfd7c
lib32disabled=yes
@ -28,7 +28,7 @@ makedepends="libpng-devel gtk+-devel gtk+3-devel nss-devel pciutils-devel
libXScrnSaver-devel alsa-lib-devel snappy-devel libdrm-devel
libxml2-devel libxslt-devel $(vopt_if pulseaudio pulseaudio-devel) libexif-devel
libXcursor-devel libflac-devel speex-devel libmtp-devel libwebp-devel
libjpeg-turbo-devel libevent-devel json-c-devel harfbuzz-devel
libjpeg-turbo-devel libevent-devel json-c-devel
minizip-devel jsoncpp-devel zlib-devel libcap-devel libXdamage-devel
re2-devel fontconfig-devel freetype-devel opus-devel libatomic-devel
ffmpeg-devel libva-devel python-setuptools xcb-proto libcurl-devel
@ -42,7 +42,7 @@ esac
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" libX11-devel libxcb-devel pciutils-devel libXext-devel libglvnd-devel
libjpeg-turbo-devel libXi-devel nss-devel libpng-devel libwebp-devel harfbuzz-devel
libjpeg-turbo-devel libXi-devel nss-devel libpng-devel libwebp-devel
libxml2-devel $(vopt_if pulseaudio pulseaudio-devel) libxslt-devel libxkbcommon-devel
$(vopt_if pipewire pipewire-devel) ffmpeg-devel opus-devel pango-devel libva-devel
libcurl-devel snappy-devel re2-devel libXrandr-devel libXcomposite-devel cups-devel
@ -166,12 +166,12 @@ do_configure() {
# use_system_v8=1
# use_system_zlib=1
# bzip2 jsoncpp minizip xdg_utils speex
# XXX: harfbuzz-ng use builtin one until system-wide is updated >=3.0.0
system="
ffmpeg
flac
fontconfig
freetype
harfbuzz-ng
libdrm
libevent
libjpeg
@ -234,7 +234,7 @@ do_configure() {
'enable_widevine=true'
'enable_hangout_services_extension=true'
'use_system_harfbuzz=true'
'use_system_harfbuzz=false'
'use_system_wayland_scanner=true'
'use_cups=true'
@ -320,7 +320,7 @@ do_configure() {
do_build() {
_setup_toolchain
ninja -C out/Release ${makejobs} chrome chromedriver chrome_crashpad_handler
CCACHE_SLOPPINESS=include_file_mtime ninja -C out/Release ${makejobs} chrome chromedriver chrome_crashpad_handler
}
do_install() {