mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 22:53:51 +02:00
chromium: update to 109.0.5414.74.
This commit is contained in:
parent
02542cfbe0
commit
e2c4bc2076
17 changed files with 89 additions and 4136 deletions
|
@ -1,187 +0,0 @@
|
|||
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
|
||||
+++ sandbox/linux/bpf_dsl/seccomp_macros.h
|
||||
@@ -16,7 +16,7 @@
|
||||
#if defined(__mips__)
|
||||
// sys/user.h in eglibc misses size_t definition
|
||||
#include <stddef.h>
|
||||
-#elif defined(__powerpc64__)
|
||||
+#elif defined(__powerpc64__) && defined(__GLIBC__)
|
||||
// Manually define greg_t on ppc64
|
||||
typedef unsigned long long greg_t;
|
||||
#endif
|
||||
@@ -361,11 +361,11 @@ typedef struct pt_regs regs_struct;
|
||||
#define SECCOMP_ARCH AUDIT_ARCH_PPC64
|
||||
#endif
|
||||
|
||||
-#define SECCOMP_REG(_ctx, _reg) ((_ctx)->uc_mcontext.regs->gpr[_reg])
|
||||
+#define SECCOMP_REG(_ctx, _reg) (((struct pt_regs *)(_ctx)->uc_mcontext.regs)->gpr[_reg])
|
||||
|
||||
#define SECCOMP_RESULT(_ctx) SECCOMP_REG(_ctx, 3)
|
||||
#define SECCOMP_SYSCALL(_ctx) SECCOMP_REG(_ctx, 0)
|
||||
-#define SECCOMP_IP(_ctx) (_ctx)->uc_mcontext.regs->nip
|
||||
+#define SECCOMP_IP(_ctx) ((struct pt_regs *)(_ctx)->uc_mcontext.regs)->nip
|
||||
#define SECCOMP_PARM1(_ctx) SECCOMP_REG(_ctx, 3)
|
||||
#define SECCOMP_PARM2(_ctx) SECCOMP_REG(_ctx, 4)
|
||||
#define SECCOMP_PARM3(_ctx) SECCOMP_REG(_ctx, 5)
|
||||
diff --git sandbox/linux/seccomp-bpf/syscall.cc sandbox/linux/seccomp-bpf/syscall.cc
|
||||
index d53a7ff56..c290f0e92 100644
|
||||
--- sandbox/linux/seccomp-bpf/syscall.cc
|
||||
+++ sandbox/linux/seccomp-bpf/syscall.cc
|
||||
@@ -499,9 +499,9 @@ void Syscall::PutValueInUcontext(intptr_t ret_val, ucontext_t* ctx) {
|
||||
// Same as MIPS, need to invert ret and set error register (cr0.SO)
|
||||
if (ret_val <= -1 && ret_val >= -4095) {
|
||||
ret_val = -ret_val;
|
||||
- ctx->uc_mcontext.regs->ccr |= (1 << 28);
|
||||
+ ((struct pt_regs *)ctx->uc_mcontext.regs)->ccr |= (1 << 28);
|
||||
} else {
|
||||
- ctx->uc_mcontext.regs->ccr &= ~(1 << 28);
|
||||
+ ((struct pt_regs *)ctx->uc_mcontext.regs)->ccr &= ~(1 << 28);
|
||||
}
|
||||
#endif
|
||||
SECCOMP_RESULT(ctx) = static_cast<greg_t>(ret_val);
|
||||
--- third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h
|
||||
+++ third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h
|
||||
@@ -22,6 +22,7 @@
|
||||
// The following platforms have an implementation of a hardware counter.
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \
|
||||
defined(__powerpc__) || defined(__ppc__) || defined(__riscv) || \
|
||||
+ ((defined(__powerpc__) || defined(__ppc__)) && defined(__GLIBC__)) || defined(__riscv) || \
|
||||
defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC))
|
||||
#define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1
|
||||
#else
|
||||
--- third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h
|
||||
+++ third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h
|
||||
@@ -64,7 +64,7 @@
|
||||
#elif defined(__i386__) || defined(__x86_64__)
|
||||
#define ABSL_STACKTRACE_INL_HEADER \
|
||||
"absl/debugging/internal/stacktrace_x86-inl.inc"
|
||||
-#elif defined(__ppc__) || defined(__PPC__)
|
||||
+#elif (defined(__ppc__) || defined(__PPC__)) && defined(__GLIBC__)
|
||||
#define ABSL_STACKTRACE_INL_HEADER \
|
||||
"absl/debugging/internal/stacktrace_powerpc-inl.inc"
|
||||
#elif defined(__aarch64__)
|
||||
diff --git third_party/breakpad/BUILD.gn third_party/breakpad/BUILD.gn
|
||||
index f9a60e37..25f3a0b7 100644
|
||||
--- third_party/breakpad/BUILD.gn
|
||||
+++ third_party/breakpad/BUILD.gn
|
||||
@@ -637,6 +637,7 @@ if (is_linux || is_android) {
|
||||
|
||||
if (current_cpu == "ppc64") {
|
||||
defines = [ "HAVE_GETCONTEXT" ]
|
||||
+ libs += [ "ucontext" ]
|
||||
} else {
|
||||
sources += [
|
||||
"breakpad/src/common/linux/breakpad_getcontext.S"
|
||||
diff --git third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
|
||||
index 03afec7a..0264ecf1 100644
|
||||
--- third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
|
||||
+++ third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
|
||||
@@ -273,6 +273,9 @@ void ThreadInfo::FillCPUContext(RawContextCPU* out) const {
|
||||
|
||||
#elif defined(__powerpc64__)
|
||||
|
||||
+#include <asm/elf.h>
|
||||
+#include <asm/ptrace.h>
|
||||
+
|
||||
uintptr_t ThreadInfo::GetInstructionPointer() const {
|
||||
return mcontext.gp_regs[PT_NIP];
|
||||
}
|
||||
@@ -290,9 +293,9 @@ void ThreadInfo::FillCPUContext(RawContextCPU* out) const {
|
||||
out->ctr = mcontext.gp_regs[PT_CTR];
|
||||
|
||||
for (int i = 0; i < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; i++)
|
||||
- out->float_save.fpregs[i] = mcontext.fp_regs[i];
|
||||
+ out->float_save.fpregs[i] = ((uint64_t *)&mcontext.fp_regs)[i];
|
||||
|
||||
- out->float_save.fpscr = mcontext.fp_regs[NFPREG-1];
|
||||
+ out->float_save.fpscr = ((uint64_t *)&mcontext.fp_regs)[ELF_NFPREG-1];
|
||||
|
||||
for (int i = 0; i < MD_VECTORSAVEAREA_PPC_VR_COUNT; i++)
|
||||
out->vector_save.save_vr[i] = \
|
||||
diff --git third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
|
||||
index 1090470f..e580233d 100644
|
||||
--- third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
|
||||
+++ third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
|
||||
@@ -257,6 +257,9 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) {
|
||||
|
||||
#elif defined(__powerpc64__)
|
||||
|
||||
+#include <asm/elf.h>
|
||||
+#include <asm/ptrace.h>
|
||||
+
|
||||
uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
|
||||
return uc->uc_mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP];
|
||||
}
|
||||
@@ -280,9 +283,9 @@ void UContextReader::FillCPUContext(RawContextCPU* out, const ucontext_t* uc,
|
||||
out->ctr = uc->uc_mcontext.gp_regs[PT_CTR];
|
||||
|
||||
for (int i = 0; i < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; i++)
|
||||
- out->float_save.fpregs[i] = uc->uc_mcontext.fp_regs[i];
|
||||
+ out->float_save.fpregs[i] = ((uint64_t *)&uc->uc_mcontext.fp_regs)[i];
|
||||
|
||||
- out->float_save.fpscr = uc->uc_mcontext.fp_regs[NFPREG-1];
|
||||
+ out->float_save.fpscr = ((uint64_t *)&uc->uc_mcontext.fp_regs)[ELF_NFPREG-1];
|
||||
|
||||
for (int i = 0; i < MD_VECTORSAVEAREA_PPC_VR_COUNT; i++)
|
||||
out->vector_save.save_vr[i] =
|
||||
diff --git third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
|
||||
index 5a7ab50c..ee8b858c 100644
|
||||
--- third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
|
||||
+++ third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
|
||||
@@ -105,6 +105,11 @@
|
||||
#define PR_SET_PTRACER 0x59616d61
|
||||
#endif
|
||||
|
||||
+/* musl hack, can't include asm/ptrace.h as that causes conflicts */
|
||||
+#if defined(__powerpc64__) && !defined(PT_NIP)
|
||||
+#define PT_NIP 32
|
||||
+#endif
|
||||
+
|
||||
namespace google_breakpad {
|
||||
|
||||
namespace {
|
||||
diff --git third_party/crashpad/crashpad/snapshot/linux/signal_context.h third_party/crashpad/crashpad/snapshot/linux/signal_context.h
|
||||
index 8e335a09..b2a0f155 100644
|
||||
--- third_party/crashpad/crashpad/snapshot/linux/signal_context.h
|
||||
+++ third_party/crashpad/crashpad/snapshot/linux/signal_context.h
|
||||
@@ -469,7 +469,7 @@ struct MContext64 {
|
||||
SignalThreadContext64 gp_regs;
|
||||
SignalFloatContext64 fp_regs;
|
||||
SignalVectorContext64 *v_regs;
|
||||
- int64_t vmx_reserve[69];
|
||||
+ int64_t vmx_reserve[101];
|
||||
};
|
||||
|
||||
struct ContextTraits64 : public Traits64 {
|
||||
diff --git third_party/crashpad/crashpad/util/linux/thread_info.h third_party/crashpad/crashpad/util/linux/thread_info.h
|
||||
index dea0d1f3..b203e5b2 100644
|
||||
--- third_party/crashpad/crashpad/util/linux/thread_info.h
|
||||
+++ third_party/crashpad/crashpad/util/linux/thread_info.h
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#if defined(ARCH_CPU_PPC64_FAMILY)
|
||||
#include <sys/ucontext.h>
|
||||
+#include <asm/ptrace.h>
|
||||
#endif
|
||||
|
||||
namespace crashpad {
|
||||
diff --git third_party/lss/linux_syscall_support.h third_party/lss/linux_syscall_support.h
|
||||
index 9955ce44..4c1cc488 100644
|
||||
--- third_party/lss/linux_syscall_support.h
|
||||
+++ third_party/lss/linux_syscall_support.h
|
||||
@@ -4216,9 +4216,13 @@ struct kernel_statfs {
|
||||
}
|
||||
#endif
|
||||
#if defined(__NR_fstatat64)
|
||||
+ // musl does #define fstatat64 fstatat
|
||||
+ #undef fstatat64
|
||||
LSS_INLINE _syscall4(int, fstatat64, int, d,
|
||||
const char *, p,
|
||||
struct kernel_stat64 *, b, int, f)
|
||||
+ // set it back like it was
|
||||
+ #define fstatat64 fstatat
|
||||
#endif
|
||||
#if defined(__NR_waitpid)
|
||||
// waitpid is polyfilled below when not available.
|
|
@ -1,26 +1,22 @@
|
|||
--- a/build/config/compiler/BUILD.gn
|
||||
+++ b/build/config/compiler/BUILD.gn
|
||||
@@ -167,6 +167,10 @@
|
||||
# Enable -H, which prints the include tree during compilation.
|
||||
# For use by tools/clang/scripts/analyze_includes.py
|
||||
show_includes = false
|
||||
+
|
||||
+ # Allow projects that wish to stay on C++17 to override Chromium's default.
|
||||
+ # TODO(crbug.com/1402249): evaluate removing this end of 2023
|
||||
+ use_cxx17 = false
|
||||
@@ -191,6 +191,10 @@
|
||||
current_cpu == "x64"))))
|
||||
}
|
||||
|
||||
declare_args() {
|
||||
@@ -596,7 +600,11 @@
|
||||
} else if (is_linux) {
|
||||
# TODO(crbug.com/1284275): Switch to C++20 on all platforms.
|
||||
if (is_clang) {
|
||||
- cflags_cc += [ "-std=${standard_prefix}++20" ]
|
||||
+ if (use_cxx17) {
|
||||
+ cflags_cc += [ "-std=${standard_prefix}++17" ]
|
||||
+ } else {
|
||||
+ cflags_cc += [ "-std=${standard_prefix}++20" ]
|
||||
+ }
|
||||
+declare_args() {
|
||||
+ use_cxx17 = false
|
||||
+}
|
||||
+
|
||||
if (is_android || (is_chromeos_ash && is_chromeos_device)) {
|
||||
# Set the path to use orderfile for linking Chrome
|
||||
# Note that this is for using only one orderfile for linking
|
||||
@@ -605,7 +609,7 @@
|
||||
cflags_cc += [ "-fno-trigraphs" ]
|
||||
}
|
||||
} else if (is_clang) {
|
||||
- if (is_chromeos_device) {
|
||||
+ if (is_chromeos_device || use_cxx17) {
|
||||
# TODO(crbug.com/1392471): Support C++20 in CrOS toolchain.
|
||||
cflags_cc += [ "-std=${standard_prefix}++17" ]
|
||||
} else {
|
||||
# The gcc bots are currently using GCC 9, which is not new enough to
|
||||
# support "c++20"/"gnu++20".
|
||||
|
|
20
srcpkgs/chromium/patches/fix-build-with-old-clang.patch
Normal file
20
srcpkgs/chromium/patches/fix-build-with-old-clang.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- a/build/config/compiler/BUILD.gn
|
||||
+++ b/build/config/compiler/BUILD.gn
|
||||
@@ -805,17 +805,6 @@
|
||||
cflags += [ "-fcomplete-member-pointers" ]
|
||||
}
|
||||
|
||||
- # Use DWARF simple template names, with the following exceptions:
|
||||
- #
|
||||
- # * Windows is not supported as it doesn't use DWARF.
|
||||
- # * Apple platforms (e.g. MacOS, iPhone, iPad) aren't supported because xcode
|
||||
- # lldb doesn't have the needed changes yet.
|
||||
- # * Fuchsia isn't supported as zxdb doesn't support simple template names yet.
|
||||
- # TODO(crbug.com/1379070): Remove if the upstream default ever changes.
|
||||
- if (is_clang && !is_nacl && !is_win && !is_apple && !is_fuchsia) {
|
||||
- cflags_cc += [ "-gsimple-template-names" ]
|
||||
- }
|
||||
-
|
||||
# MLGO specific flags. These flags enable an ML-based inliner trained on
|
||||
# Chrome on Android (arm32) with ThinLTO enabled, optimizing for size.
|
||||
# The "release" ML model is embedded into clang as part of its build.
|
21
srcpkgs/chromium/patches/fix-constexpr-narrowing.patch
Normal file
21
srcpkgs/chromium/patches/fix-constexpr-narrowing.patch
Normal file
|
@ -0,0 +1,21 @@
|
|||
--- a/third_party/blink/renderer/platform/media/web_media_player_impl.cc.orig
|
||||
+++ b/third_party/blink/renderer/platform/media/web_media_player_impl.cc
|
||||
@@ -3881,15 +3881,15 @@
|
||||
const T&... values) {
|
||||
std::string strkey = std::string(key);
|
||||
|
||||
- if constexpr (Flags & kEncrypted) {
|
||||
+ if constexpr (Flags & kEncrypted != 0) {
|
||||
if (is_encrypted_)
|
||||
UmaFunction(strkey + ".EME", values...);
|
||||
}
|
||||
|
||||
- if constexpr (Flags & kTotal)
|
||||
+ if constexpr (Flags & kTotal != 0)
|
||||
UmaFunction(strkey + ".All", values...);
|
||||
|
||||
- if constexpr (Flags & kPlaybackType) {
|
||||
+ if constexpr (Flags & kPlaybackType != 0) {
|
||||
auto demuxer_type = GetDemuxerType();
|
||||
if (!demuxer_type.has_value())
|
||||
return;
|
11
srcpkgs/chromium/patches/fix-musl-no-mallinfo.patch
Normal file
11
srcpkgs/chromium/patches/fix-musl-no-mallinfo.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc
|
||||
+++ b/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc
|
||||
@@ -717,7 +717,7 @@
|
||||
|
||||
#endif // !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
||||
+#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS)
|
||||
SHIM_ALWAYS_EXPORT struct mallinfo mallinfo(void) __THROW {
|
||||
base::SimplePartitionStatsDumper allocator_dumper;
|
||||
Allocator()->DumpStats("malloc", true, &allocator_dumper);
|
|
@ -1,40 +0,0 @@
|
|||
--- 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);
|
|
@ -1,43 +1,6 @@
|
|||
--- a/base/files/file_util_linux.cc
|
||||
+++ b/base/files/file_util_linux.cc
|
||||
@@ -23,14 +23,14 @@
|
||||
|
||||
// Not all possible |statfs_buf.f_type| values are in linux/magic.h.
|
||||
// Missing values are copied from the statfs man page.
|
||||
- switch (statfs_buf.f_type) {
|
||||
+ switch (static_cast<uintmax_t>(statfs_buf.f_type)) {
|
||||
case 0:
|
||||
*type = FILE_SYSTEM_0;
|
||||
break;
|
||||
case EXT2_SUPER_MAGIC: // Also ext3 and ext4
|
||||
case MSDOS_SUPER_MAGIC:
|
||||
case REISERFS_SUPER_MAGIC:
|
||||
- case static_cast<int>(BTRFS_SUPER_MAGIC):
|
||||
+ case BTRFS_SUPER_MAGIC:
|
||||
case 0x5346544E: // NTFS
|
||||
case 0x58465342: // XFS
|
||||
case 0x3153464A: // JFS
|
||||
@@ -40,14 +40,14 @@
|
||||
*type = FILE_SYSTEM_NFS;
|
||||
break;
|
||||
case SMB_SUPER_MAGIC:
|
||||
- case static_cast<int>(0xFF534D42): // CIFS
|
||||
+ case 0xFF534D42: // CIFS
|
||||
*type = FILE_SYSTEM_SMB;
|
||||
break;
|
||||
case CODA_SUPER_MAGIC:
|
||||
*type = FILE_SYSTEM_CODA;
|
||||
break;
|
||||
- case static_cast<int>(HUGETLBFS_MAGIC):
|
||||
- case static_cast<int>(RAMFS_MAGIC):
|
||||
+ case HUGETLBFS_MAGIC:
|
||||
+ case RAMFS_MAGIC:
|
||||
case TMPFS_MAGIC:
|
||||
*type = FILE_SYSTEM_MEMORY;
|
||||
break;
|
||||
--- a/base/system/sys_info_posix.cc
|
||||
+++ b/base/system/sys_info_posix.cc
|
||||
@@ -100,10 +100,10 @@
|
||||
@@ -62,10 +62,10 @@
|
||||
if (HANDLE_EINTR(statfs(path.value().c_str(), &stats)) != 0)
|
||||
return false;
|
||||
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
--- 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 */
|
11
srcpkgs/chromium/patches/musl-partition-atfork.patch
Normal file
11
srcpkgs/chromium/patches/musl-partition-atfork.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/base/allocator/partition_allocator/partition_root.cc
|
||||
+++ b/base/allocator/partition_allocator/partition_root.cc
|
||||
@@ -239,7 +239,7 @@
|
||||
if (!g_global_init_called.compare_exchange_strong(expected, true))
|
||||
return;
|
||||
|
||||
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
||||
+#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS)
|
||||
// When fork() is called, only the current thread continues to execute in the
|
||||
// child process. If the lock is held, but *not* by this thread when fork() is
|
||||
// called, we have a deadlock.
|
|
@ -1,41 +0,0 @@
|
|||
From dda01a706453ded8c01c41775707cb5ef4e316f8 Mon Sep 17 00:00:00 2001
|
||||
From: Andres Salomon <dilinger@queued.net>
|
||||
Date: Tue, 25 Oct 2022 21:11:46 +0000
|
||||
Subject: [PATCH] Re-fix TFLite build error on linux when using the system zlib
|
||||
|
||||
In commit ae0f9adb7e14c0d19ca695ef6ad40b321a8cb64c, I fixed some build
|
||||
errors related to minizip patch inclusion in TFLite. However, after that
|
||||
when TFLite Support was rolled to HEAD, a small part of that patch got
|
||||
dropped. The result is the following build error with 107.0.5304.62:
|
||||
|
||||
../../third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc:22:10: fatal error: 'contrib/minizip/ioapi.h' file not found
|
||||
^~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
1 error generated.
|
||||
|
||||
This commit re-adds the lost fix.
|
||||
|
||||
R=junzou@chromium.org
|
||||
|
||||
Change-Id: Ie96c3571894b5100a1e2a2771da29699eff0beb3
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3972087
|
||||
Reviewed-by: Robert Ogden <robertogden@chromium.org>
|
||||
Commit-Queue: Robert Ogden <robertogden@chromium.org>
|
||||
Auto-Submit: Andres Salomon <dilinger@queued.net>
|
||||
Cr-Commit-Position: refs/heads/main@{#1063478}
|
||||
---
|
||||
.../metadata/cc/utils/zip_readonly_mem_file.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc b/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc
|
||||
index 392b6b411fe..525ae4a2b45 100644
|
||||
--- a/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc
|
||||
+++ b/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc
|
||||
@@ -19,7 +19,7 @@ limitations under the License.
|
||||
#include <cstdio>
|
||||
|
||||
#include "absl/strings/string_view.h" // from @com_google_absl
|
||||
-#include "contrib/minizip/ioapi.h"
|
||||
+#include "third_party/zlib/contrib/minizip/ioapi.h"
|
||||
|
||||
namespace tflite {
|
||||
namespace metadata {
|
|
@ -1,32 +0,0 @@
|
|||
--- a/chrome/test/chromedriver/BUILD.gn.orig
|
||||
+++ b/chrome/test/chromedriver/BUILD.gn
|
||||
@@ -308,11 +308,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
-if (is_linux) {
|
||||
- chromedriver_output = "chromedriver.unstripped"
|
||||
-} else {
|
||||
- chromedriver_output = "chromedriver"
|
||||
-}
|
||||
+chromedriver_output = "chromedriver"
|
||||
|
||||
executable("$chromedriver_output") {
|
||||
testonly = true
|
||||
@@ -336,16 +332,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
-if (is_linux) {
|
||||
- strip_binary("chromedriver") {
|
||||
- testonly = true
|
||||
- binary_input = "$root_out_dir/$chromedriver_output"
|
||||
- symbol_output = "$root_out_dir/chromedriver.debug"
|
||||
- stripped_binary_output = "$root_out_dir/chromedriver"
|
||||
- deps = [ ":$chromedriver_output" ]
|
||||
- }
|
||||
-}
|
||||
-
|
||||
python_library("chromedriver_py_tests") {
|
||||
testonly = true
|
||||
deps = [
|
|
@ -1,60 +0,0 @@
|
|||
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
|
||||
@@ -69,7 +69,7 @@ namespace base {
|
||||
|
||||
PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR PA_ALWAYS_INLINE size_t
|
||||
PageAllocationGranularityShift() {
|
||||
-#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
|
||||
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
|
||||
@@ -90,11 +90,6 @@
|
||||
PartitionPageShift() {
|
||||
return 16; // 64 KiB
|
||||
}
|
||||
-#elif defined(ARCH_CPU_PPC64)
|
||||
-PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR PA_ALWAYS_INLINE size_t
|
||||
-PartitionPageShift() {
|
||||
- return 18; // 256 KiB
|
||||
-}
|
||||
#elif (BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)) || \
|
||||
(BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64))
|
||||
PAGE_ALLOCATOR_CONSTANTS_DECLARE_CONSTEXPR PA_ALWAYS_INLINE size_t
|
||||
--- a/base/allocator/partition_allocator/partition_alloc_forward.h
|
||||
+++ b/base/allocator/partition_allocator/partition_alloc_forward.h
|
||||
@@ -25,12 +25,17 @@
|
||||
// the second one 16. We could technically return something different for
|
||||
// malloc() and operator new(), but this would complicate things, and most of
|
||||
// our allocations are presumably coming from operator new() anyway.
|
||||
+#if defined(__powerpc64__)
|
||||
+/* we want this to be 16 here always */
|
||||
+constexpr size_t kAlignment = 16;
|
||||
+#else
|
||||
constexpr size_t kAlignment =
|
||||
std::max(alignof(max_align_t),
|
||||
static_cast<size_t>(__STDCPP_DEFAULT_NEW_ALIGNMENT__));
|
||||
static_assert(kAlignment <= 16,
|
||||
"PartitionAlloc doesn't support a fundamental alignment larger "
|
||||
"than 16 bytes.");
|
||||
+#endif
|
||||
|
||||
constexpr bool ThreadSafe = true;
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
commit 981437bc846fcdb854062e89fd3d86f112e5f426
|
||||
Author: q66 <daniel@octaforge.org>
|
||||
Date: Sat Jun 25 12:35:37 2022 +0200
|
||||
|
||||
Use generic target for now.
|
||||
|
||||
This is because the source tree is missing vsx optimizations that
|
||||
then do not get included and result in failed linking such as:
|
||||
|
||||
ld.lld: error: undefined symbol: vpx_mse16x16_vsx
|
||||
|
||||
diff --git a/third_party/libvpx/generate_gni.sh b/third_party/libvpx/generate_gni.sh
|
||||
index 7429080..43ee29a 100755
|
||||
--- a/third_party/libvpx/generate_gni.sh
|
||||
+++ b/third_party/libvpx/generate_gni.sh
|
||||
@@ -405,7 +405,7 @@
|
||||
gen_config_files linux/mips64el "--target=mips64-linux-gcc ${all_platforms}"
|
||||
gen_config_files linux/loongarch \
|
||||
"--target=loongarch64-linux-gcc ${all_platforms}"
|
||||
-gen_config_files linux/ppc64 "--target=ppc64le-linux-gcc ${all_platforms}"
|
||||
+gen_config_files linux/ppc64 "--target=generic-gnu ${all_platforms}"
|
||||
gen_config_files linux/generic "--target=generic-gnu $HIGHBD ${all_platforms}"
|
||||
gen_config_files win/arm64 \
|
||||
"--target=arm64-win64-vs15 ${all_platforms} ${HIGHBD}"
|
||||
@@ -468,7 +468,7 @@
|
||||
gen_rtcd_header linux/mipsel mipsel
|
||||
gen_rtcd_header linux/mips64el mips64el
|
||||
gen_rtcd_header linux/loongarch loongarch
|
||||
-gen_rtcd_header linux/ppc64 ppc
|
||||
+gen_rtcd_header linux/ppc64 generic
|
||||
gen_rtcd_header linux/generic generic
|
||||
gen_rtcd_header win/arm64 armv8
|
||||
gen_rtcd_header win/ia32 x86 "${require_sse2}"
|
|
@ -1,31 +0,0 @@
|
|||
--- a/sandbox/linux/system_headers/linux_stat.h
|
||||
+++ b/sandbox/linux/system_headers/linux_stat.h
|
||||
@@ -155,6 +155,28 @@ struct kernel_stat {
|
||||
unsigned int __unused4;
|
||||
unsigned int __unused5;
|
||||
};
|
||||
+#elif defined(__powerpc64__)
|
||||
+struct kernel_stat {
|
||||
+ unsigned long st_dev;
|
||||
+ unsigned long st_ino;
|
||||
+ unsigned long st_nlink;
|
||||
+ unsigned int st_mode;
|
||||
+ unsigned int st_uid;
|
||||
+ unsigned int st_gid;
|
||||
+ unsigned long st_rdev;
|
||||
+ long st_size;
|
||||
+ unsigned long st_blksize;
|
||||
+ unsigned long st_blocks;
|
||||
+ unsigned long st_atime_;
|
||||
+ unsigned long st_atime_nsec_;
|
||||
+ unsigned long st_mtime_;
|
||||
+ unsigned long st_mtime_nsec_;
|
||||
+ unsigned long st_ctime_;
|
||||
+ unsigned long st_ctime_nsec_;
|
||||
+ unsigned long __unused4;
|
||||
+ unsigned long __unused5;
|
||||
+ unsigned long __unused6;
|
||||
+};
|
||||
#endif
|
||||
|
||||
// On 32-bit systems, we default to the 64-bit stat struct like libc
|
File diff suppressed because it is too large
Load diff
|
@ -1,18 +0,0 @@
|
|||
--- a/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn
|
||||
+++ b/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn
|
||||
@@ -574,6 +574,7 @@ swiftshader_llvm_source_set("swiftshader
|
||||
"llvm/lib/MC/MCAsmInfoCOFF.cpp",
|
||||
"llvm/lib/MC/MCAsmInfoDarwin.cpp",
|
||||
"llvm/lib/MC/MCAsmInfoELF.cpp",
|
||||
+ "llvm/lib/MC/MCAsmInfoXCOFF.cpp",
|
||||
"llvm/lib/MC/MCAsmMacro.cpp",
|
||||
"llvm/lib/MC/MCAsmStreamer.cpp",
|
||||
"llvm/lib/MC/MCAssembler.cpp",
|
||||
@@ -629,6 +630,7 @@ swiftshader_llvm_source_set("swiftshader
|
||||
"llvm/lib/MC/MCWinCOFFStreamer.cpp",
|
||||
"llvm/lib/MC/MCWinEH.cpp",
|
||||
"llvm/lib/MC/MCXCOFFStreamer.cpp",
|
||||
+ "llvm/lib/MC/MCXCOFFObjectTargetWriter.cpp",
|
||||
"llvm/lib/MC/MachObjectWriter.cpp",
|
||||
"llvm/lib/MC/StringTableBuilder.cpp",
|
||||
"llvm/lib/MC/SubtargetFeature.cpp",
|
|
@ -1,9 +1,9 @@
|
|||
# Template file for 'chromium'
|
||||
pkgname=chromium
|
||||
# See https://chromiumdash.appspot.com/releases?platform=Linux for the latest version
|
||||
version=108.0.5359.124
|
||||
version=109.0.5414.74
|
||||
revision=1
|
||||
archs="i686* x86_64* aarch64* armv7l* ppc64le*"
|
||||
archs="i686* x86_64* aarch64* armv7l*"
|
||||
hostmakedepends="
|
||||
$(vopt_if clang "clang lld llvm12")
|
||||
$(vopt_if js_optimize openjdk)
|
||||
|
@ -28,7 +28,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=d48dfac2a61b14a5d7d2f460b09b70ef3ab88e27b82e3173938cb54eaa612a75
|
||||
checksum=eded233c26ab631be325ad49cb306c338513b6a6528197d42653e66187548e5d
|
||||
|
||||
lib32disabled=yes
|
||||
|
||||
|
@ -39,10 +39,9 @@ desc_option_debug="Build with debug symbols"
|
|||
desc_option_js_optimize="Optimize the JS used for Chromium's UI"
|
||||
desc_option_pipewire="Enable support for screen sharing for WebRTC via PipeWire"
|
||||
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
ppc64*-musl) makedepends+=" libucontext-devel" ;;
|
||||
esac
|
||||
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
||||
makedepends+=" musl-legacy-compat"
|
||||
fi
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
hostmakedepends+=" libX11-devel libxcb-devel pciutils-devel libXext-devel libglvnd-devel
|
||||
|
@ -135,20 +134,6 @@ do_configure() {
|
|||
CFLAGS=$CFLAGS_FOR_BUILD CXXFLAGS=$CXXFLAGS_FOR_BUILD LDFLAGS=$LDFLAGS_FOR_BUILD \
|
||||
tools/gn/bootstrap/bootstrap.py --skip-generate-buildfiles
|
||||
|
||||
# we need to generate ppc64 stuff for libvpx as it's not shipped
|
||||
# this has to be done before unbundling, but after gn is built
|
||||
# comment out if we switch back to system libvpx again later
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
ppc64*)
|
||||
pushd third_party/libvpx
|
||||
mkdir -p source/config/linux/ppc64
|
||||
# need PATH to find gn
|
||||
PATH="${wrksrc}/out/Release:$PATH" ./generate_gni.sh || \
|
||||
msg_error "failed to generate libvpx gni"
|
||||
popd
|
||||
;;
|
||||
esac
|
||||
|
||||
# Use system-provided libraries.
|
||||
# TODO: use_system_hunspell (upstream changes needed).
|
||||
# TODO: use_system_libsrtp.
|
||||
|
@ -220,9 +205,6 @@ do_configure() {
|
|||
|
||||
'icu_use_data_file=true'
|
||||
|
||||
'use_allocator="none"'
|
||||
'use_allocator_shim=false'
|
||||
|
||||
'enable_widevine=true'
|
||||
'enable_hangout_services_extension=true'
|
||||
|
||||
|
@ -286,11 +268,6 @@ do_configure() {
|
|||
)
|
||||
fi
|
||||
|
||||
# this does not work on ppc64 yet
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
ppc64*) conf+=( "enable_jxl_decoder=false" );;
|
||||
esac
|
||||
|
||||
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
|
||||
conf+=( 'is_musl=true' )
|
||||
fi
|
||||
|
@ -300,7 +277,6 @@ do_configure() {
|
|||
i686*) conf+=( 'target_cpu="x86"' ) ;;
|
||||
arm*) conf+=( 'target_cpu="arm"' ) ;;
|
||||
aarch64*) conf+=( 'target_cpu="arm64"' ) ;;
|
||||
ppc64*) conf+=( 'target_cpu="ppc64"' ) ;;
|
||||
esac
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
|
@ -309,7 +285,6 @@ do_configure() {
|
|||
i686*) conf+=( 'host_cpu="x86"' ) ;;
|
||||
arm*) conf+=( 'host_cpu="arm"' ) ;;
|
||||
aarch64*) conf+=( 'host_cpu="arm64"' ) ;;
|
||||
ppc64*) conf+=( 'host_cpu="ppc64"' ) ;;
|
||||
esac
|
||||
fi
|
||||
_setup_toolchain
|
||||
|
@ -318,13 +293,13 @@ do_configure() {
|
|||
|
||||
do_build() {
|
||||
_setup_toolchain
|
||||
CCACHE_SLOPPINESS=include_file_mtime ninja -C out/Release ${makejobs} chrome chromedriver chrome_crashpad_handler
|
||||
CCACHE_SLOPPINESS=include_file_mtime ninja -C out/Release ${makejobs} chrome chromedriver.unstripped chrome_crashpad_handler
|
||||
}
|
||||
|
||||
do_install() {
|
||||
vinstall out/Release/chrome 755 usr/lib/${pkgname} ${pkgname}
|
||||
vinstall out/Release/chrome_crashpad_handler 755 usr/lib/${pkgname} chrome_crashpad_handler
|
||||
vinstall out/Release/chromedriver 755 usr/lib/${pkgname} chromedriver
|
||||
vinstall out/Release/chromedriver.unstripped 755 usr/lib/${pkgname} chromedriver
|
||||
vinstall out/Release/libEGL.so 755 usr/lib/${pkgname} libEGL.so
|
||||
vinstall out/Release/libGLESv2.so 755 usr/lib/${pkgname} libGLESv2.so
|
||||
vinstall out/Release/libvk_swiftshader.so 755 usr/lib/${pkgname} libvk_swiftshader.so
|
||||
|
|
Loading…
Add table
Reference in a new issue