chromium: update to 99.0.4844.51.
This commit is contained in:
parent
4c8cbdaf23
commit
e096309822
27 changed files with 426 additions and 492 deletions
|
@ -1,29 +0,0 @@
|
|||
--- base/threading/platform_thread_linux.cc.orig
|
||||
+++ base/threading/platform_thread_linux.cc
|
||||
@@ -99 +99,2 @@ size_t GetDefaultThreadStackSize(const p
|
||||
- return 0;
|
||||
+ // use 8mb like glibc to avoid running out of space
|
||||
+ return (1 << 23);
|
||||
--- chrome/browser/shutdown_signal_handlers_posix.cc.orig
|
||||
+++ chrome/browser/shutdown_signal_handlers_posix.cc
|
||||
@@ -187,11 +187,19 @@
|
||||
g_shutdown_pipe_read_fd = pipefd[0];
|
||||
g_shutdown_pipe_write_fd = pipefd[1];
|
||||
#if !defined(ADDRESS_SANITIZER)
|
||||
+# if defined(__GLIBC__)
|
||||
const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2;
|
||||
+# else
|
||||
+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2 * 8; // match up musls 2k PTHREAD_STACK_MIN with glibcs 16k
|
||||
+# endif
|
||||
#else
|
||||
// ASan instrumentation bloats the stack frames, so we need to increase the
|
||||
// stack size to avoid hitting the guard page.
|
||||
+# if defined(__GLIBC__)
|
||||
const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4;
|
||||
+# else
|
||||
+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4 * 8; // match up musls 2k PTHREAD_STACK_MIN with glibcs 16k
|
||||
+# endif
|
||||
#endif
|
||||
ShutdownDetector* detector = new ShutdownDetector(
|
||||
g_shutdown_pipe_read_fd, shutdown_callback, task_runner);
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
--- third_party/crashpad/crashpad/util/linux/ptracer.cc
|
||||
+++ third_party/crashpad/crashpad/util/linux/ptracer.cc
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#if defined(ARCH_CPU_X86_FAMILY)
|
||||
#include <asm/ldt.h>
|
||||
+#include <asm/ptrace-abi.h>
|
||||
#endif
|
||||
|
||||
namespace crashpad {
|
||||
|
||||
--- third_party/crashpad/crashpad/compat/linux/sys/ptrace.h
|
||||
+++ third_party/crashpad/crashpad/compat/linux/sys/ptrace.h
|
||||
@@ -17,7 +17,9 @@
|
||||
|
||||
#include_next <sys/ptrace.h>
|
||||
|
||||
+#if defined(__GLIBC__)
|
||||
#include <sys/cdefs.h>
|
||||
+#endif
|
||||
|
||||
// https://sourceware.org/bugzilla/show_bug.cgi?id=22433
|
||||
#if !defined(PTRACE_GET_THREAD_AREA) && !defined(PT_GET_THREAD_AREA) && \
|
|
@ -1,212 +0,0 @@
|
|||
--- ./third_party/lss/linux_syscall_support.h.orig
|
||||
+++ ./third_party/lss/linux_syscall_support.h
|
||||
@@ -1127,6 +1127,12 @@
|
||||
#ifndef __NR_fallocate
|
||||
#define __NR_fallocate 285
|
||||
#endif
|
||||
+
|
||||
+#undef __NR_pread
|
||||
+#define __NR_pread __NR_pread64
|
||||
+#undef __NR_pwrite
|
||||
+#define __NR_pwrite __NR_pwrite64
|
||||
+
|
||||
/* End of x86-64 definitions */
|
||||
#elif defined(__mips__)
|
||||
#if _MIPS_SIM == _MIPS_SIM_ABI32
|
||||
--- ./third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h.orig
|
||||
+++ ./third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
|
||||
@@ -37,6 +37,10 @@
|
||||
#include "common/memory.h"
|
||||
#include "google_breakpad/common/minidump_format.h"
|
||||
|
||||
+#if !defined(__GLIBC__)
|
||||
+ #define _libc_fpstate _fpstate
|
||||
+#endif
|
||||
+
|
||||
namespace google_breakpad {
|
||||
|
||||
// Wraps platform-dependent implementations of accessors to ucontext_t structs.
|
||||
--- ./third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h.orig
|
||||
+++ ./third_party/breakpad/breakpad/src/common/linux/elf_core_dump.h
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <elf.h>
|
||||
#include <link.h>
|
||||
#include <stddef.h>
|
||||
+#include <limits.h>
|
||||
|
||||
#include "common/memory_range.h"
|
||||
|
||||
--- ./sandbox/linux/suid/process_util.h.orig
|
||||
+++ ./sandbox/linux/suid/process_util.h
|
||||
@@ -11,6 +11,14 @@
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
+// Some additional functions
|
||||
+# define TEMP_FAILURE_RETRY(expression) \
|
||||
+ (__extension__ \
|
||||
+ ({ long int __result; \
|
||||
+ do __result = (long int) (expression); \
|
||||
+ while (__result == -1L && errno == EINTR); \
|
||||
+ __result; }))
|
||||
+
|
||||
// This adjusts /proc/process/oom_score_adj so the Linux OOM killer
|
||||
// will prefer certain process types over others. The range for the
|
||||
// adjustment is [-1000, 1000], with [0, 1000] being user accessible.
|
||||
--- ./sandbox/linux/seccomp-bpf/trap.cc.orig 2020-04-12 08:26:40.184159217 -0400
|
||||
+++ ./sandbox/linux/seccomp-bpf/trap.cc 2020-04-12 08:46:16.737191222 -0400
|
||||
@@ -174,7 +174,7 @@
|
||||
// If the version of glibc doesn't include this information in
|
||||
// siginfo_t (older than 2.17), we need to explicitly copy it
|
||||
// into an arch_sigsys structure.
|
||||
- memcpy(&sigsys, &info->_sifields, sizeof(sigsys));
|
||||
+ memcpy(&sigsys, &info->__sifields, sizeof(sigsys));
|
||||
#endif
|
||||
|
||||
#if defined(__mips__)
|
||||
--- ./third_party/ffmpeg/libavutil/cpu.c.orig
|
||||
+++ ./third_party/ffmpeg/libavutil/cpu.c
|
||||
@@ -38,7 +38,6 @@
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
-#include <sys/sysctl.h>
|
||||
#endif
|
||||
#if HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
diff --git a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
|
||||
--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2021-03-10 07:23:00.145810088 -0500
|
||||
+++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc 2021-03-10 10:57:19.405962671 -0500
|
||||
@@ -55,7 +55,9 @@
|
||||
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
|
||||
// of lacros-chrome is complete.
|
||||
#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
+#if defined(__GLIBC__)
|
||||
#include <gnu/libc-version.h>
|
||||
+#endif
|
||||
|
||||
#include "base/linux_util.h"
|
||||
#include "base/strings/string_split.h"
|
||||
@@ -316,7 +318,7 @@
|
||||
void RecordLinuxGlibcVersion() {
|
||||
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
|
||||
// of lacros-chrome is complete.
|
||||
-#if defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
+#if defined(__GLIBC__) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
base::Version version(gnu_get_libc_version());
|
||||
|
||||
UMALinuxGlibcVersion glibc_version_result = UMA_LINUX_GLIBC_NOT_PARSEABLE;
|
||||
--- services/device/serial/serial_io_handler_posix.cc.orig 2019-07-03 10:57:32.568171835 -0400
|
||||
+++ services/device/serial/serial_io_handler_posix.cc 2019-07-03 10:57:16.867983031 -0400
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <termios.h>
|
||||
+#include <asm-generic/ioctls.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
diff --git a/third_party/ots/include/opentype-sanitiser.h b/third_party/ots/include/opentype-sanitiser.h
|
||||
--- third_party/ots/src/include/opentype-sanitiser.h
|
||||
+++ third_party/ots/src/include/opentype-sanitiser.h
|
||||
@@ -20,6 +20,7 @@ typedef unsigned __int64 uint64_t;
|
||||
#define htonl(x) _byteswap_ulong (x)
|
||||
#define htons(x) _byteswap_ushort (x)
|
||||
#else
|
||||
+#include <sys/types.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
--- ./base/logging.cc.orig 2021-01-20 12:09:54.227038757 -0500
|
||||
+++ ./base/logging.cc 2021-01-20 12:24:32.600301351 -0500
|
||||
@@ -557,8 +557,7 @@
|
||||
|
||||
LogMessage::~LogMessage() {
|
||||
size_t stack_start = stream_.tellp();
|
||||
-#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && !defined(__UCLIBC__) && \
|
||||
- !defined(OS_AIX)
|
||||
+#if !defined(OFFICIAL_BUILD) && !defined(OS_NACL) && defined(__GLIBC__)
|
||||
if (severity_ == LOGGING_FATAL && !base::debug::BeingDebugged()) {
|
||||
// Include a stack trace on a fatal, unless a debugger is attached.
|
||||
base::debug::StackTrace stack_trace;
|
||||
--- ./third_party/blink/renderer/platform/wtf/stack_util.cc.orig
|
||||
+++ ./third_party/blink/renderer/platform/wtf/stack_util.cc
|
||||
@@ -28,7 +28,7 @@
|
||||
// FIXME: On Mac OSX and Linux, this method cannot estimate stack size
|
||||
// correctly for the main thread.
|
||||
|
||||
-#elif defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
||||
+#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
||||
defined(OS_FUCHSIA)
|
||||
// pthread_getattr_np() can fail if the thread is not invoked by
|
||||
// pthread_create() (e.g., the main thread of blink_unittests).
|
||||
@@ -96,7 +96,7 @@
|
||||
}
|
||||
|
||||
void* GetStackStart() {
|
||||
-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
||||
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
||||
defined(OS_FUCHSIA)
|
||||
pthread_attr_t attr;
|
||||
int error;
|
||||
--- ./net/dns/dns_config_service_posix.cc.orig
|
||||
+++ ./net/dns/dns_config_service_posix.cc
|
||||
@@ -122,7 +122,7 @@
|
||||
ConfigParsePosixResult result;
|
||||
config->unhandled_options = false;
|
||||
// TODO(fuchsia): Use res_ninit() when it's implemented on Fuchsia.
|
||||
-#if defined(OS_OPENBSD) || defined(OS_FUCHSIA)
|
||||
+#if defined(OS_OPENBSD) || defined(OS_FUCHSIA) || defined(_GNU_SOURCE)
|
||||
// Note: res_ninit in glibc always returns 0 and sets RES_INIT.
|
||||
// res_init behaves the same way.
|
||||
memset(&_res, 0, sizeof(_res));
|
||||
--- third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Signals.inc.orig 2019-06-18 11:51:17.000000000 -0400
|
||||
+++ third_party/swiftshader/third_party/llvm-subzero/lib/Support/Unix/Signals.inc 2019-07-03 12:32:50.938758186 -0400
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
-#if HAVE_EXECINFO_H
|
||||
+#if HAVE_EXECINFO_H && defined(__GLIBC__)
|
||||
# include <execinfo.h> // For backtrace().
|
||||
#endif
|
||||
#if HAVE_SIGNAL_H
|
||||
@@ -52,6 +52,7 @@
|
||||
#include <unwind.h>
|
||||
#else
|
||||
#undef HAVE__UNWIND_BACKTRACE
|
||||
+#undef HAVE_BACKTRACE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
--- third_party/nasm/nasmlib/realpath.c.orig 2019-07-03 12:23:05.021949895 -0400
|
||||
+++ third_party/nasm/nasmlib/realpath.c 2019-07-03 12:24:24.246862665 -0400
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
#include "nasmlib.h"
|
||||
|
||||
-#ifdef HAVE_CANONICALIZE_FILE_NAME
|
||||
+#if defined(__GLIBC__)
|
||||
|
||||
/*
|
||||
* GNU-specific, but avoids the realpath(..., NULL)
|
||||
--- third_party/perfetto/include/perfetto/ext/base/thread_utils.h
|
||||
+++ third_party/perfetto/include/perfetto/ext/base/thread_utils.h
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <algorithm>
|
||||
#endif
|
||||
|
||||
-#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
|
||||
+#if 1
|
||||
#include <sys/prctl.h>
|
||||
#endif
|
||||
|
||||
@@ -58,7 +58,7 @@ inline bool MaybeSetThreadName(const std::string& name) {
|
||||
|
||||
inline bool GetThreadName(std::string& out_result) {
|
||||
char buf[16] = {};
|
||||
-#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
|
||||
+#if 1
|
||||
if (prctl(PR_GET_NAME, buf) != 0)
|
||||
return false;
|
||||
#else
|
|
@ -1,30 +0,0 @@
|
|||
--- third_party/libsync/src/include/sync/sync.h.orig 2020-02-21 07:43:33.748325175 -0500
|
||||
+++ third_party/libsync/src/include/sync/sync.h 2020-02-21 07:44:07.288328784 -0500
|
||||
@@ -19,12 +19,16 @@
|
||||
#ifndef __SYS_CORE_SYNC_H
|
||||
#define __SYS_CORE_SYNC_H
|
||||
|
||||
+#if defined(__GLIBC__)
|
||||
#include <sys/cdefs.h>
|
||||
+#endif
|
||||
#include <stdint.h>
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
-__BEGIN_DECLS
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
|
||||
struct sync_legacy_merge_data {
|
||||
int32_t fd2;
|
||||
@@ -158,6 +162,8 @@
|
||||
struct sync_pt_info *itr);
|
||||
void sync_fence_info_free(struct sync_fence_info_data *info);
|
||||
|
||||
-__END_DECLS
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
|
||||
#endif /* __SYS_CORE_SYNC_H */
|
|
@ -9,34 +9,35 @@
|
|||
#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
|
||||
#if __GLIBC_PREREQ(2, 33)
|
||||
#define MALLINFO2_FOUND_IN_LIBC
|
||||
--- ./base/process/process_metrics_posix.cc
|
||||
+++ ./base/process/process_metrics_posix.cc
|
||||
--- base/process/process_metrics_posix.cc.orig
|
||||
+++ base/process/process_metrics_posix.cc
|
||||
@@ -105,7 +105,7 @@
|
||||
|
||||
#endif // !defined(OS_FUCHSIA)
|
||||
#endif // !BUILDFLAG(IS_FUCHSIA)
|
||||
|
||||
-#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
|
||||
+#if (defined(OS_LINUX) && defined(__GLIBC__)) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
|
||||
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
|
||||
+#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
|
||||
namespace {
|
||||
|
||||
size_t GetMallocUsageMallinfo() {
|
||||
@@ -127,16 +127,16 @@
|
||||
@@ -123,7 +123,7 @@
|
||||
}
|
||||
|
||||
} // namespace
|
||||
-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
|
||||
+#endif // (defined(OS_LINUX) && defined(__GLIBC__)) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
|
||||
-#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
|
||||
+#endif // (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) ||
|
||||
// BUILDFLAG(IS_ANDROID)
|
||||
|
||||
size_t ProcessMetrics::GetMallocUsage() {
|
||||
#if defined(OS_APPLE)
|
||||
@@ -131,9 +131,9 @@
|
||||
malloc_statistics_t stats = {0};
|
||||
malloc_zone_statistics(nullptr, &stats);
|
||||
return stats.size_in_use;
|
||||
-#elif defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
|
||||
+#elif (defined(OS_LINUX) && defined(__GLIBC__)) || defined(OS_CHROMEOS) || defined(OS_ANDROID)
|
||||
-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
|
||||
+#elif (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
|
||||
return GetMallocUsageMallinfo();
|
||||
-#elif defined(OS_FUCHSIA)
|
||||
+#else
|
||||
-#elif BUILDFLAG(IS_FUCHSIA)
|
||||
+#elif BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
|
||||
// TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
|
||||
return 0;
|
||||
#endif
|
||||
|
|
|
@ -1,77 +0,0 @@
|
|||
--- net/dns/host_resolver_manager.cc.orig 2020-10-09 16:39:12.064069835 -0400
|
||||
+++ net/dns/host_resolver_manager.cc 2020-10-09 16:42:49.738302772 -0400
|
||||
@@ -2779,8 +2779,7 @@
|
||||
NetworkChangeNotifier::AddConnectionTypeObserver(this);
|
||||
if (system_dns_config_notifier_)
|
||||
system_dns_config_notifier_->AddObserver(this);
|
||||
-#if defined(OS_POSIX) && !defined(OS_APPLE) && !defined(OS_OPENBSD) && \
|
||||
- !defined(OS_ANDROID)
|
||||
+#if defined(__GLIBC__)
|
||||
EnsureDnsReloaderInit();
|
||||
#endif
|
||||
|
||||
--- net/dns/dns_reloader.cc.orig 2020-10-09 16:39:12.064069835 -0400
|
||||
+++ net/dns/dns_reloader.cc 2020-10-09 16:44:30.442419823 -0400
|
||||
@@ -4,9 +4,8 @@
|
||||
|
||||
#include "net/dns/dns_reloader.h"
|
||||
|
||||
-#if defined(OS_POSIX) && !defined(OS_APPLE) && !defined(OS_OPENBSD) && \
|
||||
- !defined(OS_ANDROID) && !defined(OS_FUCHSIA)
|
||||
-
|
||||
+#if defined(__GLIBC__)
|
||||
+
|
||||
#include <resolv.h>
|
||||
|
||||
#include "base/lazy_instance.h"
|
||||
--- net/dns/host_resolver_proc.cc.orig 2020-10-09 16:39:12.065069836 -0400
|
||||
+++ net/dns/host_resolver_proc.cc 2020-10-09 16:45:09.641466644 -0400
|
||||
@@ -159,8 +159,7 @@
|
||||
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
|
||||
base::BlockingType::WILL_BLOCK);
|
||||
|
||||
-#if defined(OS_POSIX) && \
|
||||
- !(defined(OS_APPLE) || defined(OS_OPENBSD) || defined(OS_ANDROID))
|
||||
+#if defined(__GLIBC__)
|
||||
DnsReloaderMaybeReload();
|
||||
#endif
|
||||
base::Optional<AddressInfo> ai;
|
||||
--- net/dns/dns_config_service_linux.cc.orig
|
||||
+++ net/dns/dns_config_service_linux.cc
|
||||
@@ -443,11 +443,13 @@
|
||||
base::ScopedBlockingCall scoped_blocking_call(
|
||||
FROM_HERE, base::BlockingType::MAY_BLOCK);
|
||||
|
||||
+#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());
|
||||
--- net/dns/public/resolv_reader.cc.orig
|
||||
+++ net/dns/public/resolv_reader.cc
|
||||
@@ -20,19 +20,10 @@
|
||||
namespace net {
|
||||
|
||||
std::unique_ptr<struct __res_state> ResolvReader::GetResState() {
|
||||
- auto res = std::make_unique<struct __res_state>();
|
||||
- memset(res.get(), 0, sizeof(struct __res_state));
|
||||
-
|
||||
- if (res_ninit(res.get()) != 0) {
|
||||
- CloseResState(res.get());
|
||||
- return nullptr;
|
||||
- }
|
||||
-
|
||||
- return res;
|
||||
+ return nullptr;
|
||||
}
|
||||
|
||||
void ResolvReader::CloseResState(struct __res_state* res) {
|
||||
- res_nclose(res);
|
||||
}
|
||||
|
||||
absl::optional<std::vector<IPEndPoint>> GetNameservers(
|
|
@ -60,6 +60,6 @@
|
|||
config(target_name) {
|
||||
- if (host_toolchain == current_toolchain) {
|
||||
+ if (current_cpu != target_cpu) {
|
||||
args = host_pkg_config_args + invoker.packages
|
||||
args = common_pkg_config_args + host_pkg_config_args + invoker.packages
|
||||
} else {
|
||||
args = pkg_config_args + invoker.packages
|
||||
args = common_pkg_config_args + pkg_config_args + invoker.packages
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
This is broken in the current release and would require a lot of patches to be
|
||||
backported. Remove this patch for the next release.
|
||||
|
||||
--- a/base/memory/tagging.h
|
||||
+++ b/base/memory/tagging.h
|
||||
@@ -14,10 +14,6 @@
|
||||
#include "base/compiler_specific.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
-#if defined(ARCH_CPU_ARM64) && defined(__clang__) && \
|
||||
- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID))
|
||||
-#define HAS_MEMORY_TAGGING 1
|
||||
-#endif
|
||||
|
||||
constexpr int kMemTagGranuleSize = 16u;
|
||||
#if defined(HAS_MEMORY_TAGGING)
|
|
@ -1,33 +0,0 @@
|
|||
From 00604ca8ed6d669fb6cb3ae8bacd6028d5ef10ac Mon Sep 17 00:00:00 2001
|
||||
From: Stephen Roettger <sroettger@google.com>
|
||||
Date: Thu, 20 Jan 2022 10:04:04 +0000
|
||||
Subject: [PATCH] Downgrade duplicate peer error to dvlog
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Downgrading since this case can happen in non-error situations. There can be
|
||||
duplicate introductions in flight in which case we simply drop the second one.
|
||||
|
||||
Change-Id: I2c51b177913ccd9634e9bb6343d468101d9735ed
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3398794
|
||||
Reviewed-by: Ken Rockot <rockot@google.com>
|
||||
Commit-Queue: Stephen Röttger <sroettger@google.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#961389}
|
||||
---
|
||||
mojo/core/node_controller.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/mojo/core/node_controller.cc b/mojo/core/node_controller.cc
|
||||
index 7cde7719687..81712676733 100644
|
||||
--- a/mojo/core/node_controller.cc
|
||||
+++ b/mojo/core/node_controller.cc
|
||||
@@ -594,7 +594,7 @@ void NodeController::AddPeer(const ports::NodeName& name,
|
||||
}
|
||||
|
||||
if (dropped_peers_.Contains(name) && !allow_name_reuse) {
|
||||
- LOG(ERROR) << "Trying to re-add dropped peer " << name;
|
||||
+ DVLOG(1) << "Trying to re-add dropped peer " << name;
|
||||
return;
|
||||
}
|
||||
|
21
srcpkgs/chromium/patches/fix-gnu-libc-version-usage.patch
Normal file
21
srcpkgs/chromium/patches/fix-gnu-libc-version-usage.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
--- a/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
|
||||
+++ b/chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
|
||||
@@ -59,7 +59,9 @@
|
||||
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
|
||||
// of lacros-chrome is complete.
|
||||
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
+#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
#include <gnu/libc-version.h>
|
||||
+#endif // (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
|
||||
#include "base/linux_util.h"
|
||||
#include "base/strings/string_split.h"
|
||||
@@ -323,7 +323,7 @@
|
||||
void RecordLinuxGlibcVersion() {
|
||||
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
|
||||
// of lacros-chrome is complete.
|
||||
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
+#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
base::Version version(gnu_get_libc_version());
|
||||
|
||||
UMALinuxGlibcVersion glibc_version_result = UMA_LINUX_GLIBC_NOT_PARSEABLE;
|
|
@ -0,0 +1,21 @@
|
|||
This macro is defined in glibc, but not musl.
|
||||
|
||||
--- a/sandbox/linux/suid/process_util.h.orig
|
||||
+++ b/sandbox/linux/suid/process_util.h
|
||||
@@ -11,6 +11,16 @@
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
+// Some additional functions
|
||||
+#if !defined(TEMP_FAILURE_RETRY)
|
||||
+# define TEMP_FAILURE_RETRY(expression) \
|
||||
+ (__extension__ \
|
||||
+ ({ long int __result; \
|
||||
+ do __result = (long int) (expression); \
|
||||
+ while (__result == -1L && errno == EINTR); \
|
||||
+ __result; }))
|
||||
+#endif
|
||||
+
|
||||
// This adjusts /proc/process/oom_score_adj so the Linux OOM killer
|
||||
// will prefer certain process types over others. The range for the
|
||||
// adjustment is [-1000, 1000], with [0, 1000] being user accessible.
|
|
@ -0,0 +1,10 @@
|
|||
--- a/sandbox/linux/services/credentials.h
|
||||
+++ b/sandbox/linux/services/credentials.h
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
+#include <unistd.h>
|
||||
|
||||
#include "sandbox/linux/system_headers/capability.h"
|
||||
#include "sandbox/sandbox_export.h"
|
40
srcpkgs/chromium/patches/fix-musl-pthread-stacksize.patch
Normal file
40
srcpkgs/chromium/patches/fix-musl-pthread-stacksize.patch
Normal file
|
@ -0,0 +1,40 @@
|
|||
--- a/base/threading/platform_thread_linux.cc
|
||||
+++ b/base/threading/platform_thread_linux.cc
|
||||
@@ -436,8 +436,13 @@
|
||||
|
||||
size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) {
|
||||
#if !defined(THREAD_SANITIZER)
|
||||
+#if defined(__GLIBC__)
|
||||
return 0;
|
||||
#else
|
||||
+ // musl libcs default is too small, use 8mb like glibc
|
||||
+ return (1 << 23);
|
||||
+#endif
|
||||
+#else
|
||||
// ThreadSanitizer bloats the stack heavily. Evidence has been that the
|
||||
// default stack size isn't enough for some browser tests.
|
||||
return 2 * (1 << 23); // 2 times 8192K (the default stack size on Linux).
|
||||
--- a/chrome/browser/shutdown_signal_handlers_posix.cc
|
||||
+++ b/chrome/browser/shutdown_signal_handlers_posix.cc
|
||||
@@ -188,11 +188,21 @@
|
||||
g_shutdown_pipe_read_fd = pipefd[0];
|
||||
g_shutdown_pipe_write_fd = pipefd[1];
|
||||
#if !defined(ADDRESS_SANITIZER)
|
||||
+#if defined(__GLIBC__)
|
||||
const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2;
|
||||
#else
|
||||
+ // match up musls 2k PTHREAD_STACK_MIN with glibcs 16k
|
||||
+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2 * 8;
|
||||
+#endif
|
||||
+#else
|
||||
// ASan instrumentation bloats the stack frames, so we need to increase the
|
||||
// stack size to avoid hitting the guard page.
|
||||
+#if defined(__GLIBC__)
|
||||
const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4;
|
||||
+#else
|
||||
+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4 * 8;
|
||||
+ // match up musls 2k PTHREAD_STACK_MIN with glibcs 16k
|
||||
+#endif
|
||||
#endif
|
||||
ShutdownDetector* detector = new ShutdownDetector(
|
||||
g_shutdown_pipe_read_fd, std::move(shutdown_callback), task_runner);
|
12
srcpkgs/chromium/patches/fix-nasm-musl-config.patch
Normal file
12
srcpkgs/chromium/patches/fix-nasm-musl-config.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
--- a/third_party/nasm/config/config-linux.h
|
||||
+++ b/third_party/nasm/config/config-linux.h
|
||||
@@ -139,7 +139,9 @@
|
||||
#define HAVE_ACCESS 1
|
||||
|
||||
/* Define to 1 if you have the `canonicalize_file_name' function. */
|
||||
+#ifdef __GLIBC__
|
||||
#define HAVE_CANONICALIZE_FILE_NAME 1
|
||||
+#endif
|
||||
|
||||
/* Define to 1 if you have the `cpu_to_le16' intrinsic function. */
|
||||
/* #undef HAVE_CPU_TO_LE16 */
|
|
@ -0,0 +1,22 @@
|
|||
--- a/third_party/perfetto/include/perfetto/ext/base/thread_utils.h
|
||||
+++ b/third_party/perfetto/include/perfetto/ext/base/thread_utils.h
|
||||
@@ -30,7 +30,8 @@
|
||||
#include <algorithm>
|
||||
#endif
|
||||
|
||||
-#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
|
||||
+#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
|
||||
+ (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && !defined(__GLIBC__))
|
||||
#include <sys/prctl.h>
|
||||
#endif
|
||||
|
||||
@@ -58,7 +59,8 @@
|
||||
|
||||
inline bool GetThreadName(std::string& out_result) {
|
||||
char buf[16] = {};
|
||||
-#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID)
|
||||
+#if PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) || \
|
||||
+ (PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) && !defined(__GLIBC__))
|
||||
if (prctl(PR_GET_NAME, buf) != 0)
|
||||
return false;
|
||||
#else
|
66
srcpkgs/chromium/patches/fix-resolver-musl.patch
Normal file
66
srcpkgs/chromium/patches/fix-resolver-musl.patch
Normal file
|
@ -0,0 +1,66 @@
|
|||
--- a/net/dns/public/scoped_res_state.cc.orig
|
||||
+++ b/net/dns/public/scoped_res_state.cc
|
||||
@@ -13,7 +13,7 @@
|
||||
namespace net {
|
||||
|
||||
ScopedResState::ScopedResState() {
|
||||
-#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA)
|
||||
+#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
|
||||
// Note: res_ninit in glibc always returns 0 and sets RES_INIT.
|
||||
// res_init behaves the same way.
|
||||
memset(&_res, 0, sizeof(_res));
|
||||
--- a/net/dns/public/scoped_res_state.cc
|
||||
+++ b/net/dns/public/scoped_res_state.cc
|
||||
@@ -25,7 +25,7 @@
|
||||
}
|
||||
|
||||
ScopedResState::~ScopedResState() {
|
||||
-#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA)
|
||||
+#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA) && !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
|
||||
|
||||
// Prefer res_ndestroy where available.
|
||||
#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
|
||||
@@ -34,7 +34,7 @@
|
||||
res_nclose(&res_);
|
||||
#endif // BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
|
||||
|
||||
-#endif // !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA)
|
||||
+#endif // !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA) && !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
|
||||
}
|
||||
|
||||
bool ScopedResState::IsValid() const {
|
||||
--- a/net/dns/host_resolver_manager.cc.orig
|
||||
+++ b/net/dns/host_resolver_manager.cc
|
||||
@@ -3015,7 +3015,7 @@
|
||||
if (system_dns_config_notifier_)
|
||||
system_dns_config_notifier_->AddObserver(this);
|
||||
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \
|
||||
- !BUILDFLAG(IS_ANDROID)
|
||||
+ !BUILDFLAG(IS_ANDROID) && !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
|
||||
EnsureDnsReloaderInit();
|
||||
#endif
|
||||
|
||||
--- a/net/dns/dns_reloader.cc.orig
|
||||
+++ b/net/dns/dns_reloader.cc
|
||||
@@ -7,7 +7,8 @@
|
||||
#include "build/build_config.h"
|
||||
|
||||
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \
|
||||
- !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_FUCHSIA)
|
||||
+ !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_FUCHSIA) && \
|
||||
+ !(BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
|
||||
|
||||
#include <resolv.h>
|
||||
|
||||
--- a/net/dns/host_resolver_proc.cc.orig
|
||||
+++ b/net/dns/host_resolver_proc.cc
|
||||
@@ -177,7 +177,8 @@
|
||||
base::BlockingType::WILL_BLOCK);
|
||||
|
||||
#if BUILDFLAG(IS_POSIX) && \
|
||||
- !(BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_ANDROID))
|
||||
+ !(BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_ANDROID) || \
|
||||
+ (BUILDFLAG(IS_LINUX) && !defined(__GLIBC__)))
|
||||
DnsReloaderMaybeReload();
|
||||
#endif
|
||||
absl::optional<AddressInfo> ai;
|
20
srcpkgs/chromium/patches/fix-stack-utils-with-musl.patch
Normal file
20
srcpkgs/chromium/patches/fix-stack-utils-with-musl.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- a/third_party/blink/renderer/platform/wtf/stack_util.cc.orig
|
||||
+++ b/third_party/blink/renderer/platform/wtf/stack_util.cc
|
||||
@@ -29,7 +29,7 @@
|
||||
// FIXME: On Mac OSX and Linux, this method cannot estimate stack size
|
||||
// correctly for the main thread.
|
||||
|
||||
-#elif defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
||||
+#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
||||
defined(OS_FUCHSIA)
|
||||
// pthread_getattr_np() can fail if the thread is not invoked by
|
||||
// pthread_create() (e.g., the main thread of blink_unittests).
|
||||
@@ -97,7 +97,7 @@
|
||||
}
|
||||
|
||||
void* GetStackStart() {
|
||||
-#if defined(__GLIBC__) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
||||
+#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FREEBSD) || \
|
||||
defined(OS_FUCHSIA)
|
||||
pthread_attr_t attr;
|
||||
int error;
|
|
@ -0,0 +1,26 @@
|
|||
--- a/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
|
||||
+++ b/third_party/swiftshader/third_party/llvm-subzero/build/Linux/include/llvm/Config/config.h
|
||||
@@ -17,7 +17,11 @@
|
||||
#define ENABLE_CRASH_OVERRIDES 0
|
||||
|
||||
/* Define to 1 if you have the `backtrace' function. */
|
||||
+#ifdef __GLIBC__
|
||||
#define HAVE_BACKTRACE 1
|
||||
+#else
|
||||
+#define HAVE_BACKTRACE 0
|
||||
+#endif
|
||||
|
||||
/* Define to 1 if you have the <CrashReporterClient.h> header file. */
|
||||
/* #undef HAVE_CRASHREPORTERCLIENT_H */
|
||||
@@ -58,7 +62,11 @@
|
||||
#define HAVE_ERRNO_H 1
|
||||
|
||||
/* Define to 1 if you have the <execinfo.h> header file. */
|
||||
+#ifdef __GLIBC__
|
||||
#define HAVE_EXECINFO_H 1
|
||||
+#else
|
||||
+#define HAVE_EXECINFO_H 0
|
||||
+#endif
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
|
@ -1,26 +1,34 @@
|
|||
--- a/base/process/memory_linux.cc 2017-09-15 08:41:43.000000000 +0000
|
||||
+++ b/base/process/memory_linux.cc 2017-09-15 08:44:39.804995469 +0000
|
||||
@@ -21,6 +21,12 @@
|
||||
#include "third_party/tcmalloc/chromium/src/gperftools/tcmalloc.h"
|
||||
#endif
|
||||
--- a/base/process/memory_linux.cc
|
||||
+++ b/base/process/memory_linux.cc
|
||||
@@ -18,6 +18,13 @@
|
||||
#include "base/threading/thread_restrictions.h"
|
||||
#include "build/build_config.h"
|
||||
|
||||
+#if defined(LIBC_GLIBC)
|
||||
+extern "C" {
|
||||
+extern void *__libc_malloc(size_t size);
|
||||
+extern void *__libc_free(void *ptr);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
namespace base {
|
||||
|
||||
size_t g_oom_size = 0U;
|
||||
--- a/base/process/memory_linux.cc 2020-08-30 14:18:35.401132593 -0400
|
||||
+++ b/base/process/memory_linux.cc 2020-08-30 14:19:08.030199189 -0400
|
||||
@@ -141,7 +141,7 @@
|
||||
(!defined(LIBC_GLIBC) && !BUILDFLAG(USE_TCMALLOC))
|
||||
namespace {
|
||||
@@ -111,7 +118,7 @@
|
||||
#elif defined(MEMORY_TOOL_REPLACES_ALLOCATOR) || !defined(LIBC_GLIBC)
|
||||
*result = malloc(size);
|
||||
#elif defined(LIBC_GLIBC) && !BUILDFLAG(USE_TCMALLOC)
|
||||
#elif defined(LIBC_GLIBC)
|
||||
- *result = __libc_malloc(size);
|
||||
+ *result = ::__libc_malloc(size);
|
||||
#elif BUILDFLAG(USE_TCMALLOC)
|
||||
*result = tc_malloc_skip_new_handler(size);
|
||||
#endif
|
||||
return *result != nullptr;
|
||||
}
|
||||
@@ -122,7 +129,7 @@
|
||||
#elif defined(MEMORY_TOOL_REPLACES_ALLOCATOR) || !defined(LIBC_GLIBC)
|
||||
free(ptr);
|
||||
#elif defined(LIBC_GLIBC)
|
||||
- __libc_free(ptr);
|
||||
+ ::__libc_free(ptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
@@ -19,7 +19,8 @@
|
||||
#include "build/build_config.h"
|
||||
|
||||
#if defined(OS_BSD) || defined(OS_APPLE) || defined(OS_NACL) || \
|
||||
- defined(OS_FUCHSIA) || (defined(OS_ANDROID) && __ANDROID_API__ < 21)
|
||||
+ defined(OS_FUCHSIA) || (defined(OS_ANDROID) && __ANDROID_API__ < 21) || \
|
||||
+ (defined(OS_LINUX) && !defined(__GLIBC__))
|
||||
#if BUILDFLAG(IS_BSD) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_NACL) || \
|
||||
- BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_ANDROID) && __ANDROID_API__ < 21)
|
||||
+ BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_ANDROID) && __ANDROID_API__ < 21) || \
|
||||
+ (BUILDFLAG(IS_LINUX) && !defined(__GLIBC__))
|
||||
struct stat;
|
||||
namespace base {
|
||||
typedef struct stat stat_wrapper_t;
|
||||
|
|
39
srcpkgs/chromium/patches/remove-sys-cdefs-includes.patch
Normal file
39
srcpkgs/chromium/patches/remove-sys-cdefs-includes.patch
Normal file
|
@ -0,0 +1,39 @@
|
|||
--- a/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h
|
||||
+++ b/third_party/crashpad/crashpad/compat/linux/sys/ptrace.h
|
||||
@@ -17,8 +17,6 @@
|
||||
|
||||
#include_next <sys/ptrace.h>
|
||||
|
||||
-#include <sys/cdefs.h>
|
||||
-
|
||||
// https://sourceware.org/bugzilla/show_bug.cgi?id=22433
|
||||
#if !defined(PTRACE_GET_THREAD_AREA) && !defined(PT_GET_THREAD_AREA) && \
|
||||
defined(__GLIBC__)
|
||||
--- a/third_party/libsync/src/include/sync/sync.h
|
||||
+++ b/third_party/libsync/src/include/sync/sync.h
|
||||
@@ -19,12 +19,13 @@
|
||||
#ifndef __SYS_CORE_SYNC_H
|
||||
#define __SYS_CORE_SYNC_H
|
||||
|
||||
-#include <sys/cdefs.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
-__BEGIN_DECLS
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
|
||||
struct sync_legacy_merge_data {
|
||||
int32_t fd2;
|
||||
@@ -158,6 +159,8 @@
|
||||
struct sync_pt_info *itr);
|
||||
void sync_fence_info_free(struct sync_fence_info_data *info);
|
||||
|
||||
-__END_DECLS
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
|
||||
#endif /* __SYS_CORE_SYNC_H */
|
|
@ -1,4 +1,4 @@
|
|||
From cb0aad687f34629a42053d600cf2947282cea2c0 Mon Sep 17 00:00:00 2001
|
||||
From ffeb67faf715475f6e463d65c368f556780adf19 Mon Sep 17 00:00:00 2001
|
||||
From: Lei Zhang <thestig@chromium.org>
|
||||
Date: Mon, 31 Jan 2022 22:42:35 +0000
|
||||
Subject: [PATCH] Use FT_Done_MM_Var() in CFX_Font::AdjustMMParams() when
|
||||
|
@ -12,17 +12,15 @@ Change-Id: I044540893103921fc64cdd53fcd628cfebf2c9db
|
|||
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/90130
|
||||
Reviewed-by: Nigi <nigi@chromium.org>
|
||||
Commit-Queue: Lei Zhang <thestig@chromium.org>
|
||||
|
||||
(cherry picked from commit ffeb67faf715475f6e463d65c368f556780adf19)
|
||||
---
|
||||
core/fxge/cfx_font.cpp | 28 ++++++++++++++++++++++++++--
|
||||
1 file changed, 26 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp
|
||||
index 7a4e8eb24..0ef421fe7 100644
|
||||
index c08fe9608..8b3a72700 100644
|
||||
--- a/third_party/pdfium/core/fxge/cfx_font.cpp
|
||||
+++ b/third_party/pdfium/core/fxge/cfx_font.cpp
|
||||
@@ -43,6 +43,30 @@ struct OUTLINE_PARAMS {
|
||||
@@ -44,6 +44,30 @@ struct OUTLINE_PARAMS {
|
||||
float m_CoordUnit;
|
||||
};
|
||||
|
||||
|
@ -31,12 +29,12 @@ index 7a4e8eb24..0ef421fe7 100644
|
|||
+// FT_Done_MM_Var() directly.
|
||||
+//
|
||||
+// Use weak symbols to check if FT_Done_MM_Var() is available at runtime.
|
||||
+#if !defined(OS_WIN)
|
||||
+#if !BUILDFLAG(IS_WIN)
|
||||
+extern "C" __attribute__((weak)) decltype(FT_Done_MM_Var) FT_Done_MM_Var;
|
||||
+#endif
|
||||
+
|
||||
+void FreeMMVar(FXFT_FaceRec* rec, FXFT_MM_VarPtr variation_desc) {
|
||||
+#if defined(OS_WIN)
|
||||
+#if BUILDFLAG(IS_WIN)
|
||||
+ // Assume `use_system_freetype` GN var is never set on Windows.
|
||||
+ constexpr bool has_ft_done_mm_var_func = true;
|
||||
+#else
|
||||
|
@ -50,19 +48,20 @@ index 7a4e8eb24..0ef421fe7 100644
|
|||
+ }
|
||||
+}
|
||||
+
|
||||
#ifdef PDF_ENABLE_XFA
|
||||
unsigned long FTStreamRead(FXFT_StreamRec* stream,
|
||||
unsigned long offset,
|
||||
@@ -640,14 +664,14 @@ void CFX_Font::AdjustMMParams(int glyph_index,
|
||||
int max_width = FXFT_Get_Glyph_HoriAdvance(m_Face->GetRec()) * 1000 /
|
||||
FXFT_Get_Face_UnitsPerEM(m_Face->GetRec());
|
||||
FX_RECT FXRectFromFTPos(FT_Pos left, FT_Pos top, FT_Pos right, FT_Pos bottom) {
|
||||
return FX_RECT(pdfium::base::checked_cast<int32_t>(left),
|
||||
pdfium::base::checked_cast<int32_t>(top),
|
||||
@@ -645,7 +669,7 @@ void CFX_Font::AdjustMMParams(int glyph_index,
|
||||
FT_Pos max_width = FXFT_Get_Glyph_HoriAdvance(m_Face->GetRec()) * 1000 /
|
||||
FXFT_Get_Face_UnitsPerEM(m_Face->GetRec());
|
||||
if (max_width == min_width) {
|
||||
- FXFT_Free(m_Face->GetRec(), pMasters);
|
||||
+ FreeMMVar(m_Face->GetRec(), pMasters);
|
||||
return;
|
||||
}
|
||||
int param = min_param + (max_param - min_param) * (dest_width - min_width) /
|
||||
(max_width - min_width);
|
||||
FT_Pos param = min_param + (max_param - min_param) *
|
||||
@@ -653,7 +677,7 @@ void CFX_Font::AdjustMMParams(int glyph_index,
|
||||
(max_width - min_width);
|
||||
coords[1] = param;
|
||||
}
|
||||
- FXFT_Free(m_Face->GetRec(), pMasters);
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
From 3bd46cb9a51773f103ef52b39d6407740eb0d60a Mon Sep 17 00:00:00 2001
|
||||
From: Eugene Zemtsov <eugene@chromium.org>
|
||||
Date: Thu, 24 Feb 2022 23:17:20 +0000
|
||||
Subject: [PATCH] webcodecs: Stop using AudioOpusEncoder as backed for mojo
|
||||
audio encoder
|
||||
|
||||
AudioOpusEncoder was only used here for testing. Let's not let it get
|
||||
comfortable. We'll use MF AAC encoder here when we have it. (Soon...)
|
||||
|
||||
Bug: 1259883
|
||||
Change-Id: Ia1819395c8c8fd6d403d4b8558c12f9a1bf7e761
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3489449
|
||||
Commit-Queue: Eugene Zemtsov <eugene@chromium.org>
|
||||
Auto-Submit: Eugene Zemtsov <eugene@chromium.org>
|
||||
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
|
||||
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#974895}
|
||||
---
|
||||
media/mojo/services/gpu_mojo_media_client.cc | 10 +---------
|
||||
1 file changed, 1 insertion(+), 9 deletions(-)
|
||||
|
||||
diff --git a/media/mojo/services/gpu_mojo_media_client.cc b/media/mojo/services/gpu_mojo_media_client.cc
|
||||
index 8f83a4d6cf6..40cdaff8d3a 100644
|
||||
--- a/media/mojo/services/gpu_mojo_media_client.cc
|
||||
+++ b/media/mojo/services/gpu_mojo_media_client.cc
|
||||
@@ -13,7 +13,6 @@
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "gpu/ipc/service/gpu_channel.h"
|
||||
#include "media/audio/audio_features.h"
|
||||
-#include "media/audio/audio_opus_encoder.h"
|
||||
#include "media/base/audio_decoder.h"
|
||||
#include "media/base/cdm_factory.h"
|
||||
#include "media/base/media_switches.h"
|
||||
@@ -119,14 +118,7 @@ std::unique_ptr<AudioEncoder> GpuMojoMediaClient::CreateAudioEncoder(
|
||||
scoped_refptr<base::SequencedTaskRunner> task_runner) {
|
||||
if (!base::FeatureList::IsEnabled(features::kPlatformAudioEncoder))
|
||||
return nullptr;
|
||||
- // TODO(crbug.com/1259883) Right now Opus encoder is all we have, later on
|
||||
- // we'll create a real platform encoder here.
|
||||
- auto opus_encoder = std::make_unique<AudioOpusEncoder>();
|
||||
- auto encoding_runner = base::ThreadPool::CreateSequencedTaskRunner(
|
||||
- {base::TaskPriority::USER_BLOCKING});
|
||||
- return std::make_unique<OffloadingAudioEncoder>(std::move(opus_encoder),
|
||||
- std::move(encoding_runner),
|
||||
- std::move(task_runner));
|
||||
+ return nullptr;
|
||||
}
|
||||
|
||||
VideoDecoderType GpuMojoMediaClient::GetDecoderImplementationType() {
|
|
@ -1,10 +0,0 @@
|
|||
--- a/third_party/webrtc/modules/desktop_capture/linux/window_capturer_x11.cc 2019-02-21 21:21:24.488058990 +0100
|
||||
+++ b/third_party/webrtc/modules/desktop_capture/linux/window_capturer_x11.cc 2019-02-21 21:21:36.151961064 +0100
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
+#include <string.h>
|
||||
#include <utility>
|
||||
|
||||
#include "modules/desktop_capture/desktop_frame.h"
|
|
@ -17,8 +17,8 @@ index bfd5753..045082b 100644
|
|||
|
||||
PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR ALWAYS_INLINE size_t
|
||||
PageAllocationGranularityShift() {
|
||||
-#if defined(OS_WIN) || defined(ARCH_CPU_PPC64)
|
||||
+#if defined(OS_WIN)
|
||||
-#if BUILDFLAG(IS_WIN) || defined(ARCH_CPU_PPC64)
|
||||
+#if BUILDFLAG(IS_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
|
||||
|
@ -35,7 +35,7 @@ index 0b9260d..3e054ec 100644
|
|||
-PartitionPageShift() {
|
||||
- return 18; // 256 KiB
|
||||
-}
|
||||
#elif defined(OS_APPLE) && defined(ARCH_CPU_64_BITS)
|
||||
#elif BUILDFLAG(IS_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
|
||||
|
|
|
@ -232,44 +232,43 @@ diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.c
|
|||
index 2a97d3916..8e81aa6cf 100644
|
||||
--- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc 2021-04-14 14:41:08.000000000 -0400
|
||||
+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc 2021-04-15 13:17:57.808715733 -0400
|
||||
@@ -40,7 +40,8 @@
|
||||
#include <sys/ptrace.h>
|
||||
#if (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
|
||||
!defined(__arm__) && !defined(__aarch64__) && \
|
||||
@@ -37,7 +37,8 @@
|
||||
|
||||
#if (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) && \
|
||||
!defined(__arm__) && !defined(__aarch64__) && \
|
||||
- !defined(PTRACE_GET_THREAD_AREA)
|
||||
+ !defined(PTRACE_GET_THREAD_AREA) && \
|
||||
+ !defined(PTRACE_GET_THREAD_AREA) && \
|
||||
+ !defined(__powerpc64__)
|
||||
// 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.
|
||||
// asm/ptrace-abi.h doesn't exist on arm32 and PTRACE_GET_THREAD_AREA isn't
|
||||
@@ -49,6 +50,11 @@
|
||||
@@ -45,6 +46,11 @@
|
||||
#include <asm/ptrace-abi.h>
|
||||
#endif
|
||||
#endif // !OS_NACL_NONSFI
|
||||
|
||||
+// On PPC64, TCGETS is defined in terms of struct termios, so we must include termios.h
|
||||
+#ifdef __powerpc64__
|
||||
+#include <termios.h>
|
||||
+#endif
|
||||
+
|
||||
#if defined(OS_ANDROID)
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
|
||||
#if !defined(F_DUPFD_CLOEXEC)
|
||||
@@ -98,6 +104,15 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -99,6 +105,14 @@
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+inline bool IsArchitecturePPC64() {
|
||||
+#if defined(__powerpc64__)
|
||||
+ return true;
|
||||
+#else
|
||||
+ return false;
|
||||
+#endif
|
||||
+}
|
||||
+
|
||||
+
|
||||
// Ubuntu's version of glibc has a race condition in sem_post that can cause
|
||||
// it to call futex(2) with bogus op arguments. To workaround this, we need
|
||||
// to allow those futex(2) calls to fail with EINVAL, instead of crashing the
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -239,6 +254,8 @@
|
||||
uint64_t kOLargeFileFlag = O_LARGEFILE;
|
||||
if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips())
|
||||
|
@ -3447,14 +3446,14 @@ index 9b065bd..df3af02 100644
|
|||
--- a/third_party/libaom/BUILD.gn
|
||||
+++ b/third_party/libaom/BUILD.gn
|
||||
@@ -36,6 +36,8 @@ if (enable_libaom) {
|
||||
} else {
|
||||
cpu_arch_full = "arm"
|
||||
}
|
||||
+ } else if (current_cpu == "ppc64") {
|
||||
+ cpu_arch_full = "generic"
|
||||
} else {
|
||||
cpu_arch_full = current_cpu
|
||||
cpu_arch_full = "arm"
|
||||
}
|
||||
+} else if (current_cpu == "ppc64") {
|
||||
+ cpu_arch_full = "generic"
|
||||
} else {
|
||||
cpu_arch_full = current_cpu
|
||||
}
|
||||
diff --git a/third_party/libgav1/options.gni b/third_party/libgav1/options.gni
|
||||
index 11af801..4b13d05 100644
|
||||
--- a/third_party/libgav1/options.gni
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'chromium'
|
||||
pkgname=chromium
|
||||
# See https://chromiumdash.appspot.com/releases?platform=Linux for the latest version
|
||||
version=98.0.4758.102
|
||||
version=99.0.4844.51
|
||||
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=415b47e912766cd07f9f52e95bc6470b835acf1d6f566ae32e66ba8be608f33e
|
||||
checksum=97c52e57eca0dc8b752d274047f38c88aaa86036c0587b26b056efbd3fb2bae3
|
||||
|
||||
lib32disabled=yes
|
||||
|
||||
|
@ -205,7 +205,6 @@ do_configure() {
|
|||
|
||||
conf=(
|
||||
'enable_nacl=false'
|
||||
'enable_nacl_nonsfi=false'
|
||||
|
||||
'use_sysroot=false'
|
||||
|
||||
|
|
Loading…
Reference in a new issue