mirror of
https://github.com/andersrh/copr-andersrh.git
synced 2026-05-17 13:58:01 +00:00
Chromium 138.0.7204.183
This commit is contained in:
parent
7c0b566a47
commit
404c44c8fa
117 changed files with 122161 additions and 0 deletions
45
chromium-lts/.gitignore
vendored
Normal file
45
chromium-lts/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
/chromium-52.0.2743.75-clean.tar.xz
|
||||
/depot_tools.git-master.tar.gz
|
||||
/policy_templates.zip
|
||||
/chromium-*.tar.xz
|
||||
/gelasio.zip
|
||||
/MuktiNarrow-0.94.tar.bz2
|
||||
/NotoSansCJKjp-hinted.zip
|
||||
/lohit-gurmukhi-ttf-2.91.2.tar.gz
|
||||
/Arimo-BoldItalic.ttf
|
||||
/Arimo-Bold.ttf
|
||||
/Arimo-Italic.ttf
|
||||
/Arimo-Regular.ttf
|
||||
/Cousine-BoldItalic.ttf
|
||||
/Cousine-Bold.ttf
|
||||
/Cousine-Italic.ttf
|
||||
/Cousine-Regular.ttf
|
||||
/Tinos-BoldItalic.ttf
|
||||
/Tinos-Bold.ttf
|
||||
/Tinos-Italic.ttf
|
||||
/Tinos-Regular.ttf
|
||||
/Ahem.ttf
|
||||
/node-v8.9.1-linux-x64.tar.gz
|
||||
/node-v10.15.3-linux-x64.tar.gz
|
||||
/xcb-proto-1.14.tar.xz
|
||||
/NotoSansSymbols2-Regular.ttf
|
||||
/NotoSansTibetan-Regular.ttf
|
||||
/node-v12.22.6-linux-arm64.tar.xz
|
||||
/node-v12.22.6-linux-x64.tar.xz
|
||||
/node-v16.17.0-linux-x64.tar.xz
|
||||
/node-v16.17.0-linux-arm64.tar.xz
|
||||
/testupload
|
||||
/node-v19.8.1-linux-arm64.tar.xz
|
||||
/node-v19.8.1-linux-x64.tar.xz
|
||||
/node-v20.6.1-linux-arm64.tar.xz
|
||||
/node-v20.6.1-linux-x64.tar.xz
|
||||
/linux-arm64-0.19.2.tgz
|
||||
/linux-x64-0.19.2.tgz
|
||||
/v0.69.4.tar.gz
|
||||
/bindgen-cli-aarch64.tar.xz
|
||||
/bindgen-cli-x86_64.tar.xz
|
||||
/linux-ppc64-0.19.2.tgz
|
||||
/node-v22.14.0-linux-arm64.tar.xz
|
||||
/node-v22.14.0-linux-ppc64le.tar.xz
|
||||
/node-v22.14.0-linux-x64.tar.xz
|
||||
/node-v22.14.0-stripped.tar.gz
|
||||
8911
chromium-lts/0001-Add-PPC64-support-for-boringssl.patch
Normal file
8911
chromium-lts/0001-Add-PPC64-support-for-boringssl.patch
Normal file
File diff suppressed because it is too large
Load diff
57
chromium-lts/0001-Add-ppc64-target-to-libaom.patch
Normal file
57
chromium-lts/0001-Add-ppc64-target-to-libaom.patch
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
From 40309fb53e39477490fd6928ebe67c4fb78de380 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@gmail.com>
|
||||
Date: Sun, 10 Mar 2019 21:01:37 -0500
|
||||
Subject: [PATCH] Add ppc64 target to libaom
|
||||
|
||||
---
|
||||
third_party/libaom/BUILD.gn | 12 ++++++++++++
|
||||
third_party/libaom/cmake_update.sh | 3 +++
|
||||
2 files changed, 15 insertions(+)
|
||||
|
||||
Index: chromium-128.0.6613.113/third_party/libaom/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/libaom/BUILD.gn
|
||||
+++ chromium-128.0.6613.113/third_party/libaom/BUILD.gn
|
||||
@@ -275,6 +275,18 @@ if (current_cpu == "arm64") {
|
||||
}
|
||||
}
|
||||
|
||||
+if (current_cpu == "ppc64") {
|
||||
+ source_set("libaom_intrinsics_vsx") {
|
||||
+ configs -= [ "//build/config/compiler:chromium_code" ]
|
||||
+ configs += [ "//build/config/compiler:no_chromium_code" ]
|
||||
+ configs += [ ":libaom_config" ]
|
||||
+ sources = [
|
||||
+ "//third_party/libaom/source/libaom/aom_ports/ppc_cpudetect.c",
|
||||
+ ]
|
||||
+ sources += aom_av1_common_intrin_vsx
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static_library("libaom") {
|
||||
check_includes = false
|
||||
if (!is_debug && is_win) {
|
||||
@@ -338,6 +350,9 @@ static_library("libaom") {
|
||||
# This is needed by all arm boards due to aom_arm_cpu_caps()
|
||||
sources += [ "source/libaom/aom_ports/aarch32_cpudetect.c" ]
|
||||
}
|
||||
+ if (current_cpu == "ppc64") {
|
||||
+ deps += [ ":libaom_intrinsics_vsx" ]
|
||||
+ }
|
||||
if (is_android) {
|
||||
deps += [ "//third_party/cpu_features:ndk_compat" ]
|
||||
}
|
||||
Index: chromium-128.0.6613.113/third_party/libaom/cmake_update.sh
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/libaom/cmake_update.sh
|
||||
+++ chromium-128.0.6613.113/third_party/libaom/cmake_update.sh
|
||||
@@ -190,6 +190,9 @@ reset_dirs linux/arm64-cpu-detect
|
||||
gen_config_files linux/arm64-cpu-detect \
|
||||
"${toolchain}/arm64-linux-gcc.cmake ${all_platforms}"
|
||||
|
||||
+reset_dirs linux/ppc64
|
||||
+gen_config_files linux/ppc64 "${toolchain}/ppc-linux-gcc.cmake ${all_platforms}"
|
||||
+
|
||||
# Copy linux configurations and modify for Windows.
|
||||
reset_dirs win/arm64-cpu-detect
|
||||
cp "${CFG}/linux/arm64-cpu-detect/config"/* \
|
||||
2266
chromium-lts/0001-Add-pregenerated-config-for-libaom-on-ppc64.patch
Normal file
2266
chromium-lts/0001-Add-pregenerated-config-for-libaom-on-ppc64.patch
Normal file
File diff suppressed because it is too large
Load diff
13
chromium-lts/0001-Enable-ppc64-pointer-compression.patch
Normal file
13
chromium-lts/0001-Enable-ppc64-pointer-compression.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Index: chromium-134.0.6998.117/v8/gni/v8.gni
|
||||
===================================================================
|
||||
--- chromium-134.0.6998.117.orig/v8/gni/v8.gni
|
||||
+++ chromium-134.0.6998.117/v8/gni/v8.gni
|
||||
@@ -224,7 +224,7 @@ assert(!(v8_enable_webassembly && v8_ena
|
||||
if (v8_enable_pointer_compression == "") {
|
||||
v8_enable_pointer_compression =
|
||||
v8_current_cpu == "arm64" || v8_current_cpu == "x64" ||
|
||||
- v8_current_cpu == "loong64"
|
||||
+ v8_current_cpu == "loong64" || v8_current_cpu == "ppc64"
|
||||
}
|
||||
|
||||
# The Wasm interpreter is currently supported only on arm64 and x64, on
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
From ea104a841fca1ff4d5430915f1b7c52c6a642f13 Mon Sep 17 00:00:00 2001
|
||||
From: Timothy Pearson <tpearson@raptorengineering.com>
|
||||
Date: Fri, 21 Sep 2018 21:44:17 -0500
|
||||
Subject: [PATCH] Force baseline POWER8 / AltiVec / VSX CPU features when on a
|
||||
PPC64 platform in LE mode
|
||||
|
||||
---
|
||||
BUILD.gn | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
Index: chromium-130.0.6723.44/v8/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/v8/BUILD.gn
|
||||
+++ chromium-130.0.6723.44/v8/BUILD.gn
|
||||
@@ -1431,7 +1431,14 @@ config("toolchain") {
|
||||
if (v8_current_cpu == "ppc64") {
|
||||
defines += [ "V8_TARGET_ARCH_PPC64" ]
|
||||
cflags += [ "-ffp-contract=off" ]
|
||||
- if (current_os == "aix") {
|
||||
+ if (current_os == "linux") {
|
||||
+ cflags += [
|
||||
+ # Enable usage of AltiVec, VSX, and other POWER8 and higher features
|
||||
+ "-mcpu=power8",
|
||||
+ "-maltivec",
|
||||
+ "-mvsx",
|
||||
+ ]
|
||||
+ } else if (current_os == "aix") {
|
||||
cflags += [
|
||||
# Work around AIX ceil, trunc and round oddities.
|
||||
"-mcpu=power5+",
|
||||
1481
chromium-lts/0001-Implement-support-for-PPC64-on-Linux.patch
Normal file
1481
chromium-lts/0001-Implement-support-for-PPC64-on-Linux.patch
Normal file
File diff suppressed because it is too large
Load diff
773
chromium-lts/0001-Implement-support-for-ppc64-on-Linux.patch
Normal file
773
chromium-lts/0001-Implement-support-for-ppc64-on-Linux.patch
Normal file
|
|
@ -0,0 +1,773 @@
|
|||
From cda9400739dfa064907d822f00578bb51b24a404 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Fri, 17 Aug 2018 14:18:33 -0500
|
||||
Subject: [PATCH] Implement support for ppc64 on Linux
|
||||
|
||||
This patch implements support for the ppc64 architecture on Linux systems.
|
||||
|
||||
Notable changes include:
|
||||
* Modification of tests to support non-4K page sizes
|
||||
* minidump_writer: Determine size of stack to capture based on page size
|
||||
* dump_writer_common: Introduce member function GetVectorRegisters to
|
||||
ThreadInfo on ppc64 systems. This allows Altivec/VMX registers to be
|
||||
dumped like they are on OS X. linux_ptrace_dumper has been updated
|
||||
to utilize this function along with the ptrace mode NT_PPC_VMX.
|
||||
* processor/exploitability_unittest.cc: Tests were disabled on
|
||||
non-x86 systems. They assume the system objdump is capable of
|
||||
disassembling x86 binaries which is not the case on other
|
||||
architectures.
|
||||
|
||||
To-do:
|
||||
* tools/linux/md2core has been updated as well, but functionality
|
||||
has not been confirmed and restoration of Altivec/VMX registers
|
||||
has not been implemented
|
||||
|
||||
Note that proper functionality depends on updates to third_party/LSS
|
||||
that introduce PPC64 support. An in-progress patch that allows
|
||||
breakpad to build and run successfully is available at:
|
||||
https://wiki.raptorcs.com/wiki/Porting/Chromium
|
||||
---
|
||||
.../dump_writer_common/raw_context_cpu.h | 2 +
|
||||
.../linux/dump_writer_common/thread_info.cc | 56 ++++++++++++++++++-
|
||||
.../linux/dump_writer_common/thread_info.h | 9 +++
|
||||
.../dump_writer_common/ucontext_reader.cc | 42 ++++++++++++++
|
||||
.../dump_writer_common/ucontext_reader.h | 3 +
|
||||
src/client/linux/handler/exception_handler.cc | 22 +++++++-
|
||||
src/client/linux/handler/exception_handler.h | 6 +-
|
||||
.../handler/exception_handler_unittest.cc | 8 ++-
|
||||
.../microdump_writer/microdump_writer.cc | 14 ++++-
|
||||
.../microdump_writer_unittest.cc | 15 ++++-
|
||||
.../minidump_writer/linux_core_dumper.cc | 8 ++-
|
||||
.../linux/minidump_writer/linux_dumper.cc | 4 +-
|
||||
.../linux/minidump_writer/linux_dumper.h | 3 +-
|
||||
.../linux_dumper_unittest_helper.cc | 2 +
|
||||
.../minidump_writer/linux_ptrace_dumper.cc | 19 +++++--
|
||||
.../linux_ptrace_dumper_unittest.cc | 5 ++
|
||||
.../linux/minidump_writer/minidump_writer.cc | 18 ++++--
|
||||
.../linux/minidump_writer/minidump_writer.h | 2 +
|
||||
.../minidump_writer_unittest.cc | 3 +
|
||||
src/common/linux/memory_mapped_file.cc | 3 +-
|
||||
.../linux/memory_mapped_file_unittest.cc | 7 ++-
|
||||
src/common/memory_allocator_unittest.cc | 3 +-
|
||||
src/processor/exploitability_linux.cc | 2 +
|
||||
src/processor/exploitability_unittest.cc | 15 +++--
|
||||
src/tools/linux/md2core/minidump-2-core.cc | 45 +++++++++++++++
|
||||
25 files changed, 281 insertions(+), 35 deletions(-)
|
||||
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
|
||||
@@ -51,6 +51,8 @@ typedef MDRawContextRISCV64 RawContextCP
|
||||
# else
|
||||
# error "Unexpected __riscv_xlen"
|
||||
# endif
|
||||
+#elif defined(__powerpc64__)
|
||||
+typedef MDRawContextPPC64 RawContextCPU;
|
||||
#else
|
||||
#error "This code has not been ported to your platform yet."
|
||||
#endif
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
|
||||
@@ -336,7 +336,42 @@ void ThreadInfo::FillCPUContext(RawConte
|
||||
#error "Unexpected __riscv_xlen"
|
||||
#endif
|
||||
}
|
||||
-#endif // __riscv
|
||||
+
|
||||
+#elif defined(__powerpc64__)
|
||||
+
|
||||
+uintptr_t ThreadInfo::GetInstructionPointer() const {
|
||||
+ return mcontext.gp_regs[PT_NIP];
|
||||
+}
|
||||
+
|
||||
+void ThreadInfo::FillCPUContext(RawContextCPU* out) const {
|
||||
+ out->context_flags = MD_CONTEXT_PPC64_FULL;
|
||||
+ for (int i = 0; i < MD_CONTEXT_PPC64_GPR_COUNT; i++)
|
||||
+ out->gpr[i] = mcontext.gp_regs[i];
|
||||
+
|
||||
+ out->lr = mcontext.gp_regs[PT_LNK];
|
||||
+ out->srr0 = mcontext.gp_regs[PT_NIP];
|
||||
+ out->srr1 = mcontext.gp_regs[PT_MSR];
|
||||
+ out->cr = mcontext.gp_regs[PT_CCR];
|
||||
+ out->xer = mcontext.gp_regs[PT_XER];
|
||||
+ 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.fpscr = mcontext.fp_regs[NFPREG-1];
|
||||
+
|
||||
+ for (int i = 0; i < MD_VECTORSAVEAREA_PPC_VR_COUNT; i++)
|
||||
+ out->vector_save.save_vr[i] = \
|
||||
+ {(((uint64_t)vregs.vrregs[i][0]) << 32)
|
||||
+ | vregs.vrregs[i][1],
|
||||
+ (((uint64_t)vregs.vrregs[i][2]) << 32)
|
||||
+ | vregs.vrregs[i][3]};
|
||||
+
|
||||
+ out->vrsave = vregs.vrsave;
|
||||
+ out->vector_save.save_vscr = {0, vregs.vscr.vscr_word};
|
||||
+ out->vector_save.save_vrvalid = 0xFFFFFFFF;
|
||||
+}
|
||||
+#endif // __powerpc64__
|
||||
|
||||
void ThreadInfo::GetGeneralPurposeRegisters(void** gp_regs, size_t* size) {
|
||||
assert(gp_regs || size);
|
||||
@@ -350,6 +385,11 @@ void ThreadInfo::GetGeneralPurposeRegist
|
||||
*gp_regs = mcontext.__gregs;
|
||||
if (size)
|
||||
*size = sizeof(mcontext.__gregs);
|
||||
+#elif defined(__powerpc64__)
|
||||
+ if (gp_regs)
|
||||
+ *gp_regs = mcontext.gp_regs;
|
||||
+ if (size)
|
||||
+ *size = sizeof(mcontext.gp_regs);
|
||||
#else
|
||||
if (gp_regs)
|
||||
*gp_regs = ®s;
|
||||
@@ -384,6 +424,11 @@ void ThreadInfo::GetFloatingPointRegiste
|
||||
# else
|
||||
# error "Unexpected __riscv_flen"
|
||||
# endif
|
||||
+#elif defined(__powerpc64__)
|
||||
+ if (fp_regs)
|
||||
+ *fp_regs = &mcontext.fp_regs;
|
||||
+ if (size)
|
||||
+ *size = sizeof(mcontext.fp_regs);
|
||||
#else
|
||||
if (fp_regs)
|
||||
*fp_regs = &fpregs;
|
||||
@@ -392,4 +437,13 @@ void ThreadInfo::GetFloatingPointRegiste
|
||||
#endif
|
||||
}
|
||||
|
||||
+#if defined(__powerpc64__)
|
||||
+void ThreadInfo::GetVectorRegisters(void** v_regs, size_t* size) {
|
||||
+ if (v_regs)
|
||||
+ *v_regs = &vregs;
|
||||
+ if (size)
|
||||
+ *size = sizeof(vregs);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
} // namespace google_breakpad
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
|
||||
@@ -67,6 +67,10 @@ struct ThreadInfo {
|
||||
// Use the structures defined in <sys/user.h>
|
||||
struct user_regs_struct regs;
|
||||
struct user_fpsimd_struct fpregs;
|
||||
+#elif defined(__powerpc64__)
|
||||
+ // Use the structures defined in <sys/ucontext.h>.
|
||||
+ mcontext_t mcontext;
|
||||
+ struct _libc_vrstate vregs;
|
||||
#elif defined(__mips__) || defined(__riscv)
|
||||
// Use the structure defined in <sys/ucontext.h>.
|
||||
mcontext_t mcontext;
|
||||
@@ -83,6 +87,11 @@ struct ThreadInfo {
|
||||
|
||||
// Returns the pointer and size of float point register area.
|
||||
void GetFloatingPointRegisters(void** fp_regs, size_t* size);
|
||||
+
|
||||
+#if defined(__powerpc64__)
|
||||
+ // Returns the pointer and size of the vector register area. (PPC64 only)
|
||||
+ void GetVectorRegisters(void** v_regs, size_t* size);
|
||||
+#endif
|
||||
};
|
||||
|
||||
} // namespace google_breakpad
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
|
||||
@@ -324,6 +324,48 @@ void UContextReader::FillCPUContext(RawC
|
||||
#error "Unexpected __riscv_xlen"
|
||||
#endif
|
||||
}
|
||||
+
|
||||
+#elif defined(__powerpc64__)
|
||||
+
|
||||
+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) {
|
||||
+ return uc->uc_mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP];
|
||||
+}
|
||||
+
|
||||
+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
|
||||
+ return uc->uc_mcontext.gp_regs[PT_NIP];
|
||||
+}
|
||||
+
|
||||
+void UContextReader::FillCPUContext(RawContextCPU* out, const ucontext_t* uc,
|
||||
+ const struct _libc_vrstate* vregs) {
|
||||
+ out->context_flags = MD_CONTEXT_PPC64_FULL;
|
||||
+
|
||||
+ for (int i = 0; i < MD_CONTEXT_PPC64_GPR_COUNT; i++)
|
||||
+ out->gpr[i] = uc->uc_mcontext.gp_regs[i];
|
||||
+
|
||||
+ out->lr = uc->uc_mcontext.gp_regs[PT_LNK];
|
||||
+ out->srr0 = uc->uc_mcontext.gp_regs[PT_NIP];
|
||||
+ out->srr1 = uc->uc_mcontext.gp_regs[PT_MSR];
|
||||
+ out->cr = uc->uc_mcontext.gp_regs[PT_CCR];
|
||||
+ out->xer = uc->uc_mcontext.gp_regs[PT_XER];
|
||||
+ 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.fpscr = uc->uc_mcontext.fp_regs[NFPREG-1];
|
||||
+
|
||||
+ for (int i = 0; i < MD_VECTORSAVEAREA_PPC_VR_COUNT; i++)
|
||||
+ out->vector_save.save_vr[i] =
|
||||
+ {(((uint64_t)vregs->vrregs[i][0]) << 32)
|
||||
+ | vregs->vrregs[i][1],
|
||||
+ (((uint64_t)vregs->vrregs[i][2]) << 32)
|
||||
+ | vregs->vrregs[i][3]};
|
||||
+
|
||||
+ out->vrsave = vregs->vrsave;
|
||||
+ out->vector_save.save_vscr = {0, vregs->vscr.vscr_word};
|
||||
+ out->vector_save.save_vrvalid = 0xFFFFFFFF;
|
||||
+}
|
||||
+
|
||||
#endif
|
||||
|
||||
} // namespace google_breakpad
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
|
||||
@@ -54,6 +54,9 @@ struct UContextReader {
|
||||
#elif defined(__aarch64__)
|
||||
static void FillCPUContext(RawContextCPU* out, const ucontext_t* uc,
|
||||
const struct fpsimd_context* fpregs);
|
||||
+#elif defined(__powerpc64__)
|
||||
+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
|
||||
+ const struct _libc_vrstate* vregs);
|
||||
#else
|
||||
static void FillCPUContext(RawContextCPU* out, const ucontext_t* uc);
|
||||
#endif
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
|
||||
@@ -465,6 +465,13 @@ bool ExceptionHandler::HandleSignal(int
|
||||
memcpy(&g_crash_context_.float_state, fp_ptr,
|
||||
sizeof(g_crash_context_.float_state));
|
||||
}
|
||||
+#elif defined(__powerpc64__)
|
||||
+ // On PPC64, we must copy VR state
|
||||
+ ucontext_t* uc_ptr = (ucontext_t*)uc;
|
||||
+ if (uc_ptr->uc_mcontext.v_regs) {
|
||||
+ memcpy(&g_crash_context_.vector_state, uc_ptr->uc_mcontext.v_regs,
|
||||
+ sizeof(g_crash_context_.vector_state));
|
||||
+ }
|
||||
#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
ucontext_t* uc_ptr = (ucontext_t*)uc;
|
||||
if (uc_ptr->uc_mcontext.fpregs) {
|
||||
@@ -703,10 +710,18 @@ bool ExceptionHandler::WriteMinidump() {
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE && !defined(__aarch64__)
|
||||
+#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE && !defined(__aarch64__) \
|
||||
+ && !defined(__powerpc64__)
|
||||
memcpy(&context.float_state, context.context.uc_mcontext.fpregs,
|
||||
sizeof(context.float_state));
|
||||
#endif
|
||||
+
|
||||
+#if defined(__powerpc64__)
|
||||
+ // Vector registers must be copied on PPC64
|
||||
+ memcpy(&context.vector_state, context.context.uc_mcontext.v_regs,
|
||||
+ sizeof(context.vector_state));
|
||||
+#endif
|
||||
+
|
||||
context.tid = sys_gettid();
|
||||
|
||||
// Add an exception stream to the minidump for better reporting.
|
||||
@@ -727,6 +742,9 @@ bool ExceptionHandler::WriteMinidump() {
|
||||
#elif defined(__mips__)
|
||||
context.siginfo.si_addr =
|
||||
reinterpret_cast<void*>(context.context.uc_mcontext.pc);
|
||||
+#elif defined(__powerpc64__)
|
||||
+ context.siginfo.si_addr =
|
||||
+ reinterpret_cast<void*>(context.context.uc_mcontext.gp_regs[PT_NIP]);
|
||||
#elif defined(__riscv)
|
||||
context.siginfo.si_addr =
|
||||
reinterpret_cast<void*>(context.context.uc_mcontext.__gregs[REG_PC]);
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
|
||||
@@ -200,7 +200,11 @@ class ExceptionHandler {
|
||||
siginfo_t siginfo;
|
||||
pid_t tid; // the crashing thread.
|
||||
ucontext_t context;
|
||||
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
+#if defined(__powerpc64__)
|
||||
+ // PPC64's FP state is a part of ucontext_t like MIPS but the vector
|
||||
+ // state is not, so a struct is needed.
|
||||
+ vstate_t vector_state;
|
||||
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
fpstate_t float_state;
|
||||
#endif
|
||||
};
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
|
||||
@@ -326,7 +326,7 @@ TEST(ExceptionHandlerTest, ParallelChild
|
||||
ASSERT_EQ(SIGSEGV, WTERMSIG(status));
|
||||
return;
|
||||
} else {
|
||||
- usleep(100000);
|
||||
+ usleep(200000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -582,6 +582,8 @@ const unsigned char kIllegalInstruction[
|
||||
#if defined(__mips__)
|
||||
// mfc2 zero,Impl - usually illegal in userspace.
|
||||
0x48, 0x00, 0x00, 0x48
|
||||
+#elif defined(__powerpc64__)
|
||||
+ 0x01, 0x01, 0x01, 0x01 // Crashes on a tested POWER9 cpu
|
||||
#else
|
||||
// This crashes with SIGILL on x86/x86-64/arm.
|
||||
0xff, 0xff, 0xff, 0xff
|
||||
@@ -777,10 +779,10 @@ TEST(ExceptionHandlerTest, InstructionPo
|
||||
|
||||
// These are defined here so the parent can use them to check the
|
||||
// data from the minidump afterwards.
|
||||
- // Use 4k here because the OS will hand out a single page even
|
||||
+ // Use the page size here because the OS will hand out a single page even
|
||||
// if a smaller size is requested, and this test wants to
|
||||
// test the upper bound of the memory range.
|
||||
- const uint32_t kMemorySize = 4096; // bytes
|
||||
+ const uint32_t kMemorySize = getpagesize(); // bytes
|
||||
const int kOffset = kMemorySize - sizeof(kIllegalInstruction);
|
||||
|
||||
const pid_t child = fork();
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
|
||||
@@ -143,7 +143,9 @@ class MicrodumpWriter {
|
||||
const MicrodumpExtraInfo& microdump_extra_info,
|
||||
LinuxDumper* dumper)
|
||||
: ucontext_(context ? &context->context : nullptr),
|
||||
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
+#if defined(__powerpc64__)
|
||||
+ vector_state_(context ? &context->vector_state : nullptr),
|
||||
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
float_state_(context ? &context->float_state : nullptr),
|
||||
#endif
|
||||
dumper_(dumper),
|
||||
@@ -350,6 +352,8 @@ class MicrodumpWriter {
|
||||
# else
|
||||
# error "Unexpected __riscv_xlen"
|
||||
# endif
|
||||
+#elif defined(__powerpc64__)
|
||||
+ const char kArch[] = "ppc64";
|
||||
#else
|
||||
# error "This code has not been ported to your platform yet"
|
||||
#endif
|
||||
@@ -422,7 +426,9 @@ class MicrodumpWriter {
|
||||
void DumpCPUState() {
|
||||
RawContextCPU cpu;
|
||||
my_memset(&cpu, 0, sizeof(RawContextCPU));
|
||||
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
+#if defined(__powerpc64__)
|
||||
+ UContextReader::FillCPUContext(&cpu, ucontext_, vector_state_);
|
||||
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
UContextReader::FillCPUContext(&cpu, ucontext_, float_state_);
|
||||
#else
|
||||
UContextReader::FillCPUContext(&cpu, ucontext_);
|
||||
@@ -618,7 +624,9 @@ class MicrodumpWriter {
|
||||
void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); }
|
||||
|
||||
const ucontext_t* const ucontext_;
|
||||
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
+#if defined(__powerpc64__)
|
||||
+ const google_breakpad::vstate_t* const vector_state_;
|
||||
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
const google_breakpad::fpstate_t* const float_state_;
|
||||
#endif
|
||||
LinuxDumper* dumper_;
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
|
||||
@@ -282,10 +282,19 @@ TEST(MicrodumpWriterTest, BasicWithMappi
|
||||
CrashAndGetMicrodump(mappings, MicrodumpExtraInfo(), &buf);
|
||||
ASSERT_TRUE(ContainsMicrodump(buf));
|
||||
|
||||
+ int page_size = getpagesize();
|
||||
#ifdef __LP64__
|
||||
- ASSERT_NE(std::string::npos,
|
||||
- buf.find("M 0000000000001000 000000000000002A 0000000000001000 "
|
||||
- "33221100554477668899AABBCCDDEEFF0 libfoo.so"));
|
||||
+ // This test is only available for the following page sizes
|
||||
+ ASSERT_TRUE((page_size == 4096) || (page_size == 65536));
|
||||
+ if (page_size == 4096) {
|
||||
+ ASSERT_NE(std::string::npos,
|
||||
+ buf.find("M 0000000000001000 000000000000002A 0000000000001000 "
|
||||
+ "33221100554477668899AABBCCDDEEFF0 libfoo.so"));
|
||||
+ } else {
|
||||
+ ASSERT_NE(std::string::npos,
|
||||
+ buf.find("M 0000000000010000 000000000000002A 0000000000010000 "
|
||||
+ "33221100554477668899AABBCCDDEEFF0 libfoo.so"));
|
||||
+ }
|
||||
#else
|
||||
ASSERT_NE(std::string::npos,
|
||||
buf.find("M 00001000 0000002A 00001000 "
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
|
||||
@@ -118,6 +118,9 @@ bool LinuxCoreDumper::GetThreadInfoByInd
|
||||
#elif defined(__riscv)
|
||||
stack_pointer = reinterpret_cast<uint8_t*>(
|
||||
info->mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP]);
|
||||
+#elif defined(__powerpc64__)
|
||||
+ stack_pointer =
|
||||
+ reinterpret_cast<uint8_t*>(info->mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP]);
|
||||
#else
|
||||
# error "This code hasn't been ported to your platform yet."
|
||||
#endif
|
||||
@@ -213,7 +216,10 @@ bool LinuxCoreDumper::EnumerateThreads()
|
||||
memset(&info, 0, sizeof(ThreadInfo));
|
||||
info.tgid = status->pr_pgrp;
|
||||
info.ppid = status->pr_ppid;
|
||||
-#if defined(__mips__)
|
||||
+#if defined(__powerpc64__)
|
||||
+ for (int i = 0; i < 31; i++)
|
||||
+ info.mcontext.gp_regs[i] = status->pr_reg[i];
|
||||
+#elif defined(__mips__)
|
||||
# if defined(__ANDROID__)
|
||||
for (int i = EF_R0; i <= EF_R31; i++)
|
||||
info.mcontext.gregs[i - EF_R0] = status->pr_reg[i];
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
|
||||
@@ -770,7 +770,9 @@ bool LinuxDumper::GetStackInfo(const voi
|
||||
reinterpret_cast<uint8_t*>(int_stack_pointer & ~(page_size - 1));
|
||||
|
||||
// The number of bytes of stack which we try to capture.
|
||||
- static const ptrdiff_t kStackToCapture = 32 * 1024;
|
||||
+ // This now depends on page_size to avoid missing data
|
||||
+ // on systems with larger page sizes.
|
||||
+ static const ptrdiff_t kStackToCapture = 8 * page_size;
|
||||
|
||||
const MappingInfo* mapping = FindMapping(stack_pointer);
|
||||
if (!mapping)
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
|
||||
@@ -64,7 +64,8 @@ namespace google_breakpad {
|
||||
typedef Elf32_auxv_t elf_aux_entry;
|
||||
#elif defined(__x86_64) || defined(__aarch64__) || \
|
||||
(defined(__mips__) && _MIPS_SIM != _ABIO32) || \
|
||||
- (defined(__riscv) && __riscv_xlen == 64)
|
||||
+ (defined(__riscv) && __riscv_xlen == 64) || \
|
||||
+ defined(__powerpc64__)
|
||||
typedef Elf64_auxv_t elf_aux_entry;
|
||||
#endif
|
||||
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
|
||||
@@ -57,6 +57,8 @@
|
||||
#define TID_PTR_REGISTER "$1"
|
||||
#elif defined(__riscv)
|
||||
#define TID_PTR_REGISTER "x4"
|
||||
+#elif defined(__powerpc64__)
|
||||
+#define TID_PTR_REGISTER "r8"
|
||||
#else
|
||||
#error This test has not been ported to this platform.
|
||||
#endif
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
|
||||
@@ -208,12 +208,12 @@ bool LinuxPtraceDumper::ReadRegisterSet(
|
||||
#ifdef PTRACE_GETREGSET
|
||||
struct iovec io;
|
||||
info->GetGeneralPurposeRegisters(&io.iov_base, &io.iov_len);
|
||||
- if (sys_ptrace(PTRACE_GETREGSET, tid, (void*)NT_PRSTATUS, (void*)&io) == -1) {
|
||||
+ if (ptrace(PTRACE_GETREGSET, tid, (void*)NT_PRSTATUS, (void*)&io) == -1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
info->GetFloatingPointRegisters(&io.iov_base, &io.iov_len);
|
||||
- if (sys_ptrace(PTRACE_GETREGSET, tid, (void*)NT_FPREGSET, (void*)&io) == -1) {
|
||||
+ if (ptrace(PTRACE_GETREGSET, tid, (void*)NT_FPREGSET, (void*)&io) == -1) {
|
||||
// We are going to check if we can read VFP registers on ARM32.
|
||||
// Currently breakpad does not support VFP registers to be a part of minidump,
|
||||
// so this is only to confirm that we can actually read FP registers.
|
||||
@@ -233,6 +233,15 @@ bool LinuxPtraceDumper::ReadRegisterSet(
|
||||
}
|
||||
#endif // defined(__arm__)
|
||||
}
|
||||
+
|
||||
+#if defined(__powerpc64__)
|
||||
+ // Grab the vector registers on PPC64 too
|
||||
+ info->GetVectorRegisters(&io.iov_base, &io.iov_len);
|
||||
+ if (ptrace(PTRACE_GETREGSET, tid, (void*)NT_PPC_VMX, (void*)&io) == -1) {
|
||||
+ return false;
|
||||
+ }
|
||||
+#endif // defined(__powerpc64__)
|
||||
+
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
@@ -397,6 +406,9 @@ bool LinuxPtraceDumper::GetThreadInfoByI
|
||||
#elif defined(__riscv)
|
||||
stack_pointer = reinterpret_cast<uint8_t*>(
|
||||
info->mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP]);
|
||||
+#elif defined(__powerpc64__)
|
||||
+ stack_pointer =
|
||||
+ reinterpret_cast<uint8_t*>(info->mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP]);
|
||||
#else
|
||||
# error "This code hasn't been ported to your platform yet."
|
||||
#endif
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
|
||||
@@ -470,6 +470,9 @@ TEST(LinuxPtraceDumperTest, VerifyStackR
|
||||
#elif defined(__riscv)
|
||||
pid_t* process_tid_location =
|
||||
reinterpret_cast<pid_t*>(one_thread.mcontext.__gregs[4]);
|
||||
+#elif defined(__powerpc64__)
|
||||
+ pid_t* process_tid_location =
|
||||
+ reinterpret_cast<pid_t*>(one_thread.mcontext.gp_regs[8]);
|
||||
#else
|
||||
#error This test has not been ported to this platform.
|
||||
#endif
|
||||
@@ -569,6 +572,8 @@ TEST_F(LinuxPtraceDumperTest, SanitizeSt
|
||||
uintptr_t heap_addr = thread_info.mcontext.gregs[1];
|
||||
#elif defined(__riscv)
|
||||
uintptr_t heap_addr = thread_info.mcontext.__gregs[4];
|
||||
+#elif defined(__powerpc64__)
|
||||
+ uintptr_t heap_addr = thread_info.mcontext.gp_regs[8];
|
||||
#else
|
||||
#error This test has not been ported to this platform.
|
||||
#endif
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
|
||||
@@ -145,7 +145,9 @@ class MinidumpWriter {
|
||||
: fd_(minidump_fd),
|
||||
path_(minidump_path),
|
||||
ucontext_(context ? &context->context : nullptr),
|
||||
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
+#if defined(__powerpc64__)
|
||||
+ vector_state_(context ? &context->vector_state : nullptr),
|
||||
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
float_state_(context ? &context->float_state : nullptr),
|
||||
#endif
|
||||
dumper_(dumper),
|
||||
@@ -477,7 +479,9 @@ class MinidumpWriter {
|
||||
if (!cpu.Allocate())
|
||||
return false;
|
||||
my_memset(cpu.get(), 0, sizeof(RawContextCPU));
|
||||
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
+#if defined(__powerpc64__)
|
||||
+ UContextReader::FillCPUContext(cpu.get(), ucontext_, vector_state_);
|
||||
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
UContextReader::FillCPUContext(cpu.get(), ucontext_, float_state_);
|
||||
#else
|
||||
UContextReader::FillCPUContext(cpu.get(), ucontext_);
|
||||
@@ -954,7 +958,7 @@ class MinidumpWriter {
|
||||
dirent->location.rva = 0;
|
||||
}
|
||||
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || defined(__powerpc64__)
|
||||
bool WriteCPUInformation(MDRawSystemInfo* sys_info) {
|
||||
char vendor_id[sizeof(sys_info->cpu.x86_cpu_info.vendor_id) + 1] = {0};
|
||||
static const char vendor_id_name[] = "vendor_id";
|
||||
@@ -974,7 +978,9 @@ class MinidumpWriter {
|
||||
|
||||
// processor_architecture should always be set, do this first
|
||||
sys_info->processor_architecture =
|
||||
-#if defined(__mips__)
|
||||
+#if defined(__powerpc64__)
|
||||
+ MD_CPU_ARCHITECTURE_PPC64;
|
||||
+#elif defined(__mips__)
|
||||
# if _MIPS_SIM == _ABIO32
|
||||
MD_CPU_ARCHITECTURE_MIPS;
|
||||
# elif _MIPS_SIM == _ABI64
|
||||
@@ -1441,7 +1447,9 @@ class MinidumpWriter {
|
||||
const char* path_; // Path to the file where the minidum should be written.
|
||||
|
||||
const ucontext_t* const ucontext_; // also from the signal handler
|
||||
-#if GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
+#if defined(__powerpc64__)
|
||||
+ const google_breakpad::vstate_t* const vector_state_;
|
||||
+#elif GOOGLE_BREAKPAD_CRASH_CONTEXT_HAS_FLOAT_STATE
|
||||
const google_breakpad::fpstate_t* const float_state_; // ditto
|
||||
#endif
|
||||
LinuxDumper* dumper_;
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
|
||||
@@ -47,6 +47,8 @@ class ExceptionHandler;
|
||||
|
||||
#if defined(__aarch64__)
|
||||
typedef struct fpsimd_context fpstate_t;
|
||||
+#elif defined(__powerpc64__)
|
||||
+typedef struct _libc_vrstate vstate_t;
|
||||
#elif !defined(__ARM_EABI__) && !defined(__mips__)
|
||||
typedef std::remove_pointer<fpregset_t>::type fpstate_t;
|
||||
#endif
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
|
||||
@@ -723,6 +723,9 @@ TEST(MinidumpWriterTest, InvalidStackPoi
|
||||
#elif defined(__riscv)
|
||||
context.context.uc_mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP] =
|
||||
invalid_stack_pointer;
|
||||
+#elif defined(__powerpc64__)
|
||||
+ context.context.uc_mcontext.gp_regs[MD_CONTEXT_PPC64_REG_SP] =
|
||||
+ invalid_stack_pointer;
|
||||
#else
|
||||
# error "This code has not been ported to your platform yet."
|
||||
#endif
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
|
||||
@@ -72,8 +72,7 @@ bool MemoryMappedFile::Map(const char* p
|
||||
|
||||
#if defined(__x86_64__) || defined(__aarch64__) || \
|
||||
(defined(__mips__) && _MIPS_SIM == _ABI64) || \
|
||||
- (defined(__riscv) && __riscv_xlen == 64)
|
||||
-
|
||||
+ (defined(__riscv) && __riscv_xlen == 64) || defined(__powerpc64__)
|
||||
struct kernel_stat st;
|
||||
if (sys_fstat(fd, &st) == -1 || st.st_size < 0) {
|
||||
#else
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
|
||||
@@ -179,9 +179,10 @@ TEST_F(MemoryMappedFileTest, RemapAfterM
|
||||
TEST_F(MemoryMappedFileTest, MapWithOffset) {
|
||||
// Put more data in the test file this time. Offsets can only be
|
||||
// done on page boundaries, so we need a two page file to test this.
|
||||
- const int page_size = 4096;
|
||||
- char data1[2 * page_size];
|
||||
- size_t data1_size = sizeof(data1);
|
||||
+ const int page_size = getpagesize();
|
||||
+ char *data1 = static_cast<char*>(malloc(2 * page_size));
|
||||
+ EXPECT_TRUE(data1 != NULL);
|
||||
+ size_t data1_size = (2 * page_size);
|
||||
for (size_t i = 0; i < data1_size; ++i) {
|
||||
data1[i] = i & 0x7f;
|
||||
}
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
|
||||
@@ -60,8 +60,9 @@ TEST(PageAllocatorTest, LargeObject) {
|
||||
|
||||
EXPECT_EQ(0U, allocator.pages_allocated());
|
||||
uint8_t* p = reinterpret_cast<uint8_t*>(allocator.Alloc(10000));
|
||||
+ uint64_t expected_pages = 1 + ((10000 - 1) / getpagesize());
|
||||
ASSERT_FALSE(p == nullptr);
|
||||
- EXPECT_EQ(3U, allocator.pages_allocated());
|
||||
+ EXPECT_EQ(expected_pages, allocator.pages_allocated());
|
||||
for (unsigned i = 1; i < 10; ++i) {
|
||||
uint8_t* p = reinterpret_cast<uint8_t*>(allocator.Alloc(i));
|
||||
ASSERT_FALSE(p == nullptr);
|
||||
Index: chromium-136.0.7103.48/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
|
||||
+++ chromium-136.0.7103.48/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
|
||||
@@ -82,6 +82,8 @@
|
||||
#define ELF_ARCH EM_AARCH64
|
||||
#elif defined(__riscv)
|
||||
#define ELF_ARCH EM_RISCV
|
||||
+#elif defined(__powerpc64__)
|
||||
+ #define ELF_ARCH EM_PPC64
|
||||
#endif
|
||||
|
||||
#if defined(__arm__)
|
||||
@@ -92,6 +94,8 @@ typedef user_regs user_regs_struct;
|
||||
#elif defined (__mips__) || defined(__riscv)
|
||||
// This file-local typedef simplifies the source code.
|
||||
typedef gregset_t user_regs_struct;
|
||||
+#elif defined(__powerpc64__)
|
||||
+typedef struct pt_regs user_regs_struct;
|
||||
#endif
|
||||
|
||||
using google_breakpad::MDTypeHelper;
|
||||
@@ -324,6 +328,9 @@ struct CrashedProcess {
|
||||
#if defined(__aarch64__)
|
||||
user_fpsimd_struct fpregs;
|
||||
#endif
|
||||
+#if defined(__powerpc64__)
|
||||
+ mcontext_t mcontext;
|
||||
+#endif
|
||||
uintptr_t stack_addr;
|
||||
const uint8_t* stack;
|
||||
size_t stack_length;
|
||||
@@ -627,6 +634,38 @@ ParseThreadRegisters(CrashedProcess::Thr
|
||||
#error "Unexpected __riscv_xlen"
|
||||
#endif
|
||||
}
|
||||
+#elif defined(__powerpc64__)
|
||||
+static void
|
||||
+ParseThreadRegisters(CrashedProcess::Thread* thread,
|
||||
+ const MinidumpMemoryRange& range) {
|
||||
+ const MDRawContextPPC64* rawregs = range.GetData<MDRawContextPPC64>(0);
|
||||
+
|
||||
+ for (int i = 0; i < MD_CONTEXT_PPC64_GPR_COUNT; i++)
|
||||
+ thread->mcontext.gp_regs[i] = rawregs->gpr[i];
|
||||
+
|
||||
+ thread->mcontext.gp_regs[PT_LNK] = rawregs->lr;
|
||||
+ thread->mcontext.gp_regs[PT_NIP] = rawregs->srr0;
|
||||
+ thread->mcontext.gp_regs[PT_MSR] = rawregs->srr1;
|
||||
+ thread->mcontext.gp_regs[PT_CCR] = rawregs->cr;
|
||||
+ thread->mcontext.gp_regs[PT_XER] = rawregs->xer;
|
||||
+ thread->mcontext.gp_regs[PT_CTR] = rawregs->ctr;
|
||||
+ thread->mcontext.v_regs->vrsave = rawregs->vrsave;
|
||||
+
|
||||
+ for (int i = 0; i < MD_FLOATINGSAVEAREA_PPC_FPR_COUNT; i++)
|
||||
+ thread->mcontext.fp_regs[i] = rawregs->float_save.fpregs[i];
|
||||
+
|
||||
+ thread->mcontext.fp_regs[NFPREG-1] = rawregs->float_save.fpscr;
|
||||
+
|
||||
+ for (int i = 0; i < MD_VECTORSAVEAREA_PPC_VR_COUNT; i++) {
|
||||
+ thread->mcontext.v_regs->vrregs[i][0] = rawregs->vector_save.save_vr[i].high >> 32;
|
||||
+ thread->mcontext.v_regs->vrregs[i][1] = rawregs->vector_save.save_vr[i].high;
|
||||
+ thread->mcontext.v_regs->vrregs[i][2] = rawregs->vector_save.save_vr[i].low >> 32;
|
||||
+ thread->mcontext.v_regs->vrregs[i][3] = rawregs->vector_save.save_vr[i].low;
|
||||
+ }
|
||||
+
|
||||
+ thread->mcontext.v_regs->vscr.vscr_word = rawregs->vector_save.save_vscr.low & 0xFFFFFFFF;
|
||||
+}
|
||||
+
|
||||
#else
|
||||
#error "This code has not been ported to your platform yet"
|
||||
#endif
|
||||
@@ -732,6 +771,12 @@ ParseSystemInfo(const Options& options,
|
||||
# else
|
||||
# error "Unexpected __riscv_xlen"
|
||||
# endif
|
||||
+#elif defined(__powerpc64__)
|
||||
+ if (sysinfo->processor_architecture != MD_CPU_ARCHITECTURE_PPC64) {
|
||||
+ fprintf(stderr,
|
||||
+ "This version of minidump-2-core only supports PPC64.\n");
|
||||
+ exit(1);
|
||||
+ }
|
||||
#else
|
||||
#error "This code has not been ported to your platform yet"
|
||||
#endif
|
||||
46
chromium-lts/0001-Remove-unused-OpenSSL-config.patch
Normal file
46
chromium-lts/0001-Remove-unused-OpenSSL-config.patch
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
From e93d9b5fdcd8e5744de629461c03a07de2252f8f Mon Sep 17 00:00:00 2001
|
||||
From: Stephen Gallagher <sgallagh@redhat.com>
|
||||
Date: Fri, 17 Apr 2020 12:59:44 +0200
|
||||
Subject: [PATCH] Remove unused OpenSSL config
|
||||
|
||||
The build process will try to create these config files, even when
|
||||
using the system OpenSSL and will thus fail since we strip this path
|
||||
from the tarball.
|
||||
|
||||
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
|
||||
Signed-off-by: rpm-build <rpm-build>
|
||||
---
|
||||
node.gyp | 17 -----------------
|
||||
1 file changed, 17 deletions(-)
|
||||
|
||||
diff --git a/node.gyp b/node.gyp
|
||||
index 1147495..da6ea50 100644
|
||||
--- a/node.gyp
|
||||
+++ b/node.gyp
|
||||
@@ -822,23 +822,6 @@
|
||||
],
|
||||
},
|
||||
],
|
||||
- }, {
|
||||
- 'variables': {
|
||||
- 'opensslconfig_internal': '<(obj_dir)/deps/openssl/openssl.cnf',
|
||||
- 'opensslconfig': './deps/openssl/nodejs-openssl.cnf',
|
||||
- },
|
||||
- 'actions': [
|
||||
- {
|
||||
- 'action_name': 'reset_openssl_cnf',
|
||||
- 'inputs': [ '<(opensslconfig)', ],
|
||||
- 'outputs': [ '<(opensslconfig_internal)', ],
|
||||
- 'action': [
|
||||
- '<(python)', 'tools/copyfile.py',
|
||||
- '<(opensslconfig)',
|
||||
- '<(opensslconfig_internal)',
|
||||
- ],
|
||||
- },
|
||||
- ],
|
||||
}],
|
||||
],
|
||||
}, # node_core_target_name
|
||||
--
|
||||
2.47.0
|
||||
|
||||
31
chromium-lts/0001-add-xnn-ppc64el-support.patch
Normal file
31
chromium-lts/0001-add-xnn-ppc64el-support.patch
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
--- a/third_party/xnnpack/generate_build_gn.py
|
||||
+++ b/third_party/xnnpack/generate_build_gn.py
|
||||
@@ -236,7 +236,10 @@
|
||||
_Platform(gn_cpu='x64', bazel_cpu='k8', bazel_platform='//:linux_x64'),
|
||||
_Platform(gn_cpu='arm64',
|
||||
bazel_cpu='aarch64',
|
||||
- bazel_platform='//:linux_aarch64')
|
||||
+ bazel_platform='//:linux_aarch64'),
|
||||
+ _Platform(gn_cpu='ppc64',
|
||||
+ bazel_cpu='ppc64le',
|
||||
+ bazel_platform='//:linux_ppc64le')
|
||||
]
|
||||
|
||||
|
||||
--- a/third_party/xnnpack/bazelroot/BUILD
|
||||
+++ b/third_party/xnnpack/bazelroot/BUILD
|
||||
@@ -21,6 +21,14 @@
|
||||
],
|
||||
)
|
||||
|
||||
+platform(
|
||||
+ name = "linux_ppc64le",
|
||||
+ constraint_values = [
|
||||
+ "@platforms//os:linux",
|
||||
+ "@platforms//cpu:ppc64le",
|
||||
+ ],
|
||||
+)
|
||||
+
|
||||
# A dummy clang toolchain for building them for any arch.
|
||||
|
||||
filegroup(name = "empty")
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
From b3a14db7637232d30c878cc1f1ad6d8037e81379 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawn@anastas.io>
|
||||
Date: Tue, 15 Jan 2019 22:42:21 -0600
|
||||
Subject: [PATCH] linux/seccomp-bpf: ppc64+glibc workaround in SIGSYS handler
|
||||
|
||||
Workaround for an apparent issue with glibc negating syscall
|
||||
parameters. Observed on a ppc64le machine with glibc.
|
||||
More investigation required.
|
||||
---
|
||||
sandbox/linux/seccomp-bpf/trap.cc | 14 ++++++++++++++
|
||||
1 file changed, 14 insertions(+)
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/seccomp-bpf/trap.cc
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/seccomp-bpf/trap.cc
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/seccomp-bpf/trap.cc
|
||||
@@ -236,6 +236,20 @@ void Trap::SigSys(int nr, LinuxSigInfo*
|
||||
SetIsInSigHandler();
|
||||
}
|
||||
|
||||
+#if defined(__powerpc64__)
|
||||
+ // On ppc64+glibc, some syscalls seem to accidentally negate the first
|
||||
+ // parameter which causes checks against it to fail. For now, manually
|
||||
+ // negate them back.
|
||||
+ // TODO(shawn@anastas.io): investigate this issue further
|
||||
+ auto nr = SECCOMP_SYSCALL(ctx);
|
||||
+ if (nr == __NR_openat || nr == __NR_mkdirat || nr == __NR_faccessat || nr == __NR_readlinkat ||
|
||||
+ nr == __NR_renameat || nr == __NR_renameat2 || nr == __NR_newfstatat || nr == __NR_unlinkat) {
|
||||
+ if (static_cast<int>(SECCOMP_PARM1(ctx)) > 0) {
|
||||
+ SECCOMP_PARM1(ctx) = -SECCOMP_PARM1(ctx);
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
// Copy the seccomp-specific data into a arch_seccomp_data structure. This
|
||||
// is what we are showing to TrapFnc callbacks that the system call
|
||||
// evaluator registered with the sandbox.
|
||||
20
chromium-lts/0001-sandbox-Enable-seccomp_bpf-for-ppc64.patch
Normal file
20
chromium-lts/0001-sandbox-Enable-seccomp_bpf-for-ppc64.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
From 0c65e40ae578b743b5f06956597ebc9700768d18 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 22:45:47 -0500
|
||||
Subject: [PATCH 1/1] sandbox: Enable seccomp_bpf for ppc64
|
||||
|
||||
---
|
||||
sandbox/features.gni | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: chromium-137.0.7151.40/sandbox/features.gni
|
||||
===================================================================
|
||||
--- chromium-137.0.7151.40.orig/sandbox/features.gni
|
||||
+++ chromium-137.0.7151.40/sandbox/features.gni
|
||||
@@ -9,4 +9,5 @@
|
||||
use_seccomp_bpf = (is_linux || is_chromeos || is_android) &&
|
||||
(current_cpu == "x86" || current_cpu == "x64" ||
|
||||
current_cpu == "arm" || current_cpu == "arm64" ||
|
||||
- current_cpu == "mipsel" || current_cpu == "mips64el")
|
||||
+ current_cpu == "mipsel" || current_cpu == "mips64el" ||
|
||||
+ current_cpu == "ppc64")
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
From 036d209a3f1a771de9aed31dfbe804aaf91d1c27 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 23:35:21 -0500
|
||||
Subject: [PATCH] sandbox/linux: Implement partial support for ppc64 syscalls
|
||||
and ucontext
|
||||
|
||||
Unlike other architectures, the ppc64 files currently rely on applicable
|
||||
headers being provided by the system. It is sufficient for standard
|
||||
GNU/Linux environments, but may require expansion elsewhere.
|
||||
---
|
||||
sandbox/linux/BUILD.gn | 2 ++
|
||||
sandbox/linux/system_headers/linux_syscalls.h | 4 ++++
|
||||
sandbox/linux/system_headers/linux_ucontext.h | 2 ++
|
||||
sandbox/linux/system_headers/ppc64_linux_syscalls.h | 12 ++++++++++++
|
||||
sandbox/linux/system_headers/ppc64_linux_ucontext.h | 12 ++++++++++++
|
||||
5 files changed, 32 insertions(+)
|
||||
create mode 100644 sandbox/linux/system_headers/ppc64_linux_syscalls.h
|
||||
create mode 100644 sandbox/linux/system_headers/ppc64_linux_ucontext.h
|
||||
|
||||
Index: chromium-134.0.6998.35/sandbox/linux/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-134.0.6998.35.orig/sandbox/linux/BUILD.gn
|
||||
+++ chromium-134.0.6998.35/sandbox/linux/BUILD.gn
|
||||
@@ -384,6 +384,8 @@ component("sandbox_services") {
|
||||
|
||||
source_set("sandbox_services_headers") {
|
||||
sources = [
|
||||
+ "system_headers/ppc64_linux_syscalls.h",
|
||||
+ "system_headers/ppc64_linux_ucontext.h",
|
||||
"system_headers/arm64_linux_syscalls.h",
|
||||
"system_headers/arm_linux_syscalls.h",
|
||||
"system_headers/arm_linux_ucontext.h",
|
||||
Index: chromium-134.0.6998.35/sandbox/linux/system_headers/linux_syscalls.h
|
||||
===================================================================
|
||||
--- chromium-134.0.6998.35.orig/sandbox/linux/system_headers/linux_syscalls.h
|
||||
+++ chromium-134.0.6998.35/sandbox/linux/system_headers/linux_syscalls.h
|
||||
@@ -35,5 +35,9 @@
|
||||
#include "sandbox/linux/system_headers/arm64_linux_syscalls.h"
|
||||
#endif
|
||||
|
||||
+#if defined(__powerpc64__)
|
||||
+#include "sandbox/linux/system_headers/ppc64_linux_syscalls.h"
|
||||
+#endif
|
||||
+
|
||||
#endif // SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_
|
||||
|
||||
Index: chromium-134.0.6998.35/sandbox/linux/system_headers/ppc64_linux_syscalls.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ chromium-134.0.6998.35/sandbox/linux/system_headers/ppc64_linux_syscalls.h
|
||||
@@ -0,0 +1,12 @@
|
||||
+// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_
|
||||
+#define SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_
|
||||
+
|
||||
+#include <asm/unistd.h>
|
||||
+
|
||||
+//TODO: is it necessary to redefine syscall numbers for PPC64?
|
||||
+
|
||||
+#endif // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_SYSCALLS_H_
|
||||
Index: chromium-134.0.6998.35/sandbox/linux/system_headers/ppc64_linux_ucontext.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ chromium-134.0.6998.35/sandbox/linux/system_headers/ppc64_linux_ucontext.h
|
||||
@@ -0,0 +1,12 @@
|
||||
+// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
|
||||
+#define SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
|
||||
+
|
||||
+#include <sys/ucontext.h>
|
||||
+
|
||||
+//TODO: is it necessary to redefine ucontext on PPC64?
|
||||
+
|
||||
+#endif // SANDBOX_LINUX_SYSTEM_HEADERS_PPC64_LINUX_UCONTEXT_H_
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
From c41cd6ac927f592b161abc04468d3c7a4be91995 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Tue, 23 Oct 2018 15:49:31 -0500
|
||||
Subject: [PATCH] sandbox/linux: Update IsSyscallAllowed in broker_process.cc
|
||||
|
||||
---
|
||||
sandbox/linux/syscall_broker/broker_process.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/syscall_broker/broker_process.cc
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/syscall_broker/broker_process.cc
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/syscall_broker/broker_process.cc
|
||||
@@ -169,7 +169,7 @@ bool BrokerProcess::IsSyscallBrokerable(
|
||||
#if defined(__NR_fstatat64)
|
||||
case __NR_fstatat64:
|
||||
#endif
|
||||
-#if defined(__x86_64__) || defined(__aarch64__)
|
||||
+#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_newfstatat:
|
||||
#endif
|
||||
return !fast_check || policy_->allowed_command_set.test(COMMAND_STAT);
|
||||
|
|
@ -0,0 +1,621 @@
|
|||
From da52663deec77f705d7d58b18484c3e28e563f10 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Tue, 18 Sep 2018 18:39:28 -0500
|
||||
Subject: [PATCH] sandbox/linux: Update syscall helpers/lists for ppc64
|
||||
|
||||
---
|
||||
.../seccomp-bpf-helpers/baseline_policy.cc | 8 +-
|
||||
.../syscall_parameters_restrictions.cc | 2 +-
|
||||
.../syscall_parameters_restrictions.h | 2 +-
|
||||
.../linux/seccomp-bpf-helpers/syscall_sets.cc | 108 ++++++++++--------
|
||||
.../linux/seccomp-bpf-helpers/syscall_sets.h | 6 +-
|
||||
sandbox/linux/services/syscall_wrappers.cc | 2 +-
|
||||
6 files changed, 73 insertions(+), 55 deletions(-)
|
||||
|
||||
--- a/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
|
||||
+++ b/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
|
||||
@@ -90,7 +90,8 @@ bool IsBaselinePolicyWatched(int sysno)
|
||||
SyscallSets::IsPrctl(sysno) ||
|
||||
SyscallSets::IsProcessGroupOrSession(sysno) ||
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
SyscallSets::IsSocketCall(sysno) ||
|
||||
#endif
|
||||
#if defined(__arm__)
|
||||
@@ -259,7 +260,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
|
||||
}
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
if (sysno == __NR_mmap)
|
||||
return RestrictMmapFlags();
|
||||
#endif
|
||||
@@ -280,7 +281,7 @@ ResultExpr EvaluateSyscallImpl(int fs_de
|
||||
return RestrictPrctl();
|
||||
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
if (sysno == __NR_socketpair) {
|
||||
// Only allow AF_UNIX, PF_UNIX. Crash if anything else is seen.
|
||||
static_assert(AF_UNIX == PF_UNIX,
|
||||
@@ -344,7 +345,8 @@ ResultExpr EvaluateSyscallImpl(int fs_de
|
||||
}
|
||||
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
if (SyscallSets::IsSocketCall(sysno))
|
||||
return RestrictSocketcallCommand();
|
||||
#endif
|
||||
--- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
||||
+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "sandbox/linux/system_headers/linux_syscalls.h"
|
||||
#include "sandbox/linux/system_headers/linux_time.h"
|
||||
|
||||
-#if BUILDFLAG(IS_LINUX) && !defined(__arm__) && !defined(__aarch64__) && \
|
||||
+#if BUILDFLAG(IS_LINUX) && !defined(__arm__) && !defined(__aarch64__) && !defined(__powerpc64__) && \
|
||||
!defined(PTRACE_GET_THREAD_AREA)
|
||||
// Also include asm/ptrace-abi.h since ptrace.h in older libc (for instance
|
||||
// the one in Ubuntu 16.04 LTS) is missing PTRACE_GET_THREAD_AREA.
|
||||
@@ -47,6 +47,11 @@
|
||||
#include <asm/ptrace-abi.h>
|
||||
#endif
|
||||
|
||||
+// On PPC64, TCGETS is defined in terms of struct termios, so we must include termios.h
|
||||
+#ifdef __powerpc64__
|
||||
+#include <termios.h>
|
||||
+#endif
|
||||
+
|
||||
#if BUILDFLAG(IS_ANDROID)
|
||||
|
||||
#if !defined(F_DUPFD_CLOEXEC)
|
||||
@@ -104,6 +109,15 @@ inline bool IsArchitectureMips() {
|
||||
#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
|
||||
@@ -271,9 +285,11 @@ ResultExpr RestrictFcntlCommands() {
|
||||
// operator.
|
||||
// Glibc overrides the kernel's O_LARGEFILE value. Account for this.
|
||||
uint64_t kOLargeFileFlag = O_LARGEFILE;
|
||||
- if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips())
|
||||
+ if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips() \
|
||||
+ || IsArchitecturePPC64())
|
||||
kOLargeFileFlag = 0100000;
|
||||
|
||||
+
|
||||
const Arg<int> cmd(1);
|
||||
const Arg<long> long_arg(2);
|
||||
|
||||
@@ -296,8 +312,17 @@ ResultExpr RestrictFcntlCommands() {
|
||||
F_SETLKW,
|
||||
F_GETLK,
|
||||
F_DUPFD,
|
||||
- F_DUPFD_CLOEXEC},
|
||||
- Allow())
|
||||
+ F_DUPFD_CLOEXEC
|
||||
+#if defined(__powerpc64__)
|
||||
+// On PPC64, F_SETLK, F_GETLK, F_SETLKW are defined as the 64-bit variants
|
||||
+// but glibc will sometimes still use the 32-bit versions. Allow both.
|
||||
+ ,
|
||||
+ 5, /* F_GETLK (32) */
|
||||
+ 6, /* F_SETLK (32) */
|
||||
+ 7 /* F_SETLKW (32) */
|
||||
+#endif
|
||||
+ },
|
||||
+ Allow())
|
||||
.Case(F_SETFL,
|
||||
If((long_arg & ~kAllowedMask) == 0, Allow()).Else(CrashSIGSYS()))
|
||||
.Case(F_ADD_SEALS,
|
||||
@@ -306,7 +331,7 @@ ResultExpr RestrictFcntlCommands() {
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
-#if defined(__i386__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__mips__) || defined(__powerpc64__)
|
||||
ResultExpr RestrictSocketcallCommand() {
|
||||
// Unfortunately, we are unable to restrict the first parameter to
|
||||
// socketpair(2). Whilst initially sounding bad, it's noteworthy that very
|
||||
@@ -475,7 +500,7 @@ ResultExpr RestrictPtrace() {
|
||||
#endif
|
||||
return Switch(request)
|
||||
.Cases({
|
||||
-#if !defined(__aarch64__)
|
||||
+#if !defined(__aarch64__) && !defined(__powerpc64__)
|
||||
PTRACE_GETREGS, PTRACE_GETFPREGS, PTRACE_GET_THREAD_AREA,
|
||||
PTRACE_GETREGSET,
|
||||
#endif
|
||||
--- a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h
|
||||
+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h
|
||||
@@ -52,7 +52,7 @@ SANDBOX_EXPORT bpf_dsl::ResultExpr Restr
|
||||
// O_NONBLOCK | O_SYNC | O_LARGEFILE | O_CLOEXEC | O_NOATIME.
|
||||
SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictFcntlCommands();
|
||||
|
||||
-#if defined(__i386__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__mips__) || defined(__powerpc64__)
|
||||
// Restrict socketcall(2) to only allow socketpair(2), send(2), recv(2),
|
||||
// sendto(2), recvfrom(2), shutdown(2), sendmsg(2) and recvmsg(2).
|
||||
SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictSocketcallCommand();
|
||||
--- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
@@ -29,7 +29,8 @@ bool SyscallSets::IsAllowedGettime(int s
|
||||
switch (sysno) {
|
||||
case __NR_gettimeofday:
|
||||
#if defined(__i386__) || defined(__x86_64__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_time:
|
||||
#endif
|
||||
return true;
|
||||
@@ -52,12 +53,14 @@ bool SyscallSets::IsAllowedGettime(int s
|
||||
case __NR_clock_nanosleep_time64: // Parameters filtered by RestrictClockID().
|
||||
#endif
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_ftime: // Obsolete.
|
||||
#endif
|
||||
case __NR_settimeofday: // Privileged.
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_stime:
|
||||
#endif
|
||||
default:
|
||||
@@ -136,7 +139,7 @@ bool SyscallSets::IsFileSystem(int sysno
|
||||
case __NR_faccessat2:
|
||||
case __NR_fchmodat:
|
||||
case __NR_fchownat: // Should be called chownat ?
|
||||
-#if defined(__x86_64__) || defined(__aarch64__)
|
||||
+#if defined(__x86_64__) || defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_newfstatat: // fstatat(). EPERM not a valid errno.
|
||||
#elif defined(__i386__) || defined(__arm__) || \
|
||||
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
@@ -155,7 +158,7 @@ bool SyscallSets::IsFileSystem(int sysno
|
||||
case __NR_memfd_create:
|
||||
case __NR_mkdirat:
|
||||
case __NR_mknodat:
|
||||
-#if defined(__i386__)
|
||||
+#if defined(__i386__) || defined(__powerpc64__)
|
||||
case __NR_oldlstat:
|
||||
case __NR_oldstat:
|
||||
#endif
|
||||
@@ -169,7 +172,8 @@ bool SyscallSets::IsFileSystem(int sysno
|
||||
#endif
|
||||
case __NR_statfs: // EPERM not a valid errno.
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_statfs64:
|
||||
#endif
|
||||
case __NR_statx: // EPERM not a valid errno.
|
||||
@@ -180,7 +184,8 @@ bool SyscallSets::IsFileSystem(int sysno
|
||||
case __NR_truncate64:
|
||||
#endif
|
||||
case __NR_unlinkat:
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_utime:
|
||||
#endif
|
||||
case __NR_utimensat: // New.
|
||||
@@ -220,7 +225,8 @@ bool SyscallSets::IsAllowedFileSystemAcc
|
||||
#endif
|
||||
return true;
|
||||
// TODO(jln): these should be denied gracefully as well (moved below).
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_fadvise64: // EPERM not a valid errno.
|
||||
#endif
|
||||
#if defined(__i386__)
|
||||
@@ -233,11 +239,12 @@ bool SyscallSets::IsAllowedFileSystemAcc
|
||||
case __NR_flock: // EPERM not a valid errno.
|
||||
case __NR_fstatfs: // Give information about the whole filesystem.
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_fstatfs64:
|
||||
#endif
|
||||
case __NR_fsync: // EPERM not a valid errno.
|
||||
-#if defined(__i386__)
|
||||
+#if defined(__i386__) || defined(__powerpc64__)
|
||||
case __NR_oldfstat:
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
@@ -245,6 +252,8 @@ bool SyscallSets::IsAllowedFileSystemAcc
|
||||
case __NR_sync_file_range: // EPERM not a valid errno.
|
||||
#elif defined(__arm__)
|
||||
case __NR_arm_sync_file_range: // EPERM not a valid errno.
|
||||
+#elif defined(__powerpc64__)
|
||||
+ case __NR_sync_file_range2: // EPERM not a valid errno.
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
@@ -265,7 +274,8 @@ bool SyscallSets::IsDeniedFileSystemAcce
|
||||
#endif
|
||||
case __NR_getdents64: // EPERM not a valid errno.
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_readdir:
|
||||
#endif
|
||||
return true;
|
||||
@@ -306,7 +316,7 @@ bool SyscallSets::IsGetSimpleId(int sysn
|
||||
bool SyscallSets::IsProcessPrivilegeChange(int sysno) {
|
||||
switch (sysno) {
|
||||
case __NR_capset:
|
||||
-#if defined(__i386__) || defined(__x86_64__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc64__)
|
||||
case __NR_ioperm: // Intel privilege.
|
||||
case __NR_iopl: // Intel privilege.
|
||||
#endif
|
||||
@@ -362,7 +372,8 @@ bool SyscallSets::IsAllowedSignalHandlin
|
||||
// overflow.
|
||||
case __NR_sigaltstack:
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_rt_sigtimedwait_time64:
|
||||
case __NR_sigaction:
|
||||
case __NR_sigprocmask:
|
||||
@@ -378,7 +389,8 @@ bool SyscallSets::IsAllowedSignalHandlin
|
||||
#endif
|
||||
case __NR_signalfd4:
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_sigpending:
|
||||
case __NR_sigsuspend:
|
||||
#endif
|
||||
@@ -402,7 +414,7 @@ bool SyscallSets::IsAllowedOperationOnFd
|
||||
#endif
|
||||
case __NR_dup3:
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_shutdown:
|
||||
#endif
|
||||
return true;
|
||||
@@ -435,7 +447,7 @@ bool SyscallSets::IsAllowedProcessStartO
|
||||
case __NR_exit_group:
|
||||
case __NR_wait4:
|
||||
case __NR_waitid:
|
||||
-#if defined(__i386__)
|
||||
+#if defined(__i386__) || defined(__powerpc64__)
|
||||
case __NR_waitpid:
|
||||
#endif
|
||||
return true;
|
||||
@@ -499,7 +511,7 @@ bool SyscallSets::IsAllowedEpoll(int sys
|
||||
bool SyscallSets::IsDeniedGetOrModifySocket(int sysno) {
|
||||
switch (sysno) {
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_accept:
|
||||
case __NR_accept4:
|
||||
case __NR_bind:
|
||||
@@ -514,7 +526,8 @@ bool SyscallSets::IsDeniedGetOrModifySoc
|
||||
}
|
||||
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
// Big multiplexing system call for sockets.
|
||||
bool SyscallSets::IsSocketCall(int sysno) {
|
||||
switch (sysno) {
|
||||
@@ -528,7 +541,8 @@ bool SyscallSets::IsSocketCall(int sysno
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if defined(__x86_64__) || defined(__arm__) || defined(__mips__)
|
||||
+#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
bool SyscallSets::IsNetworkSocketInformation(int sysno) {
|
||||
switch (sysno) {
|
||||
case __NR_getpeername:
|
||||
@@ -554,7 +568,7 @@ bool SyscallSets::IsAllowedAddressSpaceA
|
||||
case __NR_mincore:
|
||||
case __NR_mlockall:
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_mmap:
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
@@ -584,7 +598,8 @@ bool SyscallSets::IsAllowedGeneralIo(int
|
||||
switch (sysno) {
|
||||
case __NR_lseek:
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR__llseek:
|
||||
#endif
|
||||
#if !defined(__aarch64__)
|
||||
@@ -604,18 +619,19 @@ bool SyscallSets::IsAllowedGeneralIo(int
|
||||
case __NR_readv:
|
||||
case __NR_pread64:
|
||||
#if defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_recv:
|
||||
#endif
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_recvfrom: // Could specify source.
|
||||
case __NR_recvmsg: // Could specify source.
|
||||
#endif
|
||||
-#if defined(__i386__) || defined(__x86_64__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc64__)
|
||||
case __NR_select:
|
||||
#endif
|
||||
-#if defined(__i386__) || defined(__arm__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__arm__) || defined(__mips__) || defined(__powerpc64__)
|
||||
case __NR__newselect:
|
||||
#endif
|
||||
case __NR_write:
|
||||
@@ -635,11 +651,12 @@ bool SyscallSets::IsAllowedGeneralIo(int
|
||||
case __NR_vmsplice:
|
||||
// send* syscalls need their flags filtered.
|
||||
#if defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_send:
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
|
||||
- defined(__mips__) || defined(__aarch64__)
|
||||
+ defined(__mips__) || defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_sendmsg: // Could specify destination.
|
||||
case __NR_sendto: // Could specify destination.
|
||||
#endif
|
||||
@@ -697,7 +714,8 @@ bool SyscallSets::IsAllowedBasicSchedule
|
||||
return true;
|
||||
case __NR_getpriority:
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_nice:
|
||||
#endif
|
||||
case __NR_setpriority:
|
||||
@@ -709,7 +727,8 @@ bool SyscallSets::IsAllowedBasicSchedule
|
||||
bool SyscallSets::IsAdminOperation(int sysno) {
|
||||
switch (sysno) {
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_bdflush:
|
||||
#endif
|
||||
case __NR_kexec_load:
|
||||
@@ -725,7 +744,8 @@ bool SyscallSets::IsAdminOperation(int s
|
||||
|
||||
bool SyscallSets::IsKernelModule(int sysno) {
|
||||
switch (sysno) {
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_create_module:
|
||||
case __NR_get_kernel_syms: // Should ENOSYS.
|
||||
case __NR_query_module:
|
||||
@@ -758,7 +778,8 @@ bool SyscallSets::IsFsControl(int sysno)
|
||||
case __NR_swapoff:
|
||||
case __NR_swapon:
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_umount:
|
||||
#endif
|
||||
case __NR_umount2:
|
||||
@@ -774,7 +795,7 @@ bool SyscallSets::IsNuma(int sysno) {
|
||||
case __NR_getcpu:
|
||||
case __NR_mbind:
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_migrate_pages:
|
||||
#endif
|
||||
case __NR_move_pages:
|
||||
@@ -809,14 +830,15 @@ bool SyscallSets::IsGlobalProcessEnviron
|
||||
switch (sysno) {
|
||||
case __NR_acct: // Privileged.
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_getrlimit:
|
||||
#endif
|
||||
-#if defined(__i386__) || defined(__arm__)
|
||||
+#if defined(__i386__) || defined(__arm__) || defined(__powerpc64__)
|
||||
case __NR_ugetrlimit:
|
||||
#endif
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_ulimit:
|
||||
#endif
|
||||
case __NR_getrusage:
|
||||
@@ -850,7 +872,7 @@ bool SyscallSets::IsGlobalSystemStatus(i
|
||||
#endif
|
||||
case __NR_sysinfo:
|
||||
case __NR_uname:
|
||||
-#if defined(__i386__)
|
||||
+#if defined(__i386__) || defined(__powerpc64__)
|
||||
case __NR_olduname:
|
||||
case __NR_oldolduname:
|
||||
#endif
|
||||
@@ -934,7 +956,8 @@ bool SyscallSets::IsSystemVSemaphores(in
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
|
||||
defined(__aarch64__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
// These give a lot of ambient authority and bypass the setuid sandbox.
|
||||
bool SyscallSets::IsSystemVSharedMemory(int sysno) {
|
||||
switch (sysno) {
|
||||
@@ -965,7 +988,8 @@ bool SyscallSets::IsSystemVMessageQueue(
|
||||
#endif
|
||||
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
// Big system V multiplexing system call.
|
||||
bool SyscallSets::IsSystemVIpc(int sysno) {
|
||||
switch (sysno) {
|
||||
@@ -985,7 +1009,8 @@ bool SyscallSets::IsAnySystemV(int sysno
|
||||
return IsSystemVMessageQueue(sysno) || IsSystemVSemaphores(sysno) ||
|
||||
IsSystemVSharedMemory(sysno);
|
||||
#elif defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
return IsSystemVIpc(sysno);
|
||||
#endif
|
||||
}
|
||||
@@ -1042,7 +1067,8 @@ bool SyscallSets::IsFaNotify(int sysno)
|
||||
bool SyscallSets::IsTimer(int sysno) {
|
||||
switch (sysno) {
|
||||
case __NR_getitimer:
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_alarm:
|
||||
#endif
|
||||
case __NR_setitimer:
|
||||
@@ -1121,18 +1147,22 @@ bool SyscallSets::IsMisc(int sysno) {
|
||||
case __NR_syncfs:
|
||||
case __NR_vhangup:
|
||||
// The system calls below are not implemented.
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_afs_syscall:
|
||||
#endif
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_break:
|
||||
#endif
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_getpmsg:
|
||||
#endif
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_gtty:
|
||||
case __NR_idle:
|
||||
case __NR_lock:
|
||||
@@ -1140,20 +1170,22 @@ bool SyscallSets::IsMisc(int sysno) {
|
||||
case __NR_prof:
|
||||
case __NR_profil:
|
||||
#endif
|
||||
-#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
+#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_putpmsg:
|
||||
#endif
|
||||
#if defined(__x86_64__)
|
||||
case __NR_security:
|
||||
#endif
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
case __NR_stty:
|
||||
#endif
|
||||
-#if defined(__x86_64__)
|
||||
+#if defined(__x86_64__) || defined(__powerpc64__)
|
||||
case __NR_tuxcall:
|
||||
#endif
|
||||
-#if !defined(__aarch64__)
|
||||
+#if !defined(__aarch64__) && !defined(__powerpc64__)
|
||||
case __NR_vserver:
|
||||
#endif
|
||||
return true;
|
||||
--- a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
|
||||
+++ b/sandbox/linux/seccomp-bpf-helpers/syscall_sets.h
|
||||
@@ -46,13 +46,14 @@ class SANDBOX_EXPORT SyscallSets {
|
||||
static bool IsDeniedGetOrModifySocket(int sysno);
|
||||
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
// Big multiplexing system call for sockets.
|
||||
static bool IsSocketCall(int sysno);
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__) || defined(__arm__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
static bool IsNetworkSocketInformation(int sysno);
|
||||
#endif
|
||||
|
||||
@@ -85,7 +86,8 @@ class SANDBOX_EXPORT SyscallSets {
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
|
||||
defined(__aarch64__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_64_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
// These give a lot of ambient authority and bypass the setuid sandbox.
|
||||
static bool IsSystemVSharedMemory(int sysno);
|
||||
#endif
|
||||
@@ -96,7 +98,8 @@ class SANDBOX_EXPORT SyscallSets {
|
||||
#endif
|
||||
|
||||
#if defined(__i386__) || \
|
||||
- (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))
|
||||
+ (defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
+ defined(__powerpc64__)
|
||||
// Big system V multiplexing system call.
|
||||
static bool IsSystemVIpc(int sysno);
|
||||
#endif
|
||||
--- a/sandbox/linux/services/syscall_wrappers.cc
|
||||
+++ b/sandbox/linux/services/syscall_wrappers.cc
|
||||
@@ -66,7 +66,7 @@ long sys_clone(unsigned long flags,
|
||||
#if defined(ARCH_CPU_X86_64)
|
||||
return syscall(__NR_clone, flags, child_stack, ptid, ctid, tls);
|
||||
#elif defined(ARCH_CPU_X86) || defined(ARCH_CPU_ARM_FAMILY) || \
|
||||
- defined(ARCH_CPU_MIPS_FAMILY)
|
||||
+ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_PPC64_FAMILY)
|
||||
// CONFIG_CLONE_BACKWARDS defined.
|
||||
return syscall(__NR_clone, flags, child_stack, ptid, tls, ctid);
|
||||
#endif
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
From c9043a422fb4a5a6c72aaa1b907cea5f6a3061dd Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 19:10:24 -0500
|
||||
Subject: [PATCH 1/4] sandbox/linux/bpf_dsl: Update syscall ranges for ppc64
|
||||
|
||||
---
|
||||
sandbox/linux/bpf_dsl/linux_syscall_ranges.h | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
Index: chromium-137.0.7151.40/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
|
||||
===================================================================
|
||||
--- chromium-137.0.7151.40.orig/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
|
||||
+++ chromium-137.0.7151.40/sandbox/linux/bpf_dsl/linux_syscall_ranges.h
|
||||
@@ -56,6 +56,13 @@
|
||||
#define MAX_PUBLIC_SYSCALL __NR_syscalls
|
||||
#define MAX_SYSCALL MAX_PUBLIC_SYSCALL
|
||||
|
||||
+#elif defined(__powerpc64__)
|
||||
+
|
||||
+#include <asm-generic/unistd.h>
|
||||
+#define MIN_SYSCALL 0u
|
||||
+#define MAX_PUBLIC_SYSCALL __NR_syscalls
|
||||
+#define MAX_SYSCALL MAX_PUBLIC_SYSCALL
|
||||
+
|
||||
#else
|
||||
#error "Unsupported architecture"
|
||||
#endif
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
From 7468b266532bd607eb1f5292d758256d800b2eee Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Fri, 10 Aug 2018 00:23:50 -0500
|
||||
Subject: [PATCH] services/service_manager/sandbox/linux: Fix TCGETS
|
||||
declaration on PPC64
|
||||
|
||||
---
|
||||
.../sandbox/linux/bpf_renderer_policy_linux.cc | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
+++ chromium-128.0.6613.113/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
@@ -15,6 +15,11 @@
|
||||
#include "sandbox/linux/system_headers/linux_syscalls.h"
|
||||
#include "sandbox/policy/linux/sandbox_linux.h"
|
||||
|
||||
+// On PPC64, TCGETS is defined in terms of struct termios, so we must include termios.h
|
||||
+#ifdef __powerpc64__
|
||||
+#include <termios.h>
|
||||
+#endif
|
||||
+
|
||||
// TODO(vignatti): replace the local definitions below with #include
|
||||
// <linux/dma-buf.h> once kernel version 4.6 becomes widely used.
|
||||
#include <linux/types.h>
|
||||
11
chromium-lts/0001-swiftshader-fix-build.patch
Normal file
11
chromium-lts/0001-swiftshader-fix-build.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- a/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn
|
||||
+++ b/third_party/swiftshader/third_party/llvm-10.0/BUILD.gn
|
||||
@@ -1258,6 +1258,8 @@
|
||||
"llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp",
|
||||
"llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp",
|
||||
"llvm/lib/Target/PowerPC/TargetInfo/PowerPCTargetInfo.cpp",
|
||||
+ "llvm/lib/MC/MCXCOFFObjectTargetWriter.cpp",
|
||||
+ "llvm/lib/MC/MCAsmInfoXCOFF.cpp",
|
||||
]
|
||||
}
|
||||
|
||||
11
chromium-lts/0001-third-party-hwy-wrong-include.patch
Normal file
11
chromium-lts/0001-third-party-hwy-wrong-include.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- a/third_party/highway/src/hwy/targets.cc
|
||||
+++ b/third_party/highway/src/hwy/targets.cc
|
||||
@@ -35,7 +35,7 @@
|
||||
HWY_OS_LINUX
|
||||
// sys/auxv.h does not always include asm/hwcap.h, or define HWCAP*, hence we
|
||||
// still include this directly. See #1199.
|
||||
-#ifndef TOOLCHAIN_MISS_ASM_HWCAP_H
|
||||
+#if !defined(TOOLCHAIN_MISS_ASM_HWCAP_H) && !defined(HWY_ARCH_PPC)
|
||||
#include <asm/hwcap.h>
|
||||
#endif
|
||||
#if HWY_HAVE_AUXV
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
Index: chromium-128.0.6613.113/third_party/angle/src/libANGLE/Constants.h
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/angle/src/libANGLE/Constants.h
|
||||
+++ chromium-128.0.6613.113/third_party/angle/src/libANGLE/Constants.h
|
||||
@@ -9,6 +9,7 @@
|
||||
#ifndef LIBANGLE_CONSTANTS_H_
|
||||
#define LIBANGLE_CONSTANTS_H_
|
||||
|
||||
+#include <cstddef>
|
||||
#include "common/platform.h"
|
||||
|
||||
#include <stddef.h>
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
From cc613c2e3bac8d4d1ff153700b819f964435923a Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Tue, 4 Sep 2018 18:16:07 -0500
|
||||
Subject: [PATCH] third_party/libvpx: Properly generate gni on ppc64
|
||||
|
||||
---
|
||||
third_party/libvpx/BUILD.gn | 2 ++
|
||||
third_party/libvpx/generate_gni.sh | 10 ++++++++++
|
||||
2 files changed, 12 insertions(+)
|
||||
|
||||
Index: chromium-128.0.6613.113/third_party/libvpx/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/libvpx/BUILD.gn
|
||||
+++ chromium-128.0.6613.113/third_party/libvpx/BUILD.gn
|
||||
@@ -320,6 +320,8 @@ if (current_cpu == "x86" || (current_cpu
|
||||
} else if (current_cpu == "x64") {
|
||||
deps = [ ":libvpx_x86_64_headers" ]
|
||||
sources = libvpx_srcs_x86_64_avx512
|
||||
+ } else if (current_cpu == "ppc64") {
|
||||
+ sources = libvpx_srcs_ppc64
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
From 63e63a70766f3059ce5f1d06a95988ecf909b298 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawn@anastas.io>
|
||||
Date: Wed, 24 Apr 2019 21:17:23 -0500
|
||||
Subject: [PATCH] third_party/pffft: Include altivec.h on ppc64 with SIMD
|
||||
enabled
|
||||
|
||||
---
|
||||
third_party/pffft/src/pffft.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
Index: chromium-128.0.6613.113/third_party/pffft/src/pffft.c
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/pffft/src/pffft.c
|
||||
+++ chromium-128.0.6613.113/third_party/pffft/src/pffft.c
|
||||
@@ -100,6 +100,7 @@
|
||||
Altivec support macros
|
||||
*/
|
||||
#if !defined(PFFFT_SIMD_DISABLE) && (defined(__ppc__) || defined(__ppc64__))
|
||||
+#include <altivec.h>
|
||||
typedef vector float v4sf;
|
||||
# define SIMD_SZ 4
|
||||
# define VZERO() ((vector float) vec_splat_u8(0))
|
||||
5763
chromium-lts/0002-Add-PPC64-generated-files-for-boringssl.patch
Normal file
5763
chromium-lts/0002-Add-PPC64-generated-files-for-boringssl.patch
Normal file
File diff suppressed because it is too large
Load diff
18
chromium-lts/0002-Add-ppc64-trap-instructions.patch
Normal file
18
chromium-lts/0002-Add-ppc64-trap-instructions.patch
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
Index: chromium-128.0.6613.113/v8/src/base/immediate-crash.h
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/v8/src/base/immediate-crash.h
|
||||
+++ chromium-128.0.6613.113/v8/src/base/immediate-crash.h
|
||||
@@ -98,6 +98,13 @@
|
||||
#define TRAP_SEQUENCE1_() asm volatile(".2byte 0x0001");
|
||||
#define TRAP_SEQUENCE2_() asm volatile("")
|
||||
|
||||
+#elif V8_HOST_ARCH_PPC64
|
||||
+
|
||||
+#define TRAP_SEQUENCE1_() asm volatile("trap")
|
||||
+// Intentionally empty: __builtin_unreachable() is always part of the sequence
|
||||
+// (see IMMEDIATE_CRASH below)
|
||||
+#define TRAP_SEQUENCE2_() asm volatile("")
|
||||
+
|
||||
#else
|
||||
|
||||
// Crash report accuracy will not be guaranteed on other architectures, but at
|
||||
36
chromium-lts/0002-Fix-Missing-OPENSSL_NO_ENGINE-Guard.patch
Normal file
36
chromium-lts/0002-Fix-Missing-OPENSSL_NO_ENGINE-Guard.patch
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# crypto: fix missing OPENSSL_NO_ENGINE guard
|
||||
# PR-URL: https://github.com/nodejs/node/pull/57012
|
||||
# Reviewed-By: Richard Lau <rlau@redhat.com>
|
||||
# Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
|
||||
# Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
|
||||
# Reviewed-By: James M Snell <jasnell@gmail.com>
|
||||
|
||||
diff --git a/src/crypto/crypto_context.cc b/src/crypto/crypto_context.cc
|
||||
index abcdef1..2345678 100644
|
||||
--- a/src/crypto/crypto_context.cc
|
||||
+++ b/src/crypto/crypto_context.cc
|
||||
@@ -34,7 +34,9 @@ using ncrypto::BIOPointer;
|
||||
using ncrypto::ClearErrorOnReturn;
|
||||
using ncrypto::CryptoErrorList;
|
||||
using ncrypto::DHPointer;
|
||||
+#ifndef OPENSSL_NO_ENGINE
|
||||
using ncrypto::EnginePointer;
|
||||
+#endif // !OPENSSL_NO_ENGINE
|
||||
using ncrypto::EVPKeyPointer;
|
||||
using ncrypto::MarkPopErrorOnReturn;
|
||||
using ncrypto::SSLPointer;
|
||||
|
||||
diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc
|
||||
index 1234567..abcdef0 100644
|
||||
--- a/src/crypto/crypto_util.cc
|
||||
+++ b/src/crypto/crypto_util.cc
|
||||
@@ -30,7 +30,9 @@
|
||||
using ncrypto::BIOPointer;
|
||||
using ncrypto::CryptoErrorList;
|
||||
+#ifndef OPENSSL_NO_ENGINE
|
||||
using ncrypto::EnginePointer;
|
||||
+#endif // !OPENSSL_NO_ENGINE
|
||||
using ncrypto::EVPKeyCtxPointer;
|
||||
using v8::ArrayBuffer;
|
||||
using v8::BackingStore;
|
||||
using v8::BigInt;
|
||||
21
chromium-lts/0002-Include-cstddef-to-fix-build.patch
Normal file
21
chromium-lts/0002-Include-cstddef-to-fix-build.patch
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
From 82922bf486e9926a171152f61030dfcd53f017b8 Mon Sep 17 00:00:00 2001
|
||||
From: Timothy Pearson <tpearson@raptorengineering.com>
|
||||
Date: Thu, 30 Aug 2018 17:32:05 -0500
|
||||
Subject: [PATCH] Include cstddef to fix build
|
||||
|
||||
size_t is not defined unless cstddef is included.
|
||||
---
|
||||
third_party/crashpad/crashpad/compat/linux/sys/user.h | 1 +
|
||||
|
||||
Index: chromium-127.0.6533.72/third_party/crashpad/crashpad/compat/linux/sys/user.h
|
||||
===================================================================
|
||||
--- chromium-127.0.6533.72.orig/third_party/crashpad/crashpad/compat/linux/sys/user.h
|
||||
+++ chromium-127.0.6533.72/third_party/crashpad/crashpad/compat/linux/sys/user.h
|
||||
@@ -15,6 +15,7 @@
|
||||
#ifndef CRASHPAD_COMPAT_LINUX_SYS_USER_H_
|
||||
#define CRASHPAD_COMPAT_LINUX_SYS_USER_H_
|
||||
|
||||
+#include <cstddef>
|
||||
#include_next <sys/user.h>
|
||||
|
||||
#include <features.h>
|
||||
83378
chromium-lts/0002-regenerate-xnn-buildgn.patch
Normal file
83378
chromium-lts/0002-regenerate-xnn-buildgn.patch
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,76 @@
|
|||
From 3c4705bfdda45feb860a1f121631773e5fe8e53f Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 19:11:26 -0500
|
||||
Subject: [PATCH 1/4] sandbox/linux/bpf_dsl: Modify seccomp_macros to add
|
||||
support for ppc64
|
||||
|
||||
---
|
||||
sandbox/linux/bpf_dsl/seccomp_macros.h | 43 ++++++++++++++++++++++++++
|
||||
1 file changed, 43 insertions(+)
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/bpf_dsl/seccomp_macros.h
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/bpf_dsl/seccomp_macros.h
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/bpf_dsl/seccomp_macros.h
|
||||
@@ -14,6 +14,9 @@
|
||||
#if defined(__mips__)
|
||||
// sys/user.h in eglibc misses size_t definition
|
||||
#include <stddef.h>
|
||||
+#elif defined(__powerpc64__)
|
||||
+// Manually define greg_t on ppc64
|
||||
+typedef unsigned long long greg_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -343,6 +346,51 @@ struct regs_struct {
|
||||
#define SECCOMP_PT_PARM4(_regs) (_regs).regs[3]
|
||||
#define SECCOMP_PT_PARM5(_regs) (_regs).regs[4]
|
||||
#define SECCOMP_PT_PARM6(_regs) (_regs).regs[5]
|
||||
+
|
||||
+#elif defined(__powerpc64__)
|
||||
+#include <asm/ptrace.h>
|
||||
+
|
||||
+typedef struct pt_regs regs_struct;
|
||||
+
|
||||
+#ifdef ARCH_CPU_LITTLE_ENDIAN
|
||||
+#define SECCOMP_ARCH AUDIT_ARCH_PPC64LE
|
||||
+#else
|
||||
+#define SECCOMP_ARCH AUDIT_ARCH_PPC64
|
||||
+#endif
|
||||
+
|
||||
+#define SECCOMP_REG(_ctx, _reg) ((_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_PARM1(_ctx) SECCOMP_REG(_ctx, 3)
|
||||
+#define SECCOMP_PARM2(_ctx) SECCOMP_REG(_ctx, 4)
|
||||
+#define SECCOMP_PARM3(_ctx) SECCOMP_REG(_ctx, 5)
|
||||
+#define SECCOMP_PARM4(_ctx) SECCOMP_REG(_ctx, 6)
|
||||
+#define SECCOMP_PARM5(_ctx) SECCOMP_REG(_ctx, 7)
|
||||
+#define SECCOMP_PARM6(_ctx) SECCOMP_REG(_ctx, 8)
|
||||
+
|
||||
+#define SECCOMP_NR_IDX (offsetof(struct arch_seccomp_data, nr))
|
||||
+#define SECCOMP_ARCH_IDX (offsetof(struct arch_seccomp_data, arch))
|
||||
+#define SECCOMP_IP_MSB_IDX \
|
||||
+ (offsetof(struct arch_seccomp_data, instruction_pointer) + 4)
|
||||
+#define SECCOMP_IP_LSB_IDX \
|
||||
+ (offsetof(struct arch_seccomp_data, instruction_pointer) + 0)
|
||||
+#define SECCOMP_ARG_MSB_IDX(nr) \
|
||||
+ (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 4)
|
||||
+#define SECCOMP_ARG_LSB_IDX(nr) \
|
||||
+ (offsetof(struct arch_seccomp_data, args) + 8 * (nr) + 0)
|
||||
+
|
||||
+#define SECCOMP_PT_RESULT(_regs) (_regs).gpr[3]
|
||||
+#define SECCOMP_PT_SYSCALL(_regs) (_regs).gpr[0]
|
||||
+#define SECCOMP_PT_IP(_regs) (_regs).nip
|
||||
+#define SECCOMP_PT_PARM1(_regs) (_regs).gpr[3]
|
||||
+#define SECCOMP_PT_PARM2(_regs) (_regs).gpr[4]
|
||||
+#define SECCOMP_PT_PARM3(_regs) (_regs).gpr[5]
|
||||
+#define SECCOMP_PT_PARM4(_regs) (_regs).gpr[6]
|
||||
+#define SECCOMP_PT_PARM5(_regs) (_regs).gpr[7]
|
||||
+#define SECCOMP_PT_PARM6(_regs) (_regs).gpr[8]
|
||||
+
|
||||
#else
|
||||
#error Unsupported target platform
|
||||
|
||||
1500
chromium-lts/0002-third_party-libvpx-Remove-bad-ppc64-config.patch
Normal file
1500
chromium-lts/0002-third_party-libvpx-Remove-bad-ppc64-config.patch
Normal file
File diff suppressed because it is too large
Load diff
148
chromium-lts/0002-third_party-lss-kernel-structs.patch
Normal file
148
chromium-lts/0002-third_party-lss-kernel-structs.patch
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
Index: chromium-136.0.7103.48/third_party/lss/linux_syscall_support.h
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/lss/linux_syscall_support.h
|
||||
+++ chromium-136.0.7103.48/third_party/lss/linux_syscall_support.h
|
||||
@@ -86,7 +86,7 @@
|
||||
* Porting to other related platforms should not be difficult.
|
||||
*/
|
||||
#if (defined(__i386__) || defined(__x86_64__) || defined(__ARM_ARCH_3__) || \
|
||||
- defined(__mips__) || defined(__PPC__) || defined(__ARM_EABI__) || \
|
||||
+ defined(__mips__) || defined(__PPC__) || defined(__powerpc64__) || defined(__ARM_EABI__) || \
|
||||
defined(__aarch64__) || defined(__s390__) || defined(__e2k__) || \
|
||||
(defined(__riscv) && __riscv_xlen == 64) || defined(__loongarch_lp64)) \
|
||||
&& (defined(__linux) || defined(__ANDROID__))
|
||||
@@ -398,7 +398,7 @@ struct kernel_stat64 {
|
||||
unsigned __pad2;
|
||||
unsigned long long st_blocks;
|
||||
};
|
||||
-#elif defined __PPC__
|
||||
+#elif defined __PPC__ && !defined(__powerpc64__)
|
||||
struct kernel_stat64 {
|
||||
unsigned long long st_dev;
|
||||
unsigned long long st_ino;
|
||||
@@ -420,6 +420,28 @@ struct kernel_stat64 {
|
||||
unsigned long __unused4;
|
||||
unsigned long __unused5;
|
||||
};
|
||||
+#elif defined(__powerpc64__)
|
||||
+struct kernel_stat64 {
|
||||
+ unsigned long int st_dev;
|
||||
+ unsigned long int st_ino;
|
||||
+ unsigned int st_mode;
|
||||
+ unsigned long int st_nlink;
|
||||
+ unsigned int st_uid;
|
||||
+ unsigned int st_gid;
|
||||
+ unsigned long int st_rdev;
|
||||
+ unsigned short int __pad2;
|
||||
+ long int st_size;
|
||||
+ long int st_blksize;
|
||||
+ long int st_blocks;
|
||||
+ long int st_atime_;
|
||||
+ unsigned long int st_atime_nsec_;
|
||||
+ long int st_mtime_;
|
||||
+ unsigned long int st_mtime_nsec_;
|
||||
+ long int st_ctime_;
|
||||
+ unsigned long int st_ctime_nsec_;
|
||||
+ unsigned long int __unused4;
|
||||
+ unsigned long int __unused5;
|
||||
+};
|
||||
#elif defined(__e2k__)
|
||||
struct kernel_stat64 {
|
||||
unsigned long long st_dev;
|
||||
@@ -536,7 +558,7 @@ struct kernel_stat {
|
||||
uint64_t st_ctime_nsec_;
|
||||
int64_t __unused4[3];
|
||||
};
|
||||
-#elif defined(__PPC__)
|
||||
+#elif defined(__PPC__) && !defined(__powerpc64__)
|
||||
typedef unsigned long kernel_blkcnt_t;
|
||||
typedef unsigned long kernel_blksize_t;
|
||||
typedef unsigned kernel_dev_t;
|
||||
@@ -567,6 +589,37 @@ struct kernel_stat {
|
||||
unsigned long __unused4;
|
||||
unsigned long __unused5;
|
||||
};
|
||||
+#elif defined(__powerpc64__)
|
||||
+typedef long int kernel_blkcnt_t;
|
||||
+typedef long int kernel_blksize_t;
|
||||
+typedef unsigned long int kernel_dev_t;
|
||||
+typedef unsigned int kernel_gid_t;
|
||||
+typedef unsigned long int kernel_ino_t;
|
||||
+typedef unsigned int kernel_mode_t;
|
||||
+typedef unsigned long int kernel_nlink_t;
|
||||
+typedef long int kernel_off_t;
|
||||
+typedef long int kernel_time_t;
|
||||
+typedef unsigned int kernel_uid_t;
|
||||
+struct kernel_stat {
|
||||
+ kernel_dev_t st_dev;
|
||||
+ kernel_ino_t st_ino;
|
||||
+ kernel_mode_t st_mode;
|
||||
+ kernel_nlink_t st_nlink;
|
||||
+ kernel_uid_t st_uid;
|
||||
+ kernel_gid_t st_gid;
|
||||
+ kernel_dev_t st_rdev;
|
||||
+ kernel_off_t st_size;
|
||||
+ kernel_blksize_t st_blksize;
|
||||
+ kernel_blkcnt_t st_blocks;
|
||||
+ kernel_time_t st_atime_;
|
||||
+ unsigned long int st_atime_nsec_;
|
||||
+ kernel_time_t st_mtime_;
|
||||
+ unsigned long int st_mtime_nsec_;
|
||||
+ kernel_time_t st_ctime_;
|
||||
+ unsigned long int st_ctime_nsec_;
|
||||
+ unsigned long int __unused4;
|
||||
+ unsigned long int __unused5;
|
||||
+};
|
||||
#elif (defined(__mips__) && _MIPS_SIM != _MIPS_SIM_ABI64)
|
||||
typedef int kernel_blkcnt_t;
|
||||
typedef int kernel_blksize_t;
|
||||
@@ -1823,6 +1876,28 @@ struct kernel_statx {
|
||||
#ifndef __NR_getcpu
|
||||
#define __NR_getcpu 302
|
||||
#endif
|
||||
+
|
||||
+/* Linux commit 86250b9d12caa1a3dee12a7cf638b7dd70eaadb6 (2010) adds
|
||||
+ * direct socket system calls to PPC */
|
||||
+#ifndef __NR_socket
|
||||
+#define __NR_socket 326
|
||||
+#endif
|
||||
+#ifndef __NR_socketpair
|
||||
+#define __NR_socketpair 333
|
||||
+#endif
|
||||
+#ifndef __NR_sendto
|
||||
+#define __NR_sendto 335
|
||||
+#endif
|
||||
+#ifndef __NR_shutdown
|
||||
+#define __NR_shutdown 338
|
||||
+#endif
|
||||
+#ifndef __NR_sendmsg
|
||||
+#define __NR_sendmsg 341
|
||||
+#endif
|
||||
+#ifndef __NR_recvmsg
|
||||
+#define __NR_recvmsg 342
|
||||
+#endif
|
||||
+
|
||||
/* End of powerpc definitions */
|
||||
#elif defined(__s390__)
|
||||
#ifndef __NR_quotactl
|
||||
@@ -4824,7 +4899,7 @@ struct kernel_statx {
|
||||
LSS_INLINE _syscall6(void*, mmap, void*, addr, size_t, length, int, prot,
|
||||
int, flags, int, fd, int64_t, offset)
|
||||
#endif
|
||||
- #if defined(__PPC__)
|
||||
+ #if defined(__PPC__) && !defined(__powerpc64__)
|
||||
#undef LSS_SC_LOADARGS_0
|
||||
#define LSS_SC_LOADARGS_0(dummy...)
|
||||
#undef LSS_SC_LOADARGS_1
|
||||
@@ -5214,7 +5289,11 @@ struct kernel_statx {
|
||||
#endif
|
||||
|
||||
#if !defined(__NR_pipe)
|
||||
+#if defined(__powerpc64__)
|
||||
+ LSS_INLINE pid_t LSS_NAME(pipe)(int *pipefd) {
|
||||
+#else
|
||||
LSS_INLINE int LSS_NAME(pipe)(int *pipefd) {
|
||||
+#endif
|
||||
return LSS_NAME(pipe2)(pipefd, 0);
|
||||
}
|
||||
#endif
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
From cca78240860abb63bbcfe94d1e5f04a1f23c527d Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 19:11:56 -0500
|
||||
Subject: [PATCH 3/4] sandbox/linux/system_headers: Update linux seccomp header
|
||||
for ppc64
|
||||
|
||||
---
|
||||
sandbox/linux/system_headers/linux_seccomp.h | 10 ++++++++++
|
||||
1 file changed, 10 insertions(+)
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/system_headers/linux_seccomp.h
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/system_headers/linux_seccomp.h
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/system_headers/linux_seccomp.h
|
||||
@@ -38,6 +38,9 @@
|
||||
#ifndef EM_AARCH64
|
||||
#define EM_AARCH64 183
|
||||
#endif
|
||||
+#ifndef EM_PPC64
|
||||
+#define EM_PPC64 21
|
||||
+#endif
|
||||
|
||||
#ifndef __AUDIT_ARCH_64BIT
|
||||
#define __AUDIT_ARCH_64BIT 0x80000000
|
||||
@@ -70,6 +73,12 @@
|
||||
#ifndef AUDIT_ARCH_AARCH64
|
||||
#define AUDIT_ARCH_AARCH64 (EM_AARCH64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE)
|
||||
#endif
|
||||
+#ifndef AUDIT_ARCH_PPC64
|
||||
+#define AUDIT_ARCH_PPC64 (EM_PPC64 | __AUDIT_ARCH_64BIT)
|
||||
+#endif
|
||||
+#ifndef AUDIT_ARCH_PPC64LE
|
||||
+#define AUDIT_ARCH_PPC64LE (EM_PPC64 | __AUDIT_ARCH_64BIT | __AUDIT_ARCH_LE)
|
||||
+#endif
|
||||
|
||||
// For prctl.h
|
||||
#ifndef PR_SET_SECCOMP
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,23 @@
|
|||
From 298df3dc44f7121cd8cb9a06b29fa3b16c959b8d Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 19:13:25 -0500
|
||||
Subject: [PATCH 4/4] sandbox/linux/system_headers: Update linux signal header
|
||||
for ppc64
|
||||
|
||||
---
|
||||
sandbox/linux/system_headers/linux_signal.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/system_headers/linux_signal.h
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/system_headers/linux_signal.h
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/system_headers/linux_signal.h
|
||||
@@ -13,7 +13,7 @@
|
||||
// (not undefined, but defined different values and in different memory
|
||||
// layouts). So, fill the gap here.
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
|
||||
#define LINUX_SIGHUP 1
|
||||
#define LINUX_SIGINT 2
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
Index: chromium-128.0.6613.113/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
|
||||
+++ chromium-128.0.6613.113/third_party/crashpad/crashpad/util/net/http_transport_libcurl.cc
|
||||
@@ -239,6 +239,12 @@ std::string UserAgent() {
|
||||
#endif
|
||||
#elif defined (ARCH_CPU_RISCV64)
|
||||
static constexpr char arch[] = "riscv64";
|
||||
+#elif defined(__powerpc64__)
|
||||
+#if defined(ARCH_CPU_LITTLE_ENDIAN)
|
||||
+ static constexpr char arch[] = "ppc64";
|
||||
+#elif defined(ARCH_CPU_BIG_ENDIAN)
|
||||
+ static constexpr char arch[] = "ppc64_be";
|
||||
+#endif
|
||||
#else
|
||||
#error Port
|
||||
#endif
|
||||
|
|
@ -0,0 +1,376 @@
|
|||
Index: chromium-136.0.7103.48/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
|
||||
+++ chromium-136.0.7103.48/third_party/libvpx/source/libvpx/vp9/encoder/ppc/vp9_quantize_vsx.c
|
||||
@@ -38,6 +38,28 @@ static INLINE int16x8_t vec_max_across(i
|
||||
return vec_max(a, vec_perm(a, a, vec_perm16));
|
||||
}
|
||||
|
||||
+static INLINE void
|
||||
+vec_u64_store(vector unsigned long long vecu64, unsigned long offset, void *ptr)
|
||||
+{
|
||||
+#ifndef WORDS_BIGENDIAN
|
||||
+ __asm__ ("xxswapd %x0, %x1"
|
||||
+ : "=wa" (vecu64)
|
||||
+ : "wa" (vecu64));
|
||||
+#endif
|
||||
+#if __GNUC__ >= 4
|
||||
+ if (__builtin_constant_p (offset) && offset == 0)
|
||||
+ __asm__ ("stxvd2x %x0,0,%1\n\t"
|
||||
+ :
|
||||
+ : "wa" (vecu64), "r" ((uintptr_t)ptr)
|
||||
+ : "memory");
|
||||
+ else
|
||||
+#endif
|
||||
+ __asm__ ("stxvd2x %x0,%1,%2\n\t"
|
||||
+ :
|
||||
+ : "wa" (vecu64), "r" (offset), "r" ((uintptr_t)ptr)
|
||||
+ : "memory", "r0");
|
||||
+}
|
||||
+
|
||||
void vp9_quantize_fp_vsx(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
|
||||
const int16_t *round_ptr, const int16_t *quant_ptr,
|
||||
tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr,
|
||||
@@ -60,10 +82,10 @@ void vp9_quantize_fp_vsx(const tran_low_
|
||||
qcoeff0 = vec_mulhi(vec_vaddshs(vec_abs(coeff0), round), quant);
|
||||
zero_coeff0 = vec_cmpeq(qcoeff0, vec_zeros_s16);
|
||||
qcoeff0 = vec_sign(qcoeff0, coeff0);
|
||||
- vec_vsx_st(qcoeff0, 0, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff0, 0, qcoeff_ptr);
|
||||
|
||||
dqcoeff0 = vec_mladd(qcoeff0, dequant, vec_zeros_s16);
|
||||
- vec_vsx_st(dqcoeff0, 0, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff0, 0, dqcoeff_ptr);
|
||||
|
||||
// Remove DC value from round and quant
|
||||
round = vec_splat(round, 1);
|
||||
@@ -76,10 +98,10 @@ void vp9_quantize_fp_vsx(const tran_low_
|
||||
qcoeff1 = vec_mulhi(vec_vaddshs(vec_abs(coeff1), round), quant);
|
||||
zero_coeff1 = vec_cmpeq(qcoeff1, vec_zeros_s16);
|
||||
qcoeff1 = vec_sign(qcoeff1, coeff1);
|
||||
- vec_vsx_st(qcoeff1, 16, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff1, 16, qcoeff_ptr);
|
||||
|
||||
dqcoeff1 = vec_mladd(qcoeff1, dequant, vec_zeros_s16);
|
||||
- vec_vsx_st(dqcoeff1, 16, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff1, 16, dqcoeff_ptr);
|
||||
|
||||
eob = vec_max(vec_or(scan0, zero_coeff0), vec_or(scan1, zero_coeff1));
|
||||
|
||||
@@ -107,23 +129,23 @@ void vp9_quantize_fp_vsx(const tran_low_
|
||||
qcoeff0 = vec_mulhi(vec_vaddshs(vec_abs(coeff0), round), quant);
|
||||
zero_coeff0 = vec_cmpeq(qcoeff0, vec_zeros_s16);
|
||||
qcoeff0 = vec_sign(qcoeff0, coeff0);
|
||||
- vec_vsx_st(qcoeff0, off0, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff0, off0, qcoeff_ptr);
|
||||
dqcoeff0 = vec_mladd(qcoeff0, dequant, vec_zeros_s16);
|
||||
- vec_vsx_st(dqcoeff0, off0, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff0, off0, dqcoeff_ptr);
|
||||
|
||||
qcoeff1 = vec_mulhi(vec_vaddshs(vec_abs(coeff1), round), quant);
|
||||
zero_coeff1 = vec_cmpeq(qcoeff1, vec_zeros_s16);
|
||||
qcoeff1 = vec_sign(qcoeff1, coeff1);
|
||||
- vec_vsx_st(qcoeff1, off1, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff1, off1, qcoeff_ptr);
|
||||
dqcoeff1 = vec_mladd(qcoeff1, dequant, vec_zeros_s16);
|
||||
- vec_vsx_st(dqcoeff1, off1, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff1, off1, dqcoeff_ptr);
|
||||
|
||||
qcoeff2 = vec_mulhi(vec_vaddshs(vec_abs(coeff2), round), quant);
|
||||
zero_coeff2 = vec_cmpeq(qcoeff2, vec_zeros_s16);
|
||||
qcoeff2 = vec_sign(qcoeff2, coeff2);
|
||||
- vec_vsx_st(qcoeff2, off2, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff2, off2, qcoeff_ptr);
|
||||
dqcoeff2 = vec_mladd(qcoeff2, dequant, vec_zeros_s16);
|
||||
- vec_vsx_st(dqcoeff2, off2, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff2, off2, dqcoeff_ptr);
|
||||
|
||||
eob = vec_max(eob, vec_or(scan0, zero_coeff0));
|
||||
eob2 = vec_max(vec_or(scan1, zero_coeff1), vec_or(scan2, zero_coeff2));
|
||||
@@ -200,10 +222,10 @@ void vp9_quantize_fp_32x32_vsx(const tra
|
||||
qcoeff0 = vec_and(qcoeff0, mask0);
|
||||
zero_coeff0 = vec_cmpeq(qcoeff0, vec_zeros_s16);
|
||||
qcoeff0 = vec_sign(qcoeff0, coeff0);
|
||||
- vec_vsx_st(qcoeff0, 0, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff0, 0, qcoeff_ptr);
|
||||
|
||||
dqcoeff0 = dequantize_coeff_32(qcoeff0, dequant);
|
||||
- vec_vsx_st(dqcoeff0, 0, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff0, 0, dqcoeff_ptr);
|
||||
|
||||
// Remove DC value from thres, round, quant and dequant
|
||||
thres = vec_splat(thres, 1);
|
||||
@@ -219,10 +241,10 @@ void vp9_quantize_fp_32x32_vsx(const tra
|
||||
qcoeff1 = vec_and(qcoeff1, mask1);
|
||||
zero_coeff1 = vec_cmpeq(qcoeff1, vec_zeros_s16);
|
||||
qcoeff1 = vec_sign(qcoeff1, coeff1);
|
||||
- vec_vsx_st(qcoeff1, 16, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff1, 16, qcoeff_ptr);
|
||||
|
||||
dqcoeff1 = dequantize_coeff_32(qcoeff1, dequant);
|
||||
- vec_vsx_st(dqcoeff1, 16, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff1, 16, dqcoeff_ptr);
|
||||
|
||||
eob = vec_max(vec_or(scan0, zero_coeff0), vec_or(scan1, zero_coeff1));
|
||||
|
||||
@@ -260,17 +282,17 @@ void vp9_quantize_fp_32x32_vsx(const tra
|
||||
qcoeff1 = vec_sign(qcoeff1, coeff1);
|
||||
qcoeff2 = vec_sign(qcoeff2, coeff2);
|
||||
|
||||
- vec_vsx_st(qcoeff0, off0, qcoeff_ptr);
|
||||
- vec_vsx_st(qcoeff1, off1, qcoeff_ptr);
|
||||
- vec_vsx_st(qcoeff2, off2, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff0, off0, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff1, off1, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff2, off2, qcoeff_ptr);
|
||||
|
||||
dqcoeff0 = dequantize_coeff_32(qcoeff0, dequant);
|
||||
dqcoeff1 = dequantize_coeff_32(qcoeff1, dequant);
|
||||
dqcoeff2 = dequantize_coeff_32(qcoeff2, dequant);
|
||||
|
||||
- vec_vsx_st(dqcoeff0, off0, dqcoeff_ptr);
|
||||
- vec_vsx_st(dqcoeff1, off1, dqcoeff_ptr);
|
||||
- vec_vsx_st(dqcoeff2, off2, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff0, off0, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff1, off1, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff2, off2, dqcoeff_ptr);
|
||||
|
||||
eob = vec_max(eob, vec_or(scan0, zero_coeff0));
|
||||
eob2 = vec_max(vec_or(scan1, zero_coeff1), vec_or(scan2, zero_coeff2));
|
||||
Index: chromium-136.0.7103.48/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
|
||||
+++ chromium-136.0.7103.48/third_party/libvpx/source/libvpx/vpx_dsp/ppc/fdct32x32_vsx.c
|
||||
@@ -15,6 +15,28 @@
|
||||
#include "vpx_dsp/ppc/txfm_common_vsx.h"
|
||||
#include "vpx_dsp/ppc/types_vsx.h"
|
||||
|
||||
+static INLINE void
|
||||
+vec_u64_store(vector unsigned long long vecu64, unsigned long offset, void *ptr)
|
||||
+{
|
||||
+#ifndef WORDS_BIGENDIAN
|
||||
+ __asm__ ("xxswapd %x0, %x1"
|
||||
+ : "=wa" (vecu64)
|
||||
+ : "wa" (vecu64));
|
||||
+#endif
|
||||
+#if __GNUC__ >= 4
|
||||
+ if (__builtin_constant_p (offset) && offset == 0)
|
||||
+ __asm__ ("stxvd2x %x0,0,%1\n\t"
|
||||
+ :
|
||||
+ : "wa" (vecu64), "r" ((uintptr_t)ptr)
|
||||
+ : "memory");
|
||||
+ else
|
||||
+#endif
|
||||
+ __asm__ ("stxvd2x %x0,%1,%2\n\t"
|
||||
+ :
|
||||
+ : "wa" (vecu64), "r" (offset), "r" ((uintptr_t)ptr)
|
||||
+ : "memory", "r0");
|
||||
+}
|
||||
+
|
||||
// Returns ((a +/- b) * cospi16 + (2 << 13)) >> 14.
|
||||
static INLINE void single_butterfly(int16x8_t a, int16x8_t b, int16x8_t *add,
|
||||
int16x8_t *sub) {
|
||||
@@ -164,45 +186,45 @@ static INLINE void load(const int16_t *a
|
||||
}
|
||||
|
||||
static INLINE void store(tran_low_t *a, const int16x8_t *b) {
|
||||
- vec_vsx_st(b[0], 0, a);
|
||||
- vec_vsx_st(b[8], 0, a + 8);
|
||||
- vec_vsx_st(b[16], 0, a + 16);
|
||||
- vec_vsx_st(b[24], 0, a + 24);
|
||||
-
|
||||
- vec_vsx_st(b[1], 0, a + 32);
|
||||
- vec_vsx_st(b[9], 0, a + 40);
|
||||
- vec_vsx_st(b[17], 0, a + 48);
|
||||
- vec_vsx_st(b[25], 0, a + 56);
|
||||
-
|
||||
- vec_vsx_st(b[2], 0, a + 64);
|
||||
- vec_vsx_st(b[10], 0, a + 72);
|
||||
- vec_vsx_st(b[18], 0, a + 80);
|
||||
- vec_vsx_st(b[26], 0, a + 88);
|
||||
-
|
||||
- vec_vsx_st(b[3], 0, a + 96);
|
||||
- vec_vsx_st(b[11], 0, a + 104);
|
||||
- vec_vsx_st(b[19], 0, a + 112);
|
||||
- vec_vsx_st(b[27], 0, a + 120);
|
||||
-
|
||||
- vec_vsx_st(b[4], 0, a + 128);
|
||||
- vec_vsx_st(b[12], 0, a + 136);
|
||||
- vec_vsx_st(b[20], 0, a + 144);
|
||||
- vec_vsx_st(b[28], 0, a + 152);
|
||||
-
|
||||
- vec_vsx_st(b[5], 0, a + 160);
|
||||
- vec_vsx_st(b[13], 0, a + 168);
|
||||
- vec_vsx_st(b[21], 0, a + 176);
|
||||
- vec_vsx_st(b[29], 0, a + 184);
|
||||
-
|
||||
- vec_vsx_st(b[6], 0, a + 192);
|
||||
- vec_vsx_st(b[14], 0, a + 200);
|
||||
- vec_vsx_st(b[22], 0, a + 208);
|
||||
- vec_vsx_st(b[30], 0, a + 216);
|
||||
-
|
||||
- vec_vsx_st(b[7], 0, a + 224);
|
||||
- vec_vsx_st(b[15], 0, a + 232);
|
||||
- vec_vsx_st(b[23], 0, a + 240);
|
||||
- vec_vsx_st(b[31], 0, a + 248);
|
||||
+ vec_u64_store(b[0], 0, a);
|
||||
+ vec_u64_store(b[8], 0, a + 8);
|
||||
+ vec_u64_store(b[16], 0, a + 16);
|
||||
+ vec_u64_store(b[24], 0, a + 24);
|
||||
+
|
||||
+ vec_u64_store(b[1], 0, a + 32);
|
||||
+ vec_u64_store(b[9], 0, a + 40);
|
||||
+ vec_u64_store(b[17], 0, a + 48);
|
||||
+ vec_u64_store(b[25], 0, a + 56);
|
||||
+
|
||||
+ vec_u64_store(b[2], 0, a + 64);
|
||||
+ vec_u64_store(b[10], 0, a + 72);
|
||||
+ vec_u64_store(b[18], 0, a + 80);
|
||||
+ vec_u64_store(b[26], 0, a + 88);
|
||||
+
|
||||
+ vec_u64_store(b[3], 0, a + 96);
|
||||
+ vec_u64_store(b[11], 0, a + 104);
|
||||
+ vec_u64_store(b[19], 0, a + 112);
|
||||
+ vec_u64_store(b[27], 0, a + 120);
|
||||
+
|
||||
+ vec_u64_store(b[4], 0, a + 128);
|
||||
+ vec_u64_store(b[12], 0, a + 136);
|
||||
+ vec_u64_store(b[20], 0, a + 144);
|
||||
+ vec_u64_store(b[28], 0, a + 152);
|
||||
+
|
||||
+ vec_u64_store(b[5], 0, a + 160);
|
||||
+ vec_u64_store(b[13], 0, a + 168);
|
||||
+ vec_u64_store(b[21], 0, a + 176);
|
||||
+ vec_u64_store(b[29], 0, a + 184);
|
||||
+
|
||||
+ vec_u64_store(b[6], 0, a + 192);
|
||||
+ vec_u64_store(b[14], 0, a + 200);
|
||||
+ vec_u64_store(b[22], 0, a + 208);
|
||||
+ vec_u64_store(b[30], 0, a + 216);
|
||||
+
|
||||
+ vec_u64_store(b[7], 0, a + 224);
|
||||
+ vec_u64_store(b[15], 0, a + 232);
|
||||
+ vec_u64_store(b[23], 0, a + 240);
|
||||
+ vec_u64_store(b[31], 0, a + 248);
|
||||
}
|
||||
|
||||
// Returns 1 if negative 0 if positive
|
||||
Index: chromium-136.0.7103.48/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
|
||||
+++ chromium-136.0.7103.48/third_party/libvpx/source/libvpx/vpx_dsp/ppc/quantize_vsx.c
|
||||
@@ -13,6 +13,28 @@
|
||||
#include "./vpx_dsp_rtcd.h"
|
||||
#include "vpx_dsp/ppc/types_vsx.h"
|
||||
|
||||
+static INLINE void
|
||||
+vec_u64_store(vector unsigned long long vecu64, unsigned long offset, void *ptr)
|
||||
+{
|
||||
+#ifndef WORDS_BIGENDIAN
|
||||
+ __asm__ ("xxswapd %x0, %x1"
|
||||
+ : "=wa" (vecu64)
|
||||
+ : "wa" (vecu64));
|
||||
+#endif
|
||||
+#if __GNUC__ >= 4
|
||||
+ if (__builtin_constant_p (offset) && offset == 0)
|
||||
+ __asm__ ("stxvd2x %x0,0,%1\n\t"
|
||||
+ :
|
||||
+ : "wa" (vecu64), "r" ((uintptr_t)ptr)
|
||||
+ : "memory");
|
||||
+ else
|
||||
+#endif
|
||||
+ __asm__ ("stxvd2x %x0,%1,%2\n\t"
|
||||
+ :
|
||||
+ : "wa" (vecu64), "r" (offset), "r" ((uintptr_t)ptr)
|
||||
+ : "memory", "r0");
|
||||
+}
|
||||
+
|
||||
// Negate 16-bit integers in a when the corresponding signed 16-bit
|
||||
// integer in b is negative.
|
||||
static INLINE int16x8_t vec_sign(int16x8_t a, int16x8_t b) {
|
||||
@@ -124,19 +146,19 @@ void vpx_quantize_b_vsx(const tran_low_t
|
||||
|
||||
qcoeff0 =
|
||||
quantize_coeff(coeff0, coeff0_abs, round, quant, quant_shift, zero_mask0);
|
||||
- vec_vsx_st(qcoeff0, 0, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff0, 0, qcoeff_ptr);
|
||||
round = vec_splat(round, 1);
|
||||
quant = vec_splat(quant, 1);
|
||||
quant_shift = vec_splat(quant_shift, 1);
|
||||
qcoeff1 =
|
||||
quantize_coeff(coeff1, coeff1_abs, round, quant, quant_shift, zero_mask1);
|
||||
- vec_vsx_st(qcoeff1, 16, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff1, 16, qcoeff_ptr);
|
||||
|
||||
dqcoeff0 = vec_mladd(qcoeff0, dequant, vec_zeros_s16);
|
||||
- vec_vsx_st(dqcoeff0, 0, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff0, 0, dqcoeff_ptr);
|
||||
dequant = vec_splat(dequant, 1);
|
||||
dqcoeff1 = vec_mladd(qcoeff1, dequant, vec_zeros_s16);
|
||||
- vec_vsx_st(dqcoeff1, 16, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff1, 16, dqcoeff_ptr);
|
||||
|
||||
eob = vec_max(nonzero_scanindex(qcoeff0, iscan_ptr, 0),
|
||||
nonzero_scanindex(qcoeff1, iscan_ptr, 16));
|
||||
@@ -164,17 +186,17 @@ void vpx_quantize_b_vsx(const tran_low_t
|
||||
zero_mask1);
|
||||
qcoeff2 = quantize_coeff(coeff2, coeff2_abs, round, quant, quant_shift,
|
||||
zero_mask2);
|
||||
- vec_vsx_st(qcoeff0, off0, qcoeff_ptr);
|
||||
- vec_vsx_st(qcoeff1, off1, qcoeff_ptr);
|
||||
- vec_vsx_st(qcoeff2, off2, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff0, off0, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff1, off1, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff2, off2, qcoeff_ptr);
|
||||
|
||||
dqcoeff0 = vec_mladd(qcoeff0, dequant, vec_zeros_s16);
|
||||
dqcoeff1 = vec_mladd(qcoeff1, dequant, vec_zeros_s16);
|
||||
dqcoeff2 = vec_mladd(qcoeff2, dequant, vec_zeros_s16);
|
||||
|
||||
- vec_vsx_st(dqcoeff0, off0, dqcoeff_ptr);
|
||||
- vec_vsx_st(dqcoeff1, off1, dqcoeff_ptr);
|
||||
- vec_vsx_st(dqcoeff2, off2, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff0, off0, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff1, off1, dqcoeff_ptr);
|
||||
+ vec_u64_store(dqcoeff2, off2, dqcoeff_ptr);
|
||||
|
||||
eob = vec_max(eob, nonzero_scanindex(qcoeff0, iscan_ptr, off0));
|
||||
eob2 = vec_max(nonzero_scanindex(qcoeff1, iscan_ptr, off1),
|
||||
@@ -243,12 +265,12 @@ void vpx_quantize_b_32x32_vsx(const tran
|
||||
qcoeff1 = quantize_coeff_32(coeff1, coeff1_abs, round, quant, quant_shift,
|
||||
zero_mask1);
|
||||
|
||||
- vec_vsx_st(qcoeff0, 0, qcoeff_ptr);
|
||||
- vec_vsx_st(qcoeff1, 16, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff0, 0, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff1, 16, qcoeff_ptr);
|
||||
|
||||
- vec_vsx_st(dequantize_coeff_32(qcoeff0, dequant), 0, dqcoeff_ptr);
|
||||
+ vec_u64_store(dequantize_coeff_32(qcoeff0, dequant), 0, dqcoeff_ptr);
|
||||
dequant = vec_splat(dequant, 1); // remove DC from dequant
|
||||
- vec_vsx_st(dequantize_coeff_32(qcoeff1, dequant), 16, dqcoeff_ptr);
|
||||
+ vec_u64_store(dequantize_coeff_32(qcoeff1, dequant), 16, dqcoeff_ptr);
|
||||
|
||||
eob = vec_max(nonzero_scanindex(qcoeff0, iscan_ptr, 0),
|
||||
nonzero_scanindex(qcoeff1, iscan_ptr, 16));
|
||||
@@ -276,13 +298,13 @@ void vpx_quantize_b_32x32_vsx(const tran
|
||||
qcoeff2 = quantize_coeff_32(coeff2, coeff2_abs, round, quant, quant_shift,
|
||||
zero_mask2);
|
||||
|
||||
- vec_vsx_st(qcoeff0, off0, qcoeff_ptr);
|
||||
- vec_vsx_st(qcoeff1, off1, qcoeff_ptr);
|
||||
- vec_vsx_st(qcoeff2, off2, qcoeff_ptr);
|
||||
-
|
||||
- vec_vsx_st(dequantize_coeff_32(qcoeff0, dequant), off0, dqcoeff_ptr);
|
||||
- vec_vsx_st(dequantize_coeff_32(qcoeff1, dequant), off1, dqcoeff_ptr);
|
||||
- vec_vsx_st(dequantize_coeff_32(qcoeff2, dequant), off2, dqcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff0, off0, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff1, off1, qcoeff_ptr);
|
||||
+ vec_u64_store(qcoeff2, off2, qcoeff_ptr);
|
||||
+
|
||||
+ vec_u64_store(dequantize_coeff_32(qcoeff0, dequant), off0, dqcoeff_ptr);
|
||||
+ vec_u64_store(dequantize_coeff_32(qcoeff1, dequant), off1, dqcoeff_ptr);
|
||||
+ vec_u64_store(dequantize_coeff_32(qcoeff2, dequant), off2, dqcoeff_ptr);
|
||||
|
||||
eob = vec_max(eob, nonzero_scanindex(qcoeff0, iscan_ptr, off0));
|
||||
eob2 = vec_max(nonzero_scanindex(qcoeff1, iscan_ptr, off1),
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
From 1d44643a7c7cf650efd1093d22cd5bf859fdcb51 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 9 Aug 2018 20:52:13 -0500
|
||||
Subject: [PATCH] sandbox/linux/seccomp-bpf: Add ppc64 syscall stub
|
||||
|
||||
---
|
||||
sandbox/linux/seccomp-bpf/syscall.cc | 53 ++++++++++++++++++++++++++--
|
||||
1 file changed, 51 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/seccomp-bpf/syscall.cc
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/seccomp-bpf/syscall.cc
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/seccomp-bpf/syscall.cc
|
||||
@@ -23,7 +23,7 @@ namespace sandbox {
|
||||
namespace {
|
||||
|
||||
#if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
|
||||
- defined(ARCH_CPU_MIPS_FAMILY)
|
||||
+ defined(ARCH_CPU_MIPS_FAMILY) || defined (ARCH_CPU_PPC64_FAMILY)
|
||||
// Number that's not currently used by any Linux kernel ABIs.
|
||||
const int kInvalidSyscallNumber = 0x351d3;
|
||||
#else
|
||||
@@ -313,10 +313,54 @@ asm(// We need to be able to tell the ke
|
||||
"2:ret\n"
|
||||
".cfi_endproc\n"
|
||||
".size SyscallAsm, .-SyscallAsm\n"
|
||||
+#elif defined(__powerpc64__)
|
||||
+ ".text\n"
|
||||
+ ".align 4\n"
|
||||
+ ".type SyscallAsm @function\n"
|
||||
+ "SyscallAsm:\n"
|
||||
+ ".cfi_startproc\n"
|
||||
+
|
||||
+ // Check if r3 is negative
|
||||
+ "cmpdi 3, 0\n"
|
||||
+ "bgt 2f\n"
|
||||
+
|
||||
+ // Load address of 3f into r3 and return
|
||||
+ "mflr 10\n"
|
||||
+ "bl 1f\n"
|
||||
+ "1: mflr 3\n"
|
||||
+ "mtlr 10\n"
|
||||
+ "addi 3, 3, 4*13\n"
|
||||
+ "blr\n"
|
||||
+
|
||||
+ // Load arguments from array into r3-8
|
||||
+ // save param 3 in r10
|
||||
+ "2:\n"
|
||||
+ "mr 0, 3\n"
|
||||
+ "ld 3, 0(4)\n"
|
||||
+ "ld 5, 16(4)\n"
|
||||
+ "ld 6, 24(4)\n"
|
||||
+ "ld 7, 32(4)\n"
|
||||
+ "ld 8, 40(4)\n"
|
||||
+ "ld 4, 8(4)\n"
|
||||
+ "li 9, 0\n"
|
||||
+
|
||||
+ // Enter kernel
|
||||
+ "sc\n"
|
||||
+
|
||||
+ // Magic return address
|
||||
+ "3:\n"
|
||||
+ // Like MIPS, ppc64 return values are always positive.
|
||||
+ // Check for error in cr0.SO and negate upon error
|
||||
+ "bc 4, 3, 4f\n"
|
||||
+ "neg 3, 3\n"
|
||||
+ "4: blr\n"
|
||||
+
|
||||
+ ".cfi_endproc\n"
|
||||
+ ".size SyscallAsm, .-SyscallAsm\n"
|
||||
#endif
|
||||
); // asm
|
||||
|
||||
-#if defined(__x86_64__)
|
||||
+#if defined(__x86_64__) || defined(__powerpc64__)
|
||||
extern "C" {
|
||||
intptr_t SyscallAsm(intptr_t nr, const intptr_t args[6]);
|
||||
}
|
||||
@@ -430,6 +474,8 @@ intptr_t Syscall::Call(int nr,
|
||||
ret = inout;
|
||||
}
|
||||
|
||||
+#elif defined(__powerpc64__)
|
||||
+ intptr_t ret = SyscallAsm(nr, args);
|
||||
#else
|
||||
#error "Unimplemented architecture"
|
||||
#endif
|
||||
@@ -446,8 +492,18 @@ void Syscall::PutValueInUcontext(intptr_
|
||||
// needs to be changed back.
|
||||
ret_val = -ret_val;
|
||||
SECCOMP_PARM4(ctx) = 1;
|
||||
- } else
|
||||
+ } else {
|
||||
SECCOMP_PARM4(ctx) = 0;
|
||||
+ }
|
||||
+#endif
|
||||
+#if defined(__powerpc64__)
|
||||
+ // 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);
|
||||
+ } else {
|
||||
+ ctx->uc_mcontext.regs->ccr &= ~(1 << 28);
|
||||
+ }
|
||||
#endif
|
||||
SECCOMP_RESULT(ctx) = static_cast<greg_t>(ret_val);
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
From 6a852c4135864ba87b3cbdd0880d7cfecf7cd654 Mon Sep 17 00:00:00 2001
|
||||
From: Shawn Anastasio <shawnanastasio@yahoo.com>
|
||||
Date: Thu, 13 Sep 2018 15:12:22 -0500
|
||||
Subject: [PATCH 5/6] sandbox/linux: update unit test for ppc64
|
||||
|
||||
---
|
||||
sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: chromium-128.0.6613.113/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
|
||||
@@ -350,8 +350,10 @@ TEST_BASELINE_SIGSYS(__NR_timer_create)
|
||||
|
||||
#if !defined(__aarch64__)
|
||||
TEST_BASELINE_SIGSYS(__NR_inotify_init)
|
||||
+#if !defined(__powerpc64__)
|
||||
TEST_BASELINE_SIGSYS(__NR_vserver)
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if defined(LIBC_GLIBC) && !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
BPF_TEST_C(BaselinePolicy, FutexEINVAL, BaselinePolicy) {
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
Index: chromium-128.0.6613.113/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
@@ -374,7 +374,9 @@ bool SyscallSets::IsAllowedSignalHandlin
|
||||
#if defined(__i386__) || defined(__arm__) || \
|
||||
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS)) || \
|
||||
defined(__powerpc64__)
|
||||
+#if !defined(__powerpc64__)
|
||||
case __NR_rt_sigtimedwait_time64:
|
||||
+#endif
|
||||
case __NR_sigaction:
|
||||
case __NR_sigprocmask:
|
||||
case __NR_sigreturn:
|
||||
33
chromium-lts/0007-sandbox-linux-add-ppc64-stat.patch
Normal file
33
chromium-lts/0007-sandbox-linux-add-ppc64-stat.patch
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
Index: chromium-128.0.6613.113/sandbox/linux/system_headers/linux_stat.h
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/sandbox/linux/system_headers/linux_stat.h
|
||||
+++ chromium-128.0.6613.113/sandbox/linux/system_headers/linux_stat.h
|
||||
@@ -173,6 +173,28 @@ struct kernel_stat {
|
||||
unsigned int __unused4;
|
||||
unsigned int __unused5;
|
||||
};
|
||||
+#elif defined(__powerpc64__)
|
||||
+struct kernel_stat {
|
||||
+ unsigned long st_dev;
|
||||
+ ino_t st_ino;
|
||||
+ unsigned long st_nlink;
|
||||
+ mode_t st_mode;
|
||||
+ uid_t st_uid;
|
||||
+ gid_t 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
|
||||
|
||||
#if !defined(AT_EMPTY_PATH)
|
||||
74
chromium-lts/0008-sandbox-fix-ppc64le-glibc234.patch
Normal file
74
chromium-lts/0008-sandbox-fix-ppc64le-glibc234.patch
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
Index: chromium-137.0.7151.40/sandbox/policy/linux/bpf_utility_policy_linux.cc
|
||||
===================================================================
|
||||
--- chromium-137.0.7151.40.orig/sandbox/policy/linux/bpf_utility_policy_linux.cc
|
||||
+++ chromium-137.0.7151.40/sandbox/policy/linux/bpf_utility_policy_linux.cc
|
||||
@@ -34,7 +34,7 @@ ResultExpr UtilityProcessPolicy::Evaluat
|
||||
case __NR_fdatasync:
|
||||
case __NR_fsync:
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_getrlimit:
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__arm__)
|
||||
Index: chromium-137.0.7151.40/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
===================================================================
|
||||
--- chromium-137.0.7151.40.orig/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
+++ chromium-137.0.7151.40/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
@@ -90,7 +90,7 @@ ResultExpr RendererProcessPolicy::Evalua
|
||||
case __NR_ftruncate64:
|
||||
#endif
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__) || \
|
||||
- defined(__aarch64__)
|
||||
+ defined(__aarch64__) || defined(__powerpc64__)
|
||||
case __NR_getrlimit:
|
||||
case __NR_setrlimit:
|
||||
// We allow setrlimit to dynamically adjust the address space limit as
|
||||
Index: chromium-137.0.7151.40/sandbox/linux/services/credentials.cc
|
||||
===================================================================
|
||||
--- chromium-137.0.7151.40.orig/sandbox/linux/services/credentials.cc
|
||||
+++ chromium-137.0.7151.40/sandbox/linux/services/credentials.cc
|
||||
@@ -99,7 +99,8 @@ bool ChrootToSafeEmptyDir() {
|
||||
|
||||
int clone_flags = CLONE_FS | LINUX_SIGCHLD;
|
||||
void* tls = nullptr;
|
||||
-#if (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY)) && \
|
||||
+#if (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY) || \
|
||||
+ defined(ARCH_CPU_PPC64_FAMILY)) && \
|
||||
!defined(MEMORY_SANITIZER)
|
||||
// Use CLONE_VM | CLONE_VFORK as an optimization to avoid copying page tables.
|
||||
// Since clone writes to the new child's TLS before returning, we must set a
|
||||
@@ -107,6 +108,11 @@ bool ChrootToSafeEmptyDir() {
|
||||
// glibc performs syscalls by calling a function pointer in TLS, so we do not
|
||||
// attempt this optimization.
|
||||
// TODO(crbug.com/40196869) Broken in MSan builds after LLVM f1bb30a4956f.
|
||||
+ //
|
||||
+ // NOTE: Without CLONE_VM, fontconfig will attempt to reload configuration
|
||||
+ // in every thread. Since the rendered threads are sandboxed without
|
||||
+ // filesystem access (e.g. to /etc/fonts/fonts.conf) this will cause font
|
||||
+ // configuration loading failures and no fonts will be displayed!
|
||||
clone_flags |= CLONE_VM | CLONE_VFORK | CLONE_SETTLS;
|
||||
|
||||
char tls_buf[PTHREAD_STACK_MIN_CONST] = {};
|
||||
Index: chromium-137.0.7151.40/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
|
||||
===================================================================
|
||||
--- chromium-137.0.7151.40.orig/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
|
||||
+++ chromium-137.0.7151.40/sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.cc
|
||||
@@ -362,7 +362,16 @@ intptr_t SIGSYSFstatatHandler(const stru
|
||||
if (args.nr == __NR_fstatat_default) {
|
||||
if (*reinterpret_cast<const char*>(args.args[1]) == '\0' &&
|
||||
args.args[3] == static_cast<uint64_t>(AT_EMPTY_PATH)) {
|
||||
- return syscall(__NR_fstat_default, static_cast<int>(args.args[0]),
|
||||
+ int fd = static_cast<int>(args.args[0]);
|
||||
+#if defined(__powerpc64__)
|
||||
+ // On ppc64+glibc, some syscalls seem to accidentally negate the first
|
||||
+ // parameter which causes checks against it to fail. For now, manually
|
||||
+ // negate them back.
|
||||
+ // TODO: Investigate the root cause and fix in glibc
|
||||
+ if (fd < 0)
|
||||
+ fd = -fd;
|
||||
+#endif
|
||||
+ return syscall(__NR_fstat_default, fd,
|
||||
reinterpret_cast<default_stat_struct*>(args.args[2]));
|
||||
}
|
||||
return -reinterpret_cast<intptr_t>(fs_denied_errno);
|
||||
24
chromium-lts/HACK-debian-clang-disable-base-musttail.patch
Normal file
24
chromium-lts/HACK-debian-clang-disable-base-musttail.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
diff -up chromium-131.0.6778.69/base/compiler_specific.h.me chromium-131.0.6778.69/base/compiler_specific.h
|
||||
--- chromium-131.0.6778.69/base/compiler_specific.h.me 2024-11-19 20:44:12.404060581 +0100
|
||||
+++ chromium-131.0.6778.69/base/compiler_specific.h 2024-11-19 20:44:54.434121935 +0100
|
||||
@@ -152,7 +152,7 @@
|
||||
// MUSTTAIL return Func1(d + 1); // `Func1()` will be tail-called.
|
||||
// }
|
||||
// ```
|
||||
-#if __has_cpp_attribute(clang::musttail)
|
||||
+#if __has_cpp_attribute(clang::musttail) && !defined(__powerpc64__)
|
||||
#define MUSTTAIL [[clang::musttail]]
|
||||
#else
|
||||
#define MUSTTAIL
|
||||
diff -up chromium-131.0.6778.85/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h.me chromium-131.0.6778.85/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h
|
||||
--- chromium-131.0.6778.85/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h.me 2024-11-20 18:50:28.690761262 +0100
|
||||
+++ chromium-131.0.6778.85/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h 2024-11-20 18:54:49.374711202 +0100
|
||||
@@ -138,7 +138,7 @@
|
||||
// PA_MUSTTAIL return Func1(d + 1); // `Func1()` will be tail-called.
|
||||
// }
|
||||
// ```
|
||||
-#if PA_HAS_CPP_ATTRIBUTE(clang::musttail)
|
||||
+#if PA_HAS_CPP_ATTRIBUTE(clang::musttail) && !defined(__powerpc64__)
|
||||
#define PA_MUSTTAIL [[clang::musttail]]
|
||||
#else
|
||||
#define PA_MUSTTAIL
|
||||
13
chromium-lts/HACK-debian-clang-disable-skia-musttail.patch
Normal file
13
chromium-lts/HACK-debian-clang-disable-skia-musttail.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Index: chromium-130.0.6723.44/third_party/skia/src/core/SkRasterPipeline.h
|
||||
===================================================================
|
||||
--- chromium-130.0.6723.44.orig/third_party/skia/src/core/SkRasterPipeline.h
|
||||
+++ chromium-130.0.6723.44/third_party/skia/src/core/SkRasterPipeline.h
|
||||
@@ -27,7 +27,7 @@ struct SkImageInfo;
|
||||
struct skcms_TransferFunction;
|
||||
|
||||
#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && \
|
||||
- !defined(SK_CPU_LOONGARCH) && !(defined(_WIN32) && defined(SK_BUILD_FOR_ANDROID_FRAMEWORK))
|
||||
+ !defined(SK_CPU_LOONGARCH) && !(defined(_WIN32) && defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)) && !defined(__powerpc64__)
|
||||
// [[clang::musttail]] is disabled for the Android version of Skia running on Windows as it
|
||||
// causes crashes (This is probably related to http://crbug.com/1505442).
|
||||
#define SK_HAS_MUSTTAIL 1
|
||||
48
chromium-lts/HACK-third_party-libvpx-use-generic-gnu.patch
Normal file
48
chromium-lts/HACK-third_party-libvpx-use-generic-gnu.patch
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
Index: chromium-136.0.7103.48/third_party/libvpx/generate_gni.sh
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/libvpx/generate_gni.sh
|
||||
+++ chromium-136.0.7103.48/third_party/libvpx/generate_gni.sh
|
||||
@@ -433,7 +433,7 @@ gen_config_files linux/mipsel "--target=
|
||||
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 $HIGHBD ${all_platforms}"
|
||||
gen_config_files linux/generic "--target=generic-gnu $HIGHBD ${all_platforms}"
|
||||
gen_config_files win/arm64-highbd \
|
||||
"--target=arm64-win64-vs15 ${all_platforms} ${HIGHBD} ${disable_sve}"
|
||||
Index: chromium-136.0.7103.48/third_party/libvpx/source/libvpx/build/make/rtcd.pl
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/libvpx/source/libvpx/build/make/rtcd.pl
|
||||
+++ chromium-136.0.7103.48/third_party/libvpx/source/libvpx/build/make/rtcd.pl
|
||||
@@ -527,8 +527,9 @@ if ($opts{arch} eq 'x86') {
|
||||
}
|
||||
arm;
|
||||
} elsif ($opts{arch} =~ /^ppc/ ) {
|
||||
- @ALL_ARCHS = filter(qw/vsx/);
|
||||
- ppc;
|
||||
+ #@ALL_ARCHS = filter(qw/vsx/);
|
||||
+ #ppc;
|
||||
+ unoptimized;
|
||||
} elsif ($opts{arch} =~ /loongarch/ ) {
|
||||
@ALL_ARCHS = filter(qw/lsx lasx/);
|
||||
loongarch;
|
||||
Index: chromium-136.0.7103.48/third_party/libvpx/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-136.0.7103.48.orig/third_party/libvpx/BUILD.gn
|
||||
+++ chromium-136.0.7103.48/third_party/libvpx/BUILD.gn
|
||||
@@ -102,6 +102,14 @@ config("libvpx_config") {
|
||||
"-Wno-sign-compare",
|
||||
]
|
||||
}
|
||||
+
|
||||
+ if (current_cpu == "ppc64") {
|
||||
+ cflags += [
|
||||
+ "-mcpu=power8",
|
||||
+ "-maltivec",
|
||||
+ "-mvsx",
|
||||
+ ]
|
||||
+ }
|
||||
}
|
||||
|
||||
# This config is applied to targets that depend on libvpx.
|
||||
9
chromium-lts/README.fedora
Normal file
9
chromium-lts/README.fedora
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
- Widevine is not a free library and cannot be shipped in fedora.
|
||||
You have to get it from Google first and install it under
|
||||
/usr/lib64/chromium-browser or /opt/google/chrome if you want
|
||||
Chromium to use widevine.
|
||||
|
||||
- Chromium uses the system ffmpeg-free library which is included in
|
||||
fedora >= 36 and centos-stream 9. This library contains free video
|
||||
codecs. If you want Chromium to use non-free video codecs, you need
|
||||
to install libavcodec-freeworld from rpmfusion-free.
|
||||
23
chromium-lts/Rtc_base-system-arch.h-PPC.patch
Normal file
23
chromium-lts/Rtc_base-system-arch.h-PPC.patch
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
Index: chromium-128.0.6613.113/third_party/webrtc/rtc_base/system/arch.h
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/webrtc/rtc_base/system/arch.h
|
||||
+++ chromium-128.0.6613.113/third_party/webrtc/rtc_base/system/arch.h
|
||||
@@ -46,6 +46,18 @@
|
||||
#endif
|
||||
#if defined(__MIPSEL__)
|
||||
#define WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+#elif defined(__PPC__)
|
||||
+#define WEBRTC_ARCH_PPC_FAMILY
|
||||
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
||||
+#define WEBRTC_ARCH_LITTLE_ENDIAN
|
||||
+#else
|
||||
+#define WEBRTC_ARCH_BIG_ENDIAN
|
||||
+#endif
|
||||
+#if defined(__LP64__)
|
||||
+#define WEBRTC_ARCH_64_BITS
|
||||
+#else
|
||||
+#define WEBRTC_ARCH_32_BITS
|
||||
+#endif
|
||||
#else
|
||||
#define WEBRTC_ARCH_BIG_ENDIAN
|
||||
#endif
|
||||
11
chromium-lts/Sandbox-linux-services-credentials.cc-PPC.patch
Normal file
11
chromium-lts/Sandbox-linux-services-credentials.cc-PPC.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- a/sandbox/linux/services/credentials.cc
|
||||
+++ b/sandbox/linux/services/credentials.cc
|
||||
@@ -91,7 +91,7 @@ bool ChrootToSafeEmptyDir() {
|
||||
alignas(16) char stack_buf[PTHREAD_STACK_MIN];
|
||||
|
||||
#if defined(ARCH_CPU_X86_FAMILY) || defined(ARCH_CPU_ARM_FAMILY) || \
|
||||
- defined(ARCH_CPU_MIPS_FAMILY)
|
||||
+ defined(ARCH_CPU_MIPS_FAMILY) || defined(ARCH_CPU_PPC64_FAMILY)
|
||||
// The stack grows downward.
|
||||
void* stack = stack_buf + sizeof(stack_buf);
|
||||
#else
|
||||
11
chromium-lts/add-ppc64-architecture-string.patch
Normal file
11
chromium-lts/add-ppc64-architecture-string.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- a/base/system/sys_info.cc
|
||||
+++ b/base/system/sys_info.cc
|
||||
@@ -255,6 +255,8 @@
|
||||
return "ARM";
|
||||
#elif defined(ARCH_CPU_ARM64)
|
||||
return "ARM_64";
|
||||
+#elif defined(ARCH_CPU_PPC64)
|
||||
+ return "PPC_64";
|
||||
#elif defined(ARCH_CPU_RISCV64)
|
||||
return "RISCV_64";
|
||||
#else
|
||||
46
chromium-lts/add-ppc64-architecture-to-extensions.diff
Normal file
46
chromium-lts/add-ppc64-architecture-to-extensions.diff
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
Index: chromium-128.0.6613.113/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
|
||||
+++ chromium-128.0.6613.113/chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
|
||||
@@ -303,6 +303,8 @@ bool ChromeRuntimeAPIDelegate::GetPlatfo
|
||||
info->arch = extensions::api::runtime::PlatformArch::kMips;
|
||||
} else if (strcmp(arch, "mips64el") == 0) {
|
||||
info->arch = extensions::api::runtime::PlatformArch::kMips64;
|
||||
+ } else if (strcmp(arch, "ppc64") == 0) {
|
||||
+ info->arch = extensions::api::runtime::PlatformArch::kPpc64;
|
||||
} else {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
@@ -319,6 +321,8 @@ bool ChromeRuntimeAPIDelegate::GetPlatfo
|
||||
info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kMips;
|
||||
} else if (strcmp(nacl_arch, "mips64") == 0) {
|
||||
info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kMips64;
|
||||
+ } else if (strcmp(nacl_arch, "ppc64") == 0) {
|
||||
+ info->nacl_arch = extensions::api::runtime::PlatformNaclArch::kPpc64;
|
||||
} else {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
Index: chromium-128.0.6613.113/extensions/common/api/runtime.json
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/extensions/common/api/runtime.json
|
||||
+++ chromium-128.0.6613.113/extensions/common/api/runtime.json
|
||||
@@ -98,7 +98,8 @@
|
||||
{"name": "x86-32", "description": "Specifies the processer architecture as x86-32."},
|
||||
{"name": "x86-64", "description": "Specifies the processer architecture as x86-64."},
|
||||
{"name": "mips", "description": "Specifies the processer architecture as mips."},
|
||||
- {"name": "mips64", "description": "Specifies the processer architecture as mips64."}
|
||||
+ {"name": "mips64", "description": "Specifies the processer architecture as mips64."},
|
||||
+ {"name": "ppc64", "description": "Specifies the processer architecture as ppc64."}
|
||||
],
|
||||
"description": "The machine's processor architecture."
|
||||
},
|
||||
@@ -111,7 +112,8 @@
|
||||
{"name": "x86-32", "description": "Specifies the native client architecture as x86-32."},
|
||||
{"name": "x86-64", "description": "Specifies the native client architecture as x86-64."},
|
||||
{"name": "mips", "description": "Specifies the native client architecture as mips."},
|
||||
- {"name": "mips64", "description": "Specifies the native client architecture as mips64."}
|
||||
+ {"name": "mips64", "description": "Specifies the native client architecture as mips64."},
|
||||
+ {"name": "ppc64", "description": "Specifies the native client architecture as ppc64."}
|
||||
]
|
||||
},
|
||||
{
|
||||
12
chromium-lts/add-ppc64-pthread-stack-size.patch
Normal file
12
chromium-lts/add-ppc64-pthread-stack-size.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
--- a/base/process/launch.h
|
||||
+++ b/base/process/launch.h
|
||||
@@ -54,6 +54,9 @@
|
||||
#if defined(ARCH_CPU_ARM64)
|
||||
#define PTHREAD_STACK_MIN_CONST \
|
||||
(__builtin_constant_p(PTHREAD_STACK_MIN) ? PTHREAD_STACK_MIN : 131072)
|
||||
+#elif defined(ARCH_CPU_PPC64)
|
||||
+#define PTHREAD_STACK_MIN_CONST \
|
||||
+ (__builtin_constant_p(PTHREAD_STACK_MIN) ? PTHREAD_STACK_MIN : 131072)
|
||||
#else
|
||||
#define PTHREAD_STACK_MIN_CONST \
|
||||
(__builtin_constant_p(PTHREAD_STACK_MIN) ? PTHREAD_STACK_MIN : 16384)
|
||||
16
chromium-lts/chromium-107-ffmpeg-5.x-duration.patch
Normal file
16
chromium-lts/chromium-107-ffmpeg-5.x-duration.patch
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
diff -up chromium-107.0.5304.121/media/filters/audio_file_reader.cc.me chromium-107.0.5304.121/media/filters/audio_file_reader.cc
|
||||
--- chromium-107.0.5304.121/media/filters/audio_file_reader.cc.me 2022-12-17 08:27:12.204753071 +0100
|
||||
+++ chromium-107.0.5304.121/media/filters/audio_file_reader.cc 2022-12-17 08:28:40.908211808 +0100
|
||||
@@ -243,10 +243,10 @@ bool AudioFileReader::OnNewFrame(
|
||||
// silence from being output. In the case where we are also discarding some
|
||||
// portion of the packet (as indicated by a negative pts), we further want to
|
||||
// adjust the duration downward by however much exists before zero.
|
||||
- if (audio_codec_ == AudioCodec::kAAC && frame->duration) {
|
||||
+ if (audio_codec_ == AudioCodec::kAAC && frame->pkt_duration) {
|
||||
const base::TimeDelta pkt_duration = ConvertFromTimeBase(
|
||||
glue_->format_context()->streams[stream_index_]->time_base,
|
||||
- frame->duration + std::min(static_cast<int64_t>(0), frame->pts));
|
||||
+ frame->pkt_duration + std::min(static_cast<int64_t>(0), frame->pts));
|
||||
const base::TimeDelta frame_duration =
|
||||
base::Seconds(frames_read / static_cast<double>(sample_rate_));
|
||||
|
||||
16
chromium-lts/chromium-107-proprietary-codecs.patch
Normal file
16
chromium-lts/chromium-107-proprietary-codecs.patch
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
diff -up chromium-107.0.5304.121/media/BUILD.gn.me chromium-107.0.5304.121/media/BUILD.gn
|
||||
--- chromium-107.0.5304.121/media/BUILD.gn.me 2022-12-17 12:35:44.546779129 +0100
|
||||
+++ chromium-107.0.5304.121/media/BUILD.gn 2022-12-17 12:35:59.296047028 +0100
|
||||
@@ -64,12 +64,6 @@ buildflag_header("media_buildflags") {
|
||||
}
|
||||
}
|
||||
|
||||
-if (proprietary_codecs && media_use_ffmpeg) {
|
||||
- assert(
|
||||
- ffmpeg_branding != "Chromium",
|
||||
- "proprietary codecs and ffmpeg_branding set to Chromium are incompatible")
|
||||
-}
|
||||
-
|
||||
# Common configuration for targets in the media directory; these must not be
|
||||
# exported since things like USE_NEON and USE_CRAS have different meanings
|
||||
# elsewhere in the code base.
|
||||
12
chromium-lts/chromium-108-system-opus.patch
Normal file
12
chromium-lts/chromium-108-system-opus.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up chromium-108.0.5359.124/media/audio/audio_opus_encoder.h.me chromium-108.0.5359.124/media/audio/audio_opus_encoder.h
|
||||
--- chromium-108.0.5359.124/media/audio/audio_opus_encoder.h.me 2022-12-31 09:49:17.100277502 +0100
|
||||
+++ chromium-108.0.5359.124/media/audio/audio_opus_encoder.h 2022-12-31 09:49:57.101016710 +0100
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "media/base/audio_converter.h"
|
||||
#include "media/base/audio_encoder.h"
|
||||
#include "media/base/audio_timestamp_helper.h"
|
||||
-#include "third_party/opus/src/include/opus.h"
|
||||
+#include <opus/opus.h>
|
||||
|
||||
namespace media {
|
||||
|
||||
16
chromium-lts/chromium-115-initial_prefs-etc-path.patch
Normal file
16
chromium-lts/chromium-115-initial_prefs-etc-path.patch
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
diff -up chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc.me chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc
|
||||
--- chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc.me 2023-06-17 19:43:08.481952671 +0200
|
||||
+++ chromium-115.0.5790.32/chrome/browser/first_run/first_run_internal_linux.cc 2023-06-17 19:44:26.165349772 +0200
|
||||
@@ -20,10 +20,8 @@ bool IsOrganicFirstRun() {
|
||||
|
||||
base::FilePath InitialPrefsPath() {
|
||||
// The standard location of the initial prefs is next to the chrome binary.
|
||||
- base::FilePath dir_exe;
|
||||
- if (!base::PathService::Get(base::DIR_EXE, &dir_exe)) {
|
||||
- return base::FilePath();
|
||||
- }
|
||||
+ // ...but we patch it to use /etc/chromium
|
||||
+ base::FilePath dir_exe = base::FilePath("/etc/chromium");
|
||||
|
||||
return installer::InitialPreferences::Path(dir_exe);
|
||||
}
|
||||
33
chromium-lts/chromium-117-widevine-other-locations.patch
Normal file
33
chromium-lts/chromium-117-widevine-other-locations.patch
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
diff -up chromium-108.0.5359.124/chrome/common/chrome_paths.cc.widevine-other-locations chromium-108.0.5359.124/chrome/common/chrome_paths.cc
|
||||
--- chromium-108.0.5359.124/chrome/common/chrome_paths.cc.widevine-other-locations 2023-01-02 11:10:03.951330305 +0100
|
||||
+++ chromium-108.0.5359.124/chrome/common/chrome_paths.cc 2023-01-02 13:42:26.781022150 +0100
|
||||
@@ -319,6 +319,16 @@ bool PathProvider(int key, base::FilePat
|
||||
|
||||
#if BUILDFLAG(ENABLE_WIDEVINE)
|
||||
case chrome::DIR_BUNDLED_WIDEVINE_CDM:
|
||||
+ base::PathService::Get(base::DIR_HOME, &cur);
|
||||
+ cur = cur.Append(FILE_PATH_LITERAL(".config/chromium/WidevineCdm"));
|
||||
+ if (base::PathExists(cur)) {
|
||||
+ break;
|
||||
+ }
|
||||
+ // Yes, this has an arch hardcoded in the path, but at this time, it is the only place to find libwidevinecdm.so
|
||||
+ if (base::PathExists(base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so")))) {
|
||||
+ cur = base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/WidevineCdm"));
|
||||
+ break;
|
||||
+ }
|
||||
if (!GetComponentDirectory(&cur)) {
|
||||
return false;
|
||||
}
|
||||
cur = cur.AppendASCII(kWidevineCdmBaseDirectory);
|
||||
diff -up chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn.widevine-other-locations chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn
|
||||
--- chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn.widevine-other-locations 2023-01-02 11:10:45.953114153 +0100
|
||||
+++ chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn 2023-01-02 11:10:45.953114153 +0100
|
||||
@@ -22,7 +22,7 @@ buildflag_header("buildflags") {
|
||||
|
||||
flags = [
|
||||
"ENABLE_WIDEVINE=$enable_widevine",
|
||||
- "BUNDLE_WIDEVINE_CDM=$bundle_widevine_cdm",
|
||||
+ "BUNDLE_WIDEVINE_CDM=true",
|
||||
"ENABLE_WIDEVINE_CDM_COMPONENT=$enable_widevine_cdm_component",
|
||||
"ENABLE_MEDIA_FOUNDATION_WIDEVINE_CDM=$enable_media_foundation_widevine_cdm",
|
||||
]
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
diff -up chromium-117.0.5938.132/build/config/arm.gni.me chromium-117.0.5938.132/build/config/arm.gni
|
||||
--- chromium-117.0.5938.132/build/config/arm.gni.me 2023-09-29 15:37:18.281122162 +0200
|
||||
+++ chromium-117.0.5938.132/build/config/arm.gni 2023-09-29 15:38:24.855369796 +0200
|
||||
@@ -140,7 +140,7 @@ if (current_cpu == "arm" || v8_current_c
|
||||
# target_cpu == "arm64" filters out some cases (e.g. the ChromeOS x64
|
||||
# MSAN build) where the target platform is x64, but V8 is configured to
|
||||
# use the arm64 simulator.
|
||||
- arm_control_flow_integrity = "standard"
|
||||
+ arm_control_flow_integrity = "pac"
|
||||
}
|
||||
}
|
||||
assert(arm_control_flow_integrity == "none" ||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
diff -up chromium-118.0.5993.32/ui/gfx/linux/dmabuf_uapi.h.me chromium-118.0.5993.32/ui/gfx/linux/dmabuf_uapi.h
|
||||
--- chromium-118.0.5993.32/ui/gfx/linux/dmabuf_uapi.h.me 2023-10-04 22:18:44.259800011 +0200
|
||||
+++ chromium-118.0.5993.32/ui/gfx/linux/dmabuf_uapi.h 2023-10-04 22:28:17.068756669 +0200
|
||||
@@ -28,7 +28,7 @@ constexpr unsigned long DMA_BUF_IOCTL_SY
|
||||
_IOW(DMA_BUF_BASE, 0, struct dma_buf_sync);
|
||||
#endif
|
||||
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
|
||||
+#if 0
|
||||
struct dma_buf_export_sync_file {
|
||||
__u32 flags;
|
||||
__s32 fd;
|
||||
16
chromium-lts/chromium-118-sigtrap_system_ffmpeg.patch
Normal file
16
chromium-lts/chromium-118-sigtrap_system_ffmpeg.patch
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
fix tab crash with SIGTRAP when opening website like ge.globo.com
|
||||
|
||||
author: Than Ngo <than@redhat.com>
|
||||
|
||||
diff -up chromium-118.0.5993.70/media/filters/ffmpeg_glue.cc.me chromium-118.0.5993.70/media/filters/ffmpeg_glue.cc
|
||||
--- chromium-118.0.5993.70/media/filters/ffmpeg_glue.cc.me 2023-10-16 12:52:01.716573884 +0200
|
||||
+++ chromium-118.0.5993.70/media/filters/ffmpeg_glue.cc 2023-10-16 12:56:03.476075446 +0200
|
||||
@@ -157,7 +157,7 @@ bool FFmpegGlue::OpenContext(bool is_loc
|
||||
container_ = container_names::MediaContainerName::kContainerAVI;
|
||||
|
||||
// For a successfully opened file, we will get a container we've compiled in.
|
||||
- CHECK_NE(container_, container_names::MediaContainerName::kContainerUnknown);
|
||||
+ DCHECK_NE(container_, container_names::MediaContainerName::kContainerUnknown);
|
||||
LogContainer(is_local_file, container_);
|
||||
|
||||
return true;
|
||||
24
chromium-lts/chromium-121-system-libxml.patch
Normal file
24
chromium-lts/chromium-121-system-libxml.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
diff -up chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor.h.me chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor.h
|
||||
--- chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor.h.me 2024-02-06 08:22:36.013021582 +0100
|
||||
+++ chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor.h 2024-02-06 08:23:08.281607499 +0100
|
||||
@@ -77,7 +77,7 @@ class XSLTProcessor final : public Scrip
|
||||
|
||||
void reset();
|
||||
|
||||
- static void ParseErrorFunc(void* user_data, const xmlError*);
|
||||
+ static void ParseErrorFunc(void* user_data, xmlError*);
|
||||
static void GenericErrorFunc(void* user_data, const char* msg, ...);
|
||||
|
||||
// Only for libXSLT callbacks
|
||||
diff -up chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc.me chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc
|
||||
--- chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc.me 2024-02-06 08:14:32.368066214 +0100
|
||||
+++ chromium-121.0.6167.139/third_party/blink/renderer/core/xml/xslt_processor_libxslt.cc 2024-02-06 08:23:08.282607518 +0100
|
||||
@@ -66,7 +66,7 @@ void XSLTProcessor::GenericErrorFunc(voi
|
||||
// It would be nice to do something with this error message.
|
||||
}
|
||||
|
||||
-void XSLTProcessor::ParseErrorFunc(void* user_data, const xmlError* error) {
|
||||
+void XSLTProcessor::ParseErrorFunc(void* user_data, xmlError* error) {
|
||||
FrameConsole* console = static_cast<FrameConsole*>(user_data);
|
||||
if (!console)
|
||||
return;
|
||||
34
chromium-lts/chromium-121-system-old-ffmpeg.patch
Normal file
34
chromium-lts/chromium-121-system-old-ffmpeg.patch
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
diff -up chromium-121.0.6167.57/media/ffmpeg/ffmpeg_common.cc.me chromium-121.0.6167.57/media/ffmpeg/ffmpeg_common.cc
|
||||
--- chromium-121.0.6167.57/media/ffmpeg/ffmpeg_common.cc.me 2024-01-16 10:54:38.994173911 +0100
|
||||
+++ chromium-121.0.6167.57/media/ffmpeg/ffmpeg_common.cc 2024-01-16 11:06:20.974160612 +0100
|
||||
@@ -710,8 +710,13 @@ bool AVStreamToVideoDecoderConfig(const
|
||||
}
|
||||
|
||||
VideoTransformation video_transformation = VideoTransformation();
|
||||
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 31, 102)
|
||||
+ for (int i = 0; i < stream->nb_side_data; i++) {
|
||||
+ const auto& side_data = stream->side_data[i];
|
||||
+#else
|
||||
for (int i = 0; i < stream->codecpar->nb_coded_side_data; ++i) {
|
||||
const auto& side_data = stream->codecpar->coded_side_data[i];
|
||||
+#endif
|
||||
switch (side_data.type) {
|
||||
case AV_PKT_DATA_DISPLAYMATRIX: {
|
||||
CHECK_EQ(side_data.size, sizeof(int32_t) * 3 * 3);
|
||||
diff -up chromium-121.0.6167.57/media/filters/audio_video_metadata_extractor.cc.me chromium-121.0.6167.57/media/filters/audio_video_metadata_extractor.cc
|
||||
--- chromium-121.0.6167.57/media/filters/audio_video_metadata_extractor.cc.me 2024-01-16 11:12:27.521534151 +0100
|
||||
+++ chromium-121.0.6167.57/media/filters/audio_video_metadata_extractor.cc 2024-01-16 11:15:08.717337026 +0100
|
||||
@@ -113,8 +113,13 @@ bool AudioVideoMetadataExtractor::Extrac
|
||||
if (!stream)
|
||||
continue;
|
||||
|
||||
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 31, 102)
|
||||
+ for (int j = 0; j < stream->nb_side_data; j++) {
|
||||
+ const AVPacketSideData& sd = stream->side_data[j];
|
||||
+#else
|
||||
for (int j = 0; j < stream->codecpar->nb_coded_side_data; j++) {
|
||||
const AVPacketSideData& sd = stream->codecpar->coded_side_data[j];
|
||||
+#endif
|
||||
if (sd.type == AV_PKT_DATA_DISPLAYMATRIX) {
|
||||
CHECK_EQ(sd.size, sizeof(int32_t) * 3 * 3);
|
||||
rotation_ = VideoTransformation::FromFFmpegDisplayMatrix(
|
||||
17
chromium-lts/chromium-122-clang-build-flags.patch
Normal file
17
chromium-lts/chromium-122-clang-build-flags.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
diff -up chromium-122.0.6261.57/build/config/compiler/BUILD.gn.me chromium-122.0.6261.57/build/config/compiler/BUILD.gn
|
||||
--- chromium-122.0.6261.57/build/config/compiler/BUILD.gn.me 2024-02-23 12:32:11.248584653 +0100
|
||||
+++ chromium-122.0.6261.57/build/config/compiler/BUILD.gn 2024-02-23 12:45:26.672302958 +0100
|
||||
@@ -399,6 +399,13 @@ config("compiler") {
|
||||
}
|
||||
}
|
||||
|
||||
+ if (is_clang) {
|
||||
+ cflags += [ "-ftrivial-auto-var-init=zero" ]
|
||||
+ if (!is_ubsan && !is_ubsan_security) {
|
||||
+ cflags += [ "-fwrapv" ]
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
# Linker warnings.
|
||||
if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
|
||||
current_os != "zos") {
|
||||
12
chromium-lts/chromium-123-fstack-protector-strong.patch
Normal file
12
chromium-lts/chromium-123-fstack-protector-strong.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up chromium-123.0.6312.46/build/config/compiler/BUILD.gn.fstack-protector-strong chromium-123.0.6312.46/build/config/compiler/BUILD.gn
|
||||
--- chromium-123.0.6312.46/build/config/compiler/BUILD.gn.fstack-protector-strong 2024-03-15 11:46:34.542248116 +0100
|
||||
+++ chromium-123.0.6312.46/build/config/compiler/BUILD.gn 2024-03-15 11:59:02.970849847 +0100
|
||||
@@ -382,7 +382,7 @@ config("compiler") {
|
||||
} else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
|
||||
if (current_os != "aix") {
|
||||
# Not available on aix.
|
||||
- cflags += [ "-fstack-protector" ]
|
||||
+ cflags += [ "-fstack-protector-strong" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
13
chromium-lts/chromium-123-screen-ai-service.patch
Normal file
13
chromium-lts/chromium-123-screen-ai-service.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff -up chromium-123.0.6312.58/chrome/browser/component_updater/screen_ai_component_installer.cc.me chromium-123.0.6312.58/chrome/browser/component_updater/screen_ai_component_installer.cc
|
||||
--- chromium-123.0.6312.58/chrome/browser/component_updater/screen_ai_component_installer.cc.me 2024-03-24 10:58:43.033885904 +0100
|
||||
+++ chromium-123.0.6312.58/chrome/browser/component_updater/screen_ai_component_installer.cc 2024-03-24 11:00:38.861979740 +0100
|
||||
@@ -143,8 +143,7 @@ void ScreenAIComponentInstallerPolicy::D
|
||||
void ManageScreenAIComponentRegistration(ComponentUpdateService* cus,
|
||||
PrefService* local_state) {
|
||||
if (screen_ai::ScreenAIInstallState::ShouldInstall(local_state)) {
|
||||
- RegisterScreenAIComponent(cus);
|
||||
- return;
|
||||
+ // don't register the screenn ai service
|
||||
}
|
||||
|
||||
// Clean up.
|
||||
13
chromium-lts/chromium-124-el8-arm64-memory_tagging.patch
Normal file
13
chromium-lts/chromium-124-el8-arm64-memory_tagging.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff -up chromium-124.0.6367.60/base/allocator/partition_allocator/partition_alloc.gni.me chromium-124.0.6367.60/base/allocator/partition_allocator/partition_alloc.gni
|
||||
--- chromium-124.0.6367.60/base/allocator/partition_allocator/partition_alloc.gni.me 2024-04-18 15:12:34.007397489 +0200
|
||||
+++ chromium-124.0.6367.60/base/allocator/partition_allocator/partition_alloc.gni 2024-04-18 15:13:06.166051954 +0200
|
||||
@@ -32,8 +32,7 @@ if (is_nacl) {
|
||||
# Increases the size of the empty slot span ring.
|
||||
use_large_empty_slot_span_ring = is_mac
|
||||
|
||||
-has_memory_tagging =
|
||||
- current_cpu == "arm64" && is_clang && !is_asan && (is_linux || is_android)
|
||||
+has_memory_tagging = false
|
||||
|
||||
declare_args() {
|
||||
# Causes all the allocations to be routed via allocator_shim.cc. Usually,
|
||||
11
chromium-lts/chromium-124-qt6.patch
Normal file
11
chromium-lts/chromium-124-qt6.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
diff -up chromium-124.0.6367.155/ui/qt/BUILD.gn.me chromium-124.0.6367.155/ui/qt/BUILD.gn
|
||||
--- chromium-124.0.6367.155/ui/qt/BUILD.gn.me 2024-05-08 18:15:34.178627040 +0200
|
||||
+++ chromium-124.0.6367.155/ui/qt/BUILD.gn 2024-05-08 18:29:31.162513709 +0200
|
||||
@@ -61,6 +61,7 @@ template("qt_shim") {
|
||||
packages = [
|
||||
"Qt" + invoker.qt_version + "Core",
|
||||
"Qt" + invoker.qt_version + "Widgets",
|
||||
+ "Qt" + invoker.qt_version + "Gui",
|
||||
]
|
||||
}
|
||||
|
||||
105
chromium-lts/chromium-125-ffmpeg-5.x-reordered_opaque.patch
Normal file
105
chromium-lts/chromium-125-ffmpeg-5.x-reordered_opaque.patch
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
commit 62274859104bd828373ae406aa9309e610449ac5
|
||||
Author: Ted Meyer <tmathmeyer@chromium.org>
|
||||
Date: Fri Mar 22 19:56:55 2024 +0000
|
||||
|
||||
Replace deprecated use of AVCodecContext::reordered_opaque
|
||||
|
||||
We can use the AV_CODEC_FLAG_COPY_OPAQUE flag on the codec context
|
||||
now to trigger timestamp propagation.
|
||||
|
||||
Bug: 330573128
|
||||
Change-Id: I6bc57241a35ab5283742aad8d42acb4dc5e85858
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5384308
|
||||
Commit-Queue: Ted (Chromium) Meyer <tmathmeyer@chromium.org>
|
||||
Reviewed-by: Dan Sanders <sandersd@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1277051}
|
||||
|
||||
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
|
||||
index bd75477feeabb..8a658a58caac5 100644
|
||||
--- a/media/filters/ffmpeg_video_decoder.cc
|
||||
+++ b/media/filters/ffmpeg_video_decoder.cc
|
||||
@@ -134,7 +134,7 @@ bool FFmpegVideoDecoder::IsCodecSupported(VideoCodec codec) {
|
||||
}
|
||||
|
||||
FFmpegVideoDecoder::FFmpegVideoDecoder(MediaLog* media_log)
|
||||
- : media_log_(media_log) {
|
||||
+ : media_log_(media_log), timestamp_map_(128) {
|
||||
DVLOG(1) << __func__;
|
||||
DETACH_FROM_SEQUENCE(sequence_checker_);
|
||||
}
|
||||
@@ -363,8 +363,10 @@ bool FFmpegVideoDecoder::FFmpegDecode(const DecoderBuffer& buffer) {
|
||||
DCHECK(packet->data);
|
||||
DCHECK_GT(packet->size, 0);
|
||||
|
||||
- // Let FFmpeg handle presentation timestamp reordering.
|
||||
- codec_context_->reordered_opaque = buffer.timestamp().InMicroseconds();
|
||||
+ const int64_t timestamp = buffer.timestamp().InMicroseconds();
|
||||
+ const TimestampId timestamp_id = timestamp_id_generator_.GenerateNextId();
|
||||
+ timestamp_map_.Put(std::make_pair(timestamp_id, timestamp));
|
||||
+ packet->opaque = reinterpret_cast<void*>(timestamp_id.GetUnsafeValue());
|
||||
}
|
||||
FFmpegDecodingLoop::DecodeStatus decode_status = decoding_loop_->DecodePacket(
|
||||
packet, base::BindRepeating(&FFmpegVideoDecoder::OnNewFrame,
|
||||
@@ -423,7 +425,12 @@ bool FFmpegVideoDecoder::OnNewFrame(AVFrame* frame) {
|
||||
}
|
||||
gfx::Size natural_size = aspect_ratio.GetNaturalSize(visible_rect);
|
||||
|
||||
- const auto pts = base::Microseconds(frame->reordered_opaque);
|
||||
+ const auto ts_id = TimestampId(reinterpret_cast<size_t>(frame->opaque));
|
||||
+ const auto ts_lookup = timestamp_map_.Get(ts_id);
|
||||
+ if (ts_lookup == timestamp_map_.end()) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ const auto pts = base::Microseconds(std::get<1>(*ts_lookup));
|
||||
auto video_frame = VideoFrame::WrapExternalDataWithLayout(
|
||||
opaque->layout, visible_rect, natural_size, opaque->data, opaque->size,
|
||||
pts);
|
||||
@@ -498,8 +505,10 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config,
|
||||
codec_context_->thread_count = GetFFmpegVideoDecoderThreadCount(config);
|
||||
codec_context_->thread_type =
|
||||
FF_THREAD_SLICE | (low_delay ? 0 : FF_THREAD_FRAME);
|
||||
+
|
||||
codec_context_->opaque = this;
|
||||
codec_context_->get_buffer2 = GetVideoBufferImpl;
|
||||
+ codec_context_->flags |= AV_CODEC_FLAG_COPY_OPAQUE;
|
||||
|
||||
if (base::FeatureList::IsEnabled(kFFmpegAllowLists)) {
|
||||
// Note: FFmpeg will try to free this string, so we must duplicate it.
|
||||
diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h
|
||||
index d02cb89c3ddf7..0a2de1c623fff 100644
|
||||
--- a/media/filters/ffmpeg_video_decoder.h
|
||||
+++ b/media/filters/ffmpeg_video_decoder.h
|
||||
@@ -7,10 +7,12 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
+#include "base/containers/lru_cache.h"
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/memory/scoped_refptr.h"
|
||||
#include "base/sequence_checker.h"
|
||||
+#include "base/types/id_type.h"
|
||||
#include "media/base/frame_buffer_pool.h"
|
||||
#include "media/base/supported_video_decoder_config.h"
|
||||
#include "media/base/video_decoder.h"
|
||||
@@ -87,6 +89,20 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
|
||||
// FFmpeg structures owned by this object.
|
||||
std::unique_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_;
|
||||
|
||||
+ // The gist here is that timestamps need to be 64 bits to store microsecond
|
||||
+ // precision. A 32 bit integer would overflow at ~35 minutes at this level of
|
||||
+ // precision. We can't cast the timestamp to the void ptr object used by the
|
||||
+ // opaque field in ffmpeg then, because it would lose data on a 32 bit build.
|
||||
+ // However, we don't actually have 2^31 timestamped frames in a single
|
||||
+ // playback, so it's fine to use the 32 bit value as a key in a map which
|
||||
+ // contains the actual timestamps. Additionally, we've in the past set 128
|
||||
+ // outstanding frames for re-ordering as a limit for cross-thread decoding
|
||||
+ // tasks, so we'll do that here too with the LRU cache.
|
||||
+ using TimestampId = base::IdType<int64_t, size_t, 0>;
|
||||
+
|
||||
+ TimestampId::Generator timestamp_id_generator_;
|
||||
+ base::LRUCache<TimestampId, int64_t> timestamp_map_;
|
||||
+
|
||||
VideoDecoderConfig config_;
|
||||
|
||||
scoped_refptr<FrameBufferPool> frame_pool_;
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
diff -up chromium-126.0.6478.26/build/config/compiler/BUILD.gn.me chromium-126.0.6478.26/build/config/compiler/BUILD.gn
|
||||
--- chromium-126.0.6478.26/build/config/compiler/BUILD.gn.me 2024-06-02 14:02:52.516602574 +0200
|
||||
+++ chromium-126.0.6478.26/build/config/compiler/BUILD.gn 2024-06-02 14:17:24.527503540 +0200
|
||||
@@ -575,24 +575,6 @@ config("compiler") {
|
||||
}
|
||||
}
|
||||
|
||||
- # TODO(crbug.com/40283598): This causes binary size growth and potentially
|
||||
- # other problems.
|
||||
- # TODO(crbug.com/40284925): This isn't supported by Cronet's mainline llvm version.
|
||||
- if (default_toolchain != "//build/toolchain/cros:target" &&
|
||||
- !llvm_android_mainline) {
|
||||
- cflags += [
|
||||
- "-mllvm",
|
||||
- "-split-threshold-for-reg-with-hint=0",
|
||||
- ]
|
||||
- if (use_thin_lto && is_a_target_toolchain) {
|
||||
- if (is_win) {
|
||||
- ldflags += [ "-mllvm:-split-threshold-for-reg-with-hint=0" ]
|
||||
- } else {
|
||||
- ldflags += [ "-Wl,-mllvm,-split-threshold-for-reg-with-hint=0" ]
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
# TODO(crbug.com/40192287): Investigate why/if this should be needed.
|
||||
if (is_win) {
|
||||
cflags += [ "/clang:-ffp-contract=off" ]
|
||||
13
chromium-lts/chromium-127-aarch64-duplicate-case-value.patch
Normal file
13
chromium-lts/chromium-127-aarch64-duplicate-case-value.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff -up chromium-127.0.6533.72/sandbox/linux/syscall_broker/broker_process.cc.me chromium-127.0.6533.72/sandbox/linux/syscall_broker/broker_process.cc
|
||||
--- chromium-127.0.6533.72/sandbox/linux/syscall_broker/broker_process.cc.me 2024-07-30 18:09:59.483141522 +0200
|
||||
+++ chromium-127.0.6533.72/sandbox/linux/syscall_broker/broker_process.cc 2024-07-30 19:42:47.122708543 +0200
|
||||
@@ -163,9 +163,6 @@ bool BrokerProcess::IsSyscallBrokerable(
|
||||
case __NR_stat:
|
||||
case __NR_lstat:
|
||||
#endif
|
||||
-#if defined(__NR_fstatat)
|
||||
- case __NR_fstatat:
|
||||
-#endif
|
||||
#if defined(__NR_fstatat64)
|
||||
case __NR_fstatat64:
|
||||
#endif
|
||||
15
chromium-lts/chromium-127-el8-ifunc-header.patch
Normal file
15
chromium-lts/chromium-127-el8-ifunc-header.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
diff -up chromium-127.0.6533.72/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h.me chromium-127.0.6533.72/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h
|
||||
--- chromium-127.0.6533.72/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h.me 2024-07-25 23:58:19.751616508 +0200
|
||||
+++ chromium-127.0.6533.72/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h 2024-07-26 00:01:46.391800969 +0200
|
||||
@@ -10,9 +10,11 @@
|
||||
#include "partition_alloc/build_config.h"
|
||||
#include "partition_alloc/partition_alloc_buildflags.h"
|
||||
|
||||
+#if 0
|
||||
#if PA_BUILDFLAG(IS_ANDROID) || PA_BUILDFLAG(IS_LINUX)
|
||||
#define HAS_HW_CAPS
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
#if PA_BUILDFLAG(PA_ARCH_CPU_ARM64) && defined(HAS_HW_CAPS)
|
||||
#include <asm/hwcap.h>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
diff -up chromium-130.0.6723.44/components/media_router/common/providers/cast/channel/enum_table.h.me chromium-130.0.6723.44/components/media_router/common/providers/cast/channel/enum_table.h
|
||||
--- chromium-130.0.6723.44/components/media_router/common/providers/cast/channel/enum_table.h.me 2024-10-15 09:58:39.571798463 +0200
|
||||
+++ chromium-130.0.6723.44/components/media_router/common/providers/cast/channel/enum_table.h 2024-10-15 09:59:46.209147226 +0200
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
-#include <new>
|
||||
#include <optional>
|
||||
#include <ostream>
|
||||
#include <string_view>
|
||||
@@ -368,7 +367,8 @@ class EnumTable {
|
||||
|
||||
private:
|
||||
#ifdef ARCH_CPU_64_BITS
|
||||
- alignas(std::hardware_destructive_interference_size)
|
||||
+ // Align the data on a cache line boundary.
|
||||
+ alignas(64)
|
||||
#endif
|
||||
std::initializer_list<Entry> data_;
|
||||
bool is_sorted_;
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
commit 1ab1a14ad97394d384d8dc6de51bb229625e66d6
|
||||
Author: Benoît Lizé <lizeb@chromium.org>
|
||||
Date: Mon Sep 16 12:01:14 2024 +0200
|
||||
|
||||
[cppgc] Decommit pooled pages by default
|
||||
|
||||
This reduces committed memory by a large amount, which matters on
|
||||
Windows. See the field trial results, which measure committed memory:
|
||||
https://screenshot.googleplex.com/kEBAScqJSEXuRoy
|
||||
|
||||
Bug: chromium:326303884
|
||||
Change-Id: I619257871bcdb7ed50a71f41af341d0df634428a
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5864909
|
||||
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
|
||||
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
|
||||
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
|
||||
Auto-Submit: Benoit Lize <lizeb@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#96107}
|
||||
|
||||
diff --git a/v8/src/flags/flag-definitions.h b/v8/src/flags/flag-definitions.h
|
||||
index 69946faf5ed..85c4b68612e 100644
|
||||
--- a/v8/src/flags/flag-definitions.h
|
||||
+++ b/v8/src/flags/flag-definitions.h
|
||||
@@ -821,7 +821,7 @@ DEFINE_BOOL(trace_block_coverage, false,
|
||||
"trace collected block coverage information")
|
||||
DEFINE_BOOL(trace_protector_invalidation, false,
|
||||
"trace protector cell invalidations")
|
||||
-DEFINE_BOOL(decommit_pooled_pages, false,
|
||||
+DEFINE_BOOL(decommit_pooled_pages, true,
|
||||
"decommit, rather than discard pooled pages")
|
||||
|
||||
#ifdef V8_MINORMS_STRING_SHORTCUTTING
|
||||
11
chromium-lts/chromium-132-el8-unsupport-rustc-flags.patch
Normal file
11
chromium-lts/chromium-132-el8-unsupport-rustc-flags.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
diff -up chromium-132.0.6834.57/build/config/gcc/BUILD.gn.me chromium-132.0.6834.57/build/config/gcc/BUILD.gn
|
||||
--- chromium-132.0.6834.57/build/config/gcc/BUILD.gn.me 2025-01-01 18:59:29.670002052 +0100
|
||||
+++ chromium-132.0.6834.57/build/config/gcc/BUILD.gn 2025-01-01 20:51:11.798696436 +0100
|
||||
@@ -32,7 +32,6 @@ declare_args() {
|
||||
# See http://gcc.gnu.org/wiki/Visibility
|
||||
config("symbol_visibility_hidden") {
|
||||
cflags = [ "-fvisibility=hidden" ]
|
||||
- rustflags = [ "-Zdefault-visibility=hidden" ]
|
||||
|
||||
# Visibility attribute is not supported on AIX.
|
||||
if (current_os != "aix") {
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
diff -up chromium-133.0.6943.53/media/filters/ffmpeg_glue.cc.me chromium-133.0.6943.53/media/filters/ffmpeg_glue.cc
|
||||
--- chromium-133.0.6943.53/media/filters/ffmpeg_glue.cc.me 2025-02-05 13:28:17.782881439 +0100
|
||||
+++ chromium-133.0.6943.53/media/filters/ffmpeg_glue.cc 2025-02-05 13:33:15.256928027 +0100
|
||||
@@ -111,7 +111,7 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol
|
||||
|
||||
// We don't allow H.264 parsing during demuxing since we have our own parser
|
||||
// and the ffmpeg one increases memory usage unnecessarily.
|
||||
- format_context_->flags |= AVFMT_FLAG_NOH264PARSE;
|
||||
+ // format_context_->flags |= AVFMT_FLAG_NOH264PARSE;
|
||||
|
||||
// Ensures format parsing errors will bail out. From an audit on 11/2017, all
|
||||
// instances were real failures. Solves bugs like http://crbug.com/710791.
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
diff -up chromium-133.0.6943.98/media/ffmpeg/ffmpeg_common.cc.than chromium-133.0.6943.98/media/ffmpeg/ffmpeg_common.cc
|
||||
--- chromium-133.0.6943.98/media/ffmpeg/ffmpeg_common.cc.than 2025-02-13 11:59:31.035724118 +0100
|
||||
+++ chromium-133.0.6943.98/media/ffmpeg/ffmpeg_common.cc 2025-02-14 10:39:07.825746076 +0100
|
||||
@@ -76,6 +76,8 @@ const char* GetAllowedVideoDecoders() {
|
||||
void ApplyCodecContextSecuritySettings(AVCodecContext* codec_context) {
|
||||
// Future versions of ffmpeg may copy the allow list from the format
|
||||
// context.
|
||||
+ // Workaround for codec whitelist with system ffmpeg
|
||||
+#if 0
|
||||
if (!codec_context->codec_whitelist) {
|
||||
// Note: FFmpeg will try to free this string, so we must duplicate it.
|
||||
codec_context->codec_whitelist =
|
||||
@@ -83,6 +85,7 @@ void ApplyCodecContextSecuritySettings(A
|
||||
? GetAllowedAudioDecoders()
|
||||
: GetAllowedVideoDecoders());
|
||||
}
|
||||
+#endif
|
||||
|
||||
// Note: This is security sensitive. FFmpeg may not always continue safely
|
||||
// in the presence of errors. See https://crbug.com/379418979
|
||||
diff -up chromium-133.0.6943.98/media/filters/ffmpeg_glue.cc.than chromium-133.0.6943.98/media/filters/ffmpeg_glue.cc
|
||||
--- chromium-133.0.6943.98/media/filters/ffmpeg_glue.cc.than 2025-02-14 10:14:13.360398193 +0100
|
||||
+++ chromium-133.0.6943.98/media/filters/ffmpeg_glue.cc 2025-02-14 10:36:46.762332912 +0100
|
||||
@@ -131,8 +131,10 @@ FFmpegGlue::FFmpegGlue(FFmpegURLProtocol
|
||||
// memory usage.
|
||||
//
|
||||
// Note: FFmpeg will try to free these strings, so we must duplicate them.
|
||||
+#if 0
|
||||
format_context_->codec_whitelist = av_strdup(GetAllowedAudioDecoders());
|
||||
format_context_->format_whitelist = av_strdup(GetAllowedDemuxers());
|
||||
+#endif
|
||||
}
|
||||
|
||||
bool FFmpegGlue::OpenContext(bool is_local_file) {
|
||||
1067
chromium-lts/chromium-134-el8-atk-compiler-error.patch
Normal file
1067
chromium-lts/chromium-134-el8-atk-compiler-error.patch
Normal file
File diff suppressed because it is too large
Load diff
14
chromium-lts/chromium-134-rust-libadler2.patch
Normal file
14
chromium-lts/chromium-134-rust-libadler2.patch
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
Fix warning: libadler2 not found
|
||||
|
||||
diff -up chromium-134.0.6998.23/build/rust/std/BUILD.gn.than chromium-134.0.6998.23/build/rust/std/BUILD.gn
|
||||
--- chromium-134.0.6998.23/build/rust/std/BUILD.gn.than 2025-02-24 09:47:57.560506410 +0100
|
||||
+++ chromium-134.0.6998.23/build/rust/std/BUILD.gn 2025-02-24 09:48:02.335676712 +0100
|
||||
@@ -89,7 +89,7 @@ if (toolchain_has_rust) {
|
||||
# These are no longer present in the Windows toolchain.
|
||||
stdlib_files += [
|
||||
"addr2line",
|
||||
- "adler2",
|
||||
+ "adler",
|
||||
"gimli",
|
||||
"libc",
|
||||
"memchr",
|
||||
13
chromium-lts/chromium-134-type-mismatch-error.patch
Normal file
13
chromium-lts/chromium-134-type-mismatch-error.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff -up chromium-134.0.6998.23/base/containers/to_value_list.h.me chromium-134.0.6998.23/base/containers/to_value_list.h
|
||||
--- chromium-134.0.6998.23/base/containers/to_value_list.h.me 2025-02-23 22:39:33.369668072 +0100
|
||||
+++ chromium-134.0.6998.23/base/containers/to_value_list.h 2025-02-23 22:42:42.653990901 +0100
|
||||
@@ -36,8 +36,7 @@ Value::List ToValueList(Range&& range, P
|
||||
auto container = Value::List::with_capacity(std::ranges::size(range));
|
||||
std::ranges::for_each(
|
||||
std::forward<Range>(range),
|
||||
- [&]<typename T>(T&& value) { container.Append(std::forward<T>(value)); },
|
||||
- std::move(proj));
|
||||
+ [&](auto&& value) { container.Append(std::invoke(proj, std::forward<decltype(*std::ranges::begin(range))>(value))); });
|
||||
return container;
|
||||
}
|
||||
|
||||
90
chromium-lts/chromium-135-rust-clanglib.patch
Normal file
90
chromium-lts/chromium-135-rust-clanglib.patch
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
diff -up chromium-135.0.7049.84/build/config/clang/BUILD.gn.than chromium-135.0.7049.84/build/config/clang/BUILD.gn
|
||||
--- chromium-135.0.7049.84/build/config/clang/BUILD.gn.than 2025-04-09 10:22:51.699058451 +0200
|
||||
+++ chromium-135.0.7049.84/build/config/clang/BUILD.gn 2025-04-09 10:43:06.524085005 +0200
|
||||
@@ -166,8 +166,8 @@ template("clang_lib") {
|
||||
_prefix = "lib"
|
||||
_suffix = ""
|
||||
_ext = "a"
|
||||
+ _libprefix = ""
|
||||
|
||||
- _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib"
|
||||
if (is_win) {
|
||||
_dir = "windows"
|
||||
_prefix = ""
|
||||
@@ -197,7 +197,33 @@ template("clang_lib") {
|
||||
} else {
|
||||
assert(false) # Unhandled cpu type
|
||||
}
|
||||
- } else if (is_linux || is_chromeos) {
|
||||
+ } else if (is_linux) {
|
||||
+ if (current_cpu == "x64") {
|
||||
+ _dir = "x86_64-redhat-linux-gnu"
|
||||
+ _suffix ="-x86_64"
|
||||
+ } else if (current_cpu == "x86") {
|
||||
+ _dir = "i386-redhat-linux-gnu"
|
||||
+ _suffix = "-i386"
|
||||
+ } else if (current_cpu == "arm64") {
|
||||
+ _dir = "aarch64-redhat-linux-gnu"
|
||||
+ _suffix = "-aarch64"
|
||||
+ } else if (current_cpu == "arm") {
|
||||
+ _dir = "armhf-redhat-linux-gnu"
|
||||
+ _suffix = "-armhf"
|
||||
+ } else if (current_cpu == "ppc64") {
|
||||
+ _dir = "ppc64le-redhat-linux-gnu"
|
||||
+ _suffix = "-ppc64le"
|
||||
+ } else {
|
||||
+ assert(false) # Unhandled cpu type
|
||||
+ }
|
||||
+ # different clang lib dir in fedora/epel
|
||||
+ if (clang_version >= 17) {
|
||||
+ _suffix = ""
|
||||
+ } else if (clang_version >= 14) {
|
||||
+ _libprefix = "64"
|
||||
+ _dir = ""
|
||||
+ }
|
||||
+ } else if (is_chromeos) {
|
||||
if (current_cpu == "x64") {
|
||||
_dir = "x86_64-unknown-linux-gnu"
|
||||
} else if (current_cpu == "x86") {
|
||||
@@ -236,6 +262,7 @@ template("clang_lib") {
|
||||
assert(false) # Unhandled target platform
|
||||
}
|
||||
|
||||
+ _clang_lib_dir = "$clang_base_path/lib${_libprefix}/clang/$clang_version/lib"
|
||||
_lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}"
|
||||
libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ]
|
||||
|
||||
diff -up chromium-135.0.7049.84/build/rust/rust_bindgen_generator.gni.than chromium-135.0.7049.84/build/rust/rust_bindgen_generator.gni
|
||||
--- chromium-135.0.7049.84/build/rust/rust_bindgen_generator.gni.than 2025-04-09 10:46:48.772413981 +0200
|
||||
+++ chromium-135.0.7049.84/build/rust/rust_bindgen_generator.gni 2025-04-09 10:47:15.480900587 +0200
|
||||
@@ -18,11 +18,11 @@ if (host_os == "win") {
|
||||
|
||||
# On Windows, the libclang.dll is beside the bindgen.exe, otherwise it is in
|
||||
# ../lib.
|
||||
-_libclang_path = rust_bindgen_root
|
||||
+_libclang_path = clang_base_path
|
||||
if (host_os == "win") {
|
||||
_libclang_path += "/bin"
|
||||
} else {
|
||||
- _libclang_path += "/lib"
|
||||
+ _libclang_path += "/lib64"
|
||||
}
|
||||
|
||||
# Template to build Rust/C bindings with bindgen.
|
||||
diff -up chromium-135.0.7049.84/build/rust/rust_bindgen.gni.than chromium-135.0.7049.84/build/rust/rust_bindgen.gni
|
||||
--- chromium-135.0.7049.84/build/rust/rust_bindgen.gni.than 2025-04-09 10:45:53.577078718 +0200
|
||||
+++ chromium-135.0.7049.84/build/rust/rust_bindgen.gni 2025-04-09 10:46:29.974649891 +0200
|
||||
@@ -19,11 +19,11 @@ if (host_os == "win") {
|
||||
|
||||
# On Windows, the libclang.dll is beside the bindgen.exe, otherwise it is in
|
||||
# ../lib.
|
||||
-_libclang_path = rust_bindgen_root
|
||||
+_libclang_path = clang_base_path
|
||||
if (host_os == "win") {
|
||||
_libclang_path += "/bin"
|
||||
} else {
|
||||
- _libclang_path += "/lib"
|
||||
+ _libclang_path += "/lib64"
|
||||
}
|
||||
|
||||
# Template to build Rust/C bindings with bindgen.
|
||||
20
chromium-lts/chromium-136-checkversion-nodejs.patch
Normal file
20
chromium-lts/chromium-136-checkversion-nodejs.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
diff -up chromium-136.0.7103.33/third_party/node/node.gni.than chromium-136.0.7103.33/third_party/node/node.gni
|
||||
--- chromium-136.0.7103.33/third_party/node/node.gni.than 2025-04-21 17:53:06.742517984 +0200
|
||||
+++ chromium-136.0.7103.33/third_party/node/node.gni 2025-04-21 17:54:05.452645652 +0200
|
||||
@@ -35,16 +35,5 @@ template("node") {
|
||||
inputs += [ "//third_party/node/mac/node-darwin-x64/bin/node" ]
|
||||
}
|
||||
}
|
||||
-
|
||||
- # Automatically add a dependency to ":check_version" to ensure NodeJS is
|
||||
- # always running the expected version, except when the ':check_version'
|
||||
- # target itself is running in which case it shouldn't depend on itself.
|
||||
- if (get_label_info(":" + target_name, "label_no_toolchain") !=
|
||||
- "//third_party/node:check_version") {
|
||||
- if (!defined(deps)) {
|
||||
- deps = []
|
||||
- }
|
||||
- deps += [ "//third_party/node:check_version" ]
|
||||
- }
|
||||
}
|
||||
}
|
||||
12
chromium-lts/chromium-136-rust-skrifa-build-error.patch
Normal file
12
chromium-lts/chromium-136-rust-skrifa-build-error.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up chromium-136.0.7103.48/third_party/rust/chromium_crates_io/vendor/skrifa-0.29.2/src/glyph_name.rs.than chromium-136.0.7103.48/third_party/rust/chromium_crates_io/vendor/skrifa-0.29.2/src/glyph_name.rs
|
||||
--- chromium-136.0.7103.48/third_party/rust/chromium_crates_io/vendor/skrifa-0.29.2/src/glyph_name.rs.than 2025-04-29 08:36:33.385071420 +0200
|
||||
+++ chromium-136.0.7103.48/third_party/rust/chromium_crates_io/vendor/skrifa-0.29.2/src/glyph_name.rs 2025-04-29 08:42:21.465525421 +0200
|
||||
@@ -94,7 +94,7 @@ impl<'a> GlyphNames<'a> {
|
||||
_ => None,
|
||||
};
|
||||
// If name is empty string, synthesize it
|
||||
- if name.as_ref().is_none_or(|s| s.is_empty()) {
|
||||
+ if name.is_none() || name.as_ref().map_or(false, |s| s.is_empty()) {
|
||||
return Some(GlyphName::synthesize(glyph_id));
|
||||
}
|
||||
Some(name.unwrap_or_else(|| GlyphName::synthesize(glyph_id)))
|
||||
38
chromium-lts/chromium-136-system-brotli.patch
Normal file
38
chromium-lts/chromium-136-system-brotli.patch
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
diff -up chromium-136.0.7103.33/net/filter/brotli_source_stream.cc.system-brotli chromium-136.0.7103.33/net/filter/brotli_source_stream.cc
|
||||
--- chromium-136.0.7103.33/net/filter/brotli_source_stream.cc.system-brotli 2025-04-15 23:18:07.000000000 +0200
|
||||
+++ chromium-136.0.7103.33/net/filter/brotli_source_stream.cc 2025-04-21 11:12:15.771632937 +0200
|
||||
@@ -17,8 +17,8 @@
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "net/base/io_buffer.h"
|
||||
#include "net/filter/source_stream_type.h"
|
||||
-#include "third_party/brotli/include/brotli/decode.h"
|
||||
-#include "third_party/brotli/include/brotli/shared_dictionary.h"
|
||||
+#include <brotli/decode.h>
|
||||
+#include <brotli/shared_dictionary.h>
|
||||
|
||||
namespace net {
|
||||
|
||||
diff -up chromium-136.0.7103.33/net/ssl/cert_compression.cc.system-brotli chromium-136.0.7103.33/net/ssl/cert_compression.cc
|
||||
--- chromium-136.0.7103.33/net/ssl/cert_compression.cc.system-brotli 2025-04-15 23:18:07.000000000 +0200
|
||||
+++ chromium-136.0.7103.33/net/ssl/cert_compression.cc 2025-04-21 11:12:15.775633048 +0200
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "third_party/boringssl/src/include/openssl/ssl.h"
|
||||
|
||||
#if !defined(NET_DISABLE_BROTLI)
|
||||
-#include "third_party/brotli/include/brotli/decode.h"
|
||||
+#include <brotli/decode.h>
|
||||
#endif
|
||||
|
||||
namespace net {
|
||||
diff -up chromium-136.0.7103.33/ui/base/resource/resource_bundle.cc.system-brotli chromium-136.0.7103.33/ui/base/resource/resource_bundle.cc
|
||||
--- chromium-136.0.7103.33/ui/base/resource/resource_bundle.cc.system-brotli 2025-04-15 23:18:07.000000000 +0200
|
||||
+++ chromium-136.0.7103.33/ui/base/resource/resource_bundle.cc 2025-04-21 11:19:08.136223039 +0200
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "build/build_config.h"
|
||||
#include "net/filter/gzip_header.h"
|
||||
#include "skia/ext/image_operations.h"
|
||||
-#include "third_party/brotli/include/brotli/decode.h"
|
||||
+#include <brotli/decode.h>
|
||||
#include "third_party/skia/include/codec/SkPngDecoder.h"
|
||||
#include "third_party/skia/include/core/SkBitmap.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
17
chromium-lts/chromium-136-unsupport-clang-flags.patch
Normal file
17
chromium-lts/chromium-136-unsupport-clang-flags.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
diff -up chromium-136.0.7103.48/build/config/compiler/BUILD.gn.than chromium-136.0.7103.48/build/config/compiler/BUILD.gn
|
||||
--- chromium-136.0.7103.48/build/config/compiler/BUILD.gn.than 2025-04-28 15:44:08.883499599 +0200
|
||||
+++ chromium-136.0.7103.48/build/config/compiler/BUILD.gn 2025-04-28 15:44:47.624639772 +0200
|
||||
@@ -622,12 +622,6 @@ config("compiler") {
|
||||
cflags += [ "-ffp-contract=off" ]
|
||||
}
|
||||
|
||||
- # Enable ELF CREL (see crbug.com/357878242) for all platforms that use ELF
|
||||
- # (excluding toolchains that use an older version of LLVM).
|
||||
- if (is_linux && !llvm_android_mainline &&
|
||||
- default_toolchain != "//build/toolchain/cros:target") {
|
||||
- cflags += [ "-Wa,--crel,--allow-experimental-crel" ]
|
||||
- }
|
||||
}
|
||||
|
||||
# C11/C++11 compiler flags setup.
|
||||
diff -up chromium-136.0.7103.48/tools/licenses/licenses.py.than chromium-136.0.7103.48/tools/licenses/licenses.py
|
||||
23
chromium-lts/chromium-138-checkversion-nodejs.patch
Normal file
23
chromium-lts/chromium-138-checkversion-nodejs.patch
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
diff -up chromium-138.0.7204.15/third_party/node/node.gni.me chromium-138.0.7204.15/third_party/node/node.gni
|
||||
--- chromium-138.0.7204.15/third_party/node/node.gni.me 2025-06-03 23:20:09.000000000 +0200
|
||||
+++ chromium-138.0.7204.15/third_party/node/node.gni 2025-06-09 09:59:21.788545159 +0200
|
||||
@@ -44,7 +44,6 @@ template("node") {
|
||||
if (!defined(deps)) {
|
||||
deps = []
|
||||
}
|
||||
- deps += [ "//third_party/node:check_version" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
diff -up chromium-138.0.7204.15/third_party/node/BUILD.gn.me chromium-138.0.7204.15/third_party/node/BUILD.gn
|
||||
diff -up chromium-138.0.7204.15/third_party/protobuf/proto_library.gni.me chromium-138.0.7204.15/third_party/protobuf/proto_library.gni
|
||||
--- chromium-138.0.7204.15/third_party/protobuf/proto_library.gni.me 2025-06-09 11:33:08.279645775 +0200
|
||||
+++ chromium-138.0.7204.15/third_party/protobuf/proto_library.gni 2025-06-09 12:10:07.040045476 +0200
|
||||
@@ -562,7 +562,6 @@ template("proto_library") {
|
||||
_protoc_gen_ts_path,
|
||||
"//tools/protoc_wrapper/protoc-gen-ts_proto.py",
|
||||
] + _protoc_gen_ts_runtime_deps
|
||||
- deps += [ "//third_party/node:check_version" ]
|
||||
}
|
||||
|
||||
if (_generate_with_plugin) {
|
||||
13
chromium-lts/chromium-138-clang++-unknown-argument.patch
Normal file
13
chromium-lts/chromium-138-clang++-unknown-argument.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff -up chromium-137.0.7151.55/build/config/compiler/BUILD.gn.me chromium-137.0.7151.55/build/config/compiler/BUILD.gn
|
||||
--- chromium-137.0.7151.55/build/config/compiler/BUILD.gn.me 2025-05-28 11:19:37.795916619 +0200
|
||||
+++ chromium-137.0.7151.55/build/config/compiler/BUILD.gn 2025-05-28 11:22:56.845410531 +0200
|
||||
@@ -2053,9 +2046,6 @@ config("default_warnings") {
|
||||
|
||||
# TODO(crbug.com/40284799): Fix and re-enable.
|
||||
"-Wno-thread-safety-reference-return",
|
||||
-
|
||||
- # TODO(crbug.com/376641662): Fix and re-enable.
|
||||
- "-Wno-nontrivial-memcall",
|
||||
]
|
||||
|
||||
cflags_cc += [
|
||||
158
chromium-lts/chromium-138-el9-ffmpeg-deprecated-apis.patch
Normal file
158
chromium-lts/chromium-138-el9-ffmpeg-deprecated-apis.patch
Normal file
|
|
@ -0,0 +1,158 @@
|
|||
https://chromium-review.googlesource.com/c/chromium/src/+/6506529
|
||||
|
||||
Revert CL rolls ffmpeg for M138 as it breaks the build due to old ffmpeg version on EL9
|
||||
|
||||
diff -up chromium-138.0.7204.49/media/ffmpeg/ffmpeg_common.cc.me chromium-138.0.7204.49/media/ffmpeg/ffmpeg_common.cc
|
||||
--- chromium-138.0.7204.49/media/ffmpeg/ffmpeg_common.cc.me 2025-06-23 23:34:26.000000000 +0200
|
||||
+++ chromium-138.0.7204.49/media/ffmpeg/ffmpeg_common.cc 2025-06-25 15:13:17.958054182 +0200
|
||||
@@ -263,22 +263,22 @@ AVCodecID VideoCodecToCodecID(VideoCodec
|
||||
static VideoCodecProfile ProfileIDToVideoCodecProfile(int profile) {
|
||||
// Clear out the CONSTRAINED & INTRA flags which are strict subsets of the
|
||||
// corresponding profiles with which they're used.
|
||||
- profile &= ~AV_PROFILE_H264_CONSTRAINED;
|
||||
- profile &= ~AV_PROFILE_H264_INTRA;
|
||||
+ profile &= ~FF_PROFILE_H264_CONSTRAINED;
|
||||
+ profile &= ~FF_PROFILE_H264_INTRA;
|
||||
switch (profile) {
|
||||
- case AV_PROFILE_H264_BASELINE:
|
||||
+ case FF_PROFILE_H264_BASELINE:
|
||||
return H264PROFILE_BASELINE;
|
||||
- case AV_PROFILE_H264_MAIN:
|
||||
+ case FF_PROFILE_H264_MAIN:
|
||||
return H264PROFILE_MAIN;
|
||||
- case AV_PROFILE_H264_EXTENDED:
|
||||
+ case FF_PROFILE_H264_EXTENDED:
|
||||
return H264PROFILE_EXTENDED;
|
||||
- case AV_PROFILE_H264_HIGH:
|
||||
+ case FF_PROFILE_H264_HIGH:
|
||||
return H264PROFILE_HIGH;
|
||||
- case AV_PROFILE_H264_HIGH_10:
|
||||
+ case FF_PROFILE_H264_HIGH_10:
|
||||
return H264PROFILE_HIGH10PROFILE;
|
||||
- case AV_PROFILE_H264_HIGH_422:
|
||||
+ case FF_PROFILE_H264_HIGH_422:
|
||||
return H264PROFILE_HIGH422PROFILE;
|
||||
- case AV_PROFILE_H264_HIGH_444_PREDICTIVE:
|
||||
+ case FF_PROFILE_H264_HIGH_444_PREDICTIVE:
|
||||
return H264PROFILE_HIGH444PREDICTIVEPROFILE;
|
||||
default:
|
||||
DVLOG(1) << "Unknown profile id: " << profile;
|
||||
@@ -289,23 +289,23 @@ static VideoCodecProfile ProfileIDToVide
|
||||
static int VideoCodecProfileToProfileID(VideoCodecProfile profile) {
|
||||
switch (profile) {
|
||||
case H264PROFILE_BASELINE:
|
||||
- return AV_PROFILE_H264_BASELINE;
|
||||
+ return FF_PROFILE_H264_BASELINE;
|
||||
case H264PROFILE_MAIN:
|
||||
- return AV_PROFILE_H264_MAIN;
|
||||
+ return FF_PROFILE_H264_MAIN;
|
||||
case H264PROFILE_EXTENDED:
|
||||
- return AV_PROFILE_H264_EXTENDED;
|
||||
+ return FF_PROFILE_H264_EXTENDED;
|
||||
case H264PROFILE_HIGH:
|
||||
- return AV_PROFILE_H264_HIGH;
|
||||
+ return FF_PROFILE_H264_HIGH;
|
||||
case H264PROFILE_HIGH10PROFILE:
|
||||
- return AV_PROFILE_H264_HIGH_10;
|
||||
+ return FF_PROFILE_H264_HIGH_10;
|
||||
case H264PROFILE_HIGH422PROFILE:
|
||||
- return AV_PROFILE_H264_HIGH_422;
|
||||
+ return FF_PROFILE_H264_HIGH_422;
|
||||
case H264PROFILE_HIGH444PREDICTIVEPROFILE:
|
||||
- return AV_PROFILE_H264_HIGH_444_PREDICTIVE;
|
||||
+ return FF_PROFILE_H264_HIGH_444_PREDICTIVE;
|
||||
default:
|
||||
DVLOG(1) << "Unknown VideoCodecProfile: " << profile;
|
||||
}
|
||||
- return AV_PROFILE_UNKNOWN;
|
||||
+ return FF_PROFILE_UNKNOWN;
|
||||
}
|
||||
|
||||
SampleFormat AVSampleFormatToSampleFormat(AVSampleFormat sample_format,
|
||||
@@ -441,7 +441,7 @@ bool AVCodecContextToAudioDecoderConfig(
|
||||
// TODO(dalecurtis): Just use the profile from the codec context if ffmpeg
|
||||
// ever starts supporting xHE-AAC.
|
||||
// FFmpeg provides the (defined_profile - 1) for AVCodecContext::profile
|
||||
- if (codec_context->profile == AV_PROFILE_UNKNOWN ||
|
||||
+ if (codec_context->profile == FF_PROFILE_UNKNOWN ||
|
||||
codec_context->profile == mp4::AAC::kXHeAAcType - 1) {
|
||||
// Errors aren't fatal here, so just drop any MediaLog messages.
|
||||
NullMediaLog media_log;
|
||||
@@ -659,16 +659,16 @@ bool AVStreamToVideoDecoderConfig(const
|
||||
break;
|
||||
case VideoCodec::kVP9:
|
||||
switch (codec_context->profile) {
|
||||
- case AV_PROFILE_VP9_0:
|
||||
+ case FF_PROFILE_VP9_0:
|
||||
profile = VP9PROFILE_PROFILE0;
|
||||
break;
|
||||
- case AV_PROFILE_VP9_1:
|
||||
+ case FF_PROFILE_VP9_1:
|
||||
profile = VP9PROFILE_PROFILE1;
|
||||
break;
|
||||
- case AV_PROFILE_VP9_2:
|
||||
+ case FF_PROFILE_VP9_2:
|
||||
profile = VP9PROFILE_PROFILE2;
|
||||
break;
|
||||
- case AV_PROFILE_VP9_3:
|
||||
+ case FF_PROFILE_VP9_3:
|
||||
profile = VP9PROFILE_PROFILE3;
|
||||
break;
|
||||
default:
|
||||
diff -up chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter.cc.me chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter.cc
|
||||
--- chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter.cc.me 2025-06-23 23:34:26.000000000 +0200
|
||||
+++ chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter.cc 2025-06-25 15:13:17.958541707 +0200
|
||||
@@ -68,17 +68,17 @@ bool GenerateAdtsHeader(int codec,
|
||||
hdr[1] |= 1;
|
||||
|
||||
switch (audio_profile) {
|
||||
- case AV_PROFILE_AAC_MAIN:
|
||||
+ case FF_PROFILE_AAC_MAIN:
|
||||
break;
|
||||
- case AV_PROFILE_AAC_HE:
|
||||
- case AV_PROFILE_AAC_HE_V2:
|
||||
- case AV_PROFILE_AAC_LOW:
|
||||
+ case FF_PROFILE_AAC_HE:
|
||||
+ case FF_PROFILE_AAC_HE_V2:
|
||||
+ case FF_PROFILE_AAC_LOW:
|
||||
hdr[2] |= (1 << 6);
|
||||
break;
|
||||
- case AV_PROFILE_AAC_SSR:
|
||||
+ case FF_PROFILE_AAC_SSR:
|
||||
hdr[2] |= (2 << 6);
|
||||
break;
|
||||
- case AV_PROFILE_AAC_LTP:
|
||||
+ case FF_PROFILE_AAC_LTP:
|
||||
hdr[2] |= (3 << 6);
|
||||
break;
|
||||
default:
|
||||
diff -up chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc.me chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
|
||||
--- chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc.me 2025-06-23 23:34:26.000000000 +0200
|
||||
+++ chromium-138.0.7204.49/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc 2025-06-25 15:13:17.958839001 +0200
|
||||
@@ -41,7 +41,7 @@ class FFmpegAACBitstreamConverterTest :
|
||||
// Set up reasonable aac parameters
|
||||
memset(&test_parameters_, 0, sizeof(AVCodecParameters));
|
||||
test_parameters_.codec_id = AV_CODEC_ID_AAC;
|
||||
- test_parameters_.profile = AV_PROFILE_AAC_MAIN;
|
||||
+ test_parameters_.profile = FF_PROFILE_AAC_MAIN;
|
||||
test_parameters_.ch_layout.nb_channels = 2;
|
||||
test_parameters_.extradata = extradata_header_;
|
||||
test_parameters_.extradata_size = sizeof(extradata_header_);
|
||||
@@ -131,7 +131,7 @@ TEST_F(FFmpegAACBitstreamConverterTest,
|
||||
|
||||
EXPECT_EQ(profile, kAacMainProfile);
|
||||
|
||||
- test_parameters_.profile = AV_PROFILE_AAC_HE;
|
||||
+ test_parameters_.profile = FF_PROFILE_AAC_HE;
|
||||
FFmpegAACBitstreamConverter converter_he(&test_parameters_);
|
||||
|
||||
test_packet = ScopedAVPacket::Allocate();
|
||||
@@ -143,7 +143,7 @@ TEST_F(FFmpegAACBitstreamConverterTest,
|
||||
|
||||
EXPECT_EQ(profile, kAacLowComplexityProfile);
|
||||
|
||||
- test_parameters_.profile = AV_PROFILE_AAC_ELD;
|
||||
+ test_parameters_.profile = FF_PROFILE_AAC_ELD;
|
||||
FFmpegAACBitstreamConverter converter_eld(&test_parameters_);
|
||||
|
||||
test_packet = ScopedAVPacket::Allocate();
|
||||
20
chromium-lts/chromium-98.0.4758.102-remoting-no-tests.patch
Normal file
20
chromium-lts/chromium-98.0.4758.102-remoting-no-tests.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
diff -up chromium-98.0.4758.102/remoting/BUILD.gn.remoting-no-tests chromium-98.0.4758.102/remoting/BUILD.gn
|
||||
--- chromium-98.0.4758.102/remoting/BUILD.gn.remoting-no-tests 2022-02-28 19:15:23.835872267 +0000
|
||||
+++ chromium-98.0.4758.102/remoting/BUILD.gn 2022-03-01 17:55:50.625536957 +0000
|
||||
@@ -8,7 +8,7 @@ import("//remoting/build/config/remoting
|
||||
group("remoting_all") {
|
||||
testonly = true
|
||||
|
||||
- deps = [ ":remoting_unittests" ]
|
||||
+ deps = [ ]
|
||||
|
||||
if (is_win) {
|
||||
deps += [
|
||||
@@ -37,7 +37,6 @@ group("remoting_all") {
|
||||
|
||||
if (enable_remoting_host) {
|
||||
deps += [
|
||||
- ":remoting_perftests",
|
||||
"//remoting/host",
|
||||
]
|
||||
|
||||
36
chromium-lts/chromium-browser.appdata.xml
Normal file
36
chromium-lts/chromium-browser.appdata.xml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<!-- Copyright 2017 The Chromium Authors -->
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop">
|
||||
<id>chromium-browser.desktop</id>
|
||||
<update_contact>chromium-dev@chromium.org</update_contact>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>BSD-3-Clause and LGPL-2.1+ and Apache-2.0 and IJG and MIT and GPL-2.0+ and ISC and OpenSSL and (MPL-1.1 or GPL-2.0 or LGPL-2.0)</project_license>
|
||||
<name>Chromium Web Browser</name>
|
||||
<summary>The web browser from Chromium project</summary>
|
||||
<description>
|
||||
<p>
|
||||
Chromium is an open-source browser project that aims to build a safer, faster,
|
||||
and more stable way to experience the web.
|
||||
</p>
|
||||
<p>
|
||||
We invite you to join our effort to build a powerful platform for developing a
|
||||
new generation of web applications.
|
||||
</p>
|
||||
<p>
|
||||
Chromium supports Vorbis, Theora, WebM and HTML5 audio and video standards, but
|
||||
does not include the non-free AAC, H.264, MP3 or Adobe Flash code that is found
|
||||
in Chrome.
|
||||
</p>
|
||||
</description>
|
||||
<url type="homepage">https://www.chromium.org/Home</url>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image>https://www.gstatic.com/chrome/appstream/chrome-2.png</image>
|
||||
<caption/>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<translation/>
|
||||
<developer_name>The Chromium Authors</developer_name>
|
||||
<url type="bugtracker">https://www.chromium.org/for-testers/bug-reporting-guidelines</url>
|
||||
<url type="help">https://chromium.googlesource.com/chromium/src/+/main/docs/linux/debugging.md</url>
|
||||
</component>
|
||||
356
chromium-lts/chromium-browser.desktop
Normal file
356
chromium-lts/chromium-browser.desktop
Normal file
|
|
@ -0,0 +1,356 @@
|
|||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Name=Chromium Web Browser
|
||||
Name[ast]=Restolador web Chromium
|
||||
Name[ca]=Navegador web Chromium
|
||||
Name[de]=Chromium-Webbrowser
|
||||
Name[es]=Navegador web Chromium
|
||||
Name[fr]=Navigateur Web Chromium
|
||||
Name[gl]=Navegador web Chromium
|
||||
Name[he]=דפדפן האינטרנט Chromium
|
||||
Name[hr]=Chromium web preglednik
|
||||
Name[hu]=Chromium webböngésző
|
||||
Name[id]=Peramban Web Chromium
|
||||
Name[it]=Browser web Chromium
|
||||
Name[ja]=Chromium ウェブ・ブラウザ
|
||||
Name[ko]=Chromium 웹 브라우저
|
||||
Name[pt_BR]=Chromium Navegador da Internet
|
||||
Name[ru]=Веб-браузер Chromium
|
||||
Name[sl]=Chromium spletni brskalnik
|
||||
Name[sv]=Webbläsaren Chromium
|
||||
Name[ug]=Chromium توركۆرگۈ
|
||||
Name[zh_CN]=Chromium 网页浏览器
|
||||
Name[zh_HK]=Chromium 網頁瀏覽器
|
||||
Name[zh_TW]=Chromium 網頁瀏覽器
|
||||
Comment=Access the Internet
|
||||
Comment[ar]=الدخول إلى الإنترنت
|
||||
Comment[ast]=Accesu a Internet
|
||||
Comment[bg]=Достъп до интернет
|
||||
Comment[bn]=ইন্টারনেটটি অ্যাক্সেস করুন
|
||||
Comment[ca]=Accediu a Internet
|
||||
Comment[cs]=Přístup k internetu
|
||||
Comment[da]=Få adgang til internettet
|
||||
Comment[de]=Internetzugriff
|
||||
Comment[el]=Πρόσβαση στο Διαδίκτυο
|
||||
Comment[en_GB]=Access the Internet
|
||||
Comment[es]=Acceda a Internet
|
||||
Comment[et]=Pääs Internetti
|
||||
Comment[fi]=Käytä internetiä
|
||||
Comment[fil]=I-access ang Internet
|
||||
Comment[fr]=Explorer le Web
|
||||
Comment[gl]=Acceda a Internet
|
||||
Comment[gu]=ઇંટરનેટ ઍક્સેસ કરો
|
||||
Comment[he]=גישה לאינטרנט
|
||||
Comment[hi]=इंटरनेट तक पहुंच स्थापित करें
|
||||
Comment[hr]=Pristupite Internetu
|
||||
Comment[hu]=Az internet elérése
|
||||
Comment[id]=Akses Internet
|
||||
Comment[it]=Accesso a Internet
|
||||
Comment[ja]=インターネットにアクセス
|
||||
Comment[kn]=ಇಂಟರ್ನೆಟ್ ಅನ್ನು ಪ್ರವೇಶಿಸಿs
|
||||
Comment[ko]=인터넷에 연결합니다
|
||||
Comment[lt]=Interneto prieiga
|
||||
Comment[lv]=Piekļūt internetam
|
||||
Comment[ml]=ഇന്റര്നെറ്റ് ആക്സസ് ചെയ്യുക
|
||||
Comment[mr]=इंटरनेटमध्ये प्रवेश करा
|
||||
Comment[nb]=Gå til Internett
|
||||
Comment[nl]=Verbinding maken met internet
|
||||
Comment[or]=ଇଣ୍ଟର୍ନେଟ୍ ପ୍ରବେଶ କରନ୍ତୁ
|
||||
Comment[pl]=Skorzystaj z internetu
|
||||
Comment[pt]=Aceder à Internet
|
||||
Comment[pt_BR]=Acessar a internet
|
||||
Comment[ro]=Accesaţi Internetul
|
||||
Comment[ru]=Доступ в Интернет
|
||||
Comment[sk]=Prístup do siete Internet
|
||||
Comment[sl]=Dostop do interneta
|
||||
Comment[sr]=Приступите Интернету
|
||||
Comment[sv]=Surfa på Internet
|
||||
Comment[ta]=இணையத்தை அணுகுதல்
|
||||
Comment[te]=ఇంటర్నెట్ను ఆక్సెస్ చెయ్యండి
|
||||
Comment[th]=เข้าถึงอินเทอร์เน็ต
|
||||
Comment[tr]=İnternet'e erişin
|
||||
Comment[ug]=ئىنتېرنېتنى زىيارەت قىلىش
|
||||
Comment[uk]=Доступ до Інтернету
|
||||
Comment[vi]=Truy cập Internet
|
||||
Comment[zh_CN]=访问互联网
|
||||
Comment[zh_HK]=連線到網際網路
|
||||
Comment[zh_TW]=連線到網際網路
|
||||
GenericName=Web Browser
|
||||
GenericName[ar]=متصفح الشبكة
|
||||
GenericName[ast]=Restolador web
|
||||
GenericName[bg]=Уеб браузър
|
||||
GenericName[bn]=ওয়েব ব্রাউজার
|
||||
GenericName[ca]=Navegador web
|
||||
GenericName[cs]=WWW prohlížeč
|
||||
GenericName[da]=Browser
|
||||
GenericName[de]=Web-Browser
|
||||
GenericName[el]=Περιηγητής ιστού
|
||||
GenericName[en_GB]=Web Browser
|
||||
GenericName[es]=Navegador web
|
||||
GenericName[et]=Veebibrauser
|
||||
GenericName[fi]=WWW-selain
|
||||
GenericName[fil]=Web Browser
|
||||
GenericName[fr]=Navigateur Web
|
||||
GenericName[gl]=Navegador web
|
||||
GenericName[gu]=વેબ બ્રાઉઝર
|
||||
GenericName[he]=דפדפן אינטרנט
|
||||
GenericName[hi]=वेब ब्राउज़र
|
||||
GenericName[hr]=Web preglednik
|
||||
GenericName[hu]=Webböngésző
|
||||
GenericName[id]=Peramban Web
|
||||
GenericName[it]=Browser web
|
||||
GenericName[ja]=ウェブ・ブラウザ
|
||||
GenericName[kn]=ಜಾಲ ವೀಕ್ಷಕ
|
||||
GenericName[ko]=웹 브라우저
|
||||
GenericName[lt]=Žiniatinklio naršyklė
|
||||
GenericName[lv]=Tīmekļa pārlūks
|
||||
GenericName[ml]=വെബ് ബ്രൌസര്
|
||||
GenericName[mr]=वेब ब्राऊजर
|
||||
GenericName[nb]=Nettleser
|
||||
GenericName[nl]=Webbrowser
|
||||
GenericName[or]=ଓ୍ବେବ ବ୍ରାଉଜର
|
||||
GenericName[pl]=Przeglądarka WWW
|
||||
GenericName[pt]=Navegador Web
|
||||
GenericName[pt_BR]=Navegador da Internet
|
||||
GenericName[ro]=Navigator de Internet
|
||||
GenericName[ru]=Веб-браузер
|
||||
GenericName[sk]=WWW prehliadač
|
||||
GenericName[sl]=Spletni brskalnik
|
||||
GenericName[sr]=Интернет прегледник
|
||||
GenericName[sv]=Webbläsare
|
||||
GenericName[ta]=இணைய உலாவி
|
||||
GenericName[te]=మహాతల అన్వేషి
|
||||
GenericName[th]=เว็บเบราว์เซอร์
|
||||
GenericName[tr]=Web Tarayıcı
|
||||
GenericName[ug]=توركۆرگۈ
|
||||
GenericName[uk]=Навігатор Тенет
|
||||
GenericName[vi]=Bộ duyệt Web
|
||||
GenericName[zh_CN]=网页浏览器
|
||||
GenericName[zh_HK]=網頁瀏覽器
|
||||
GenericName[zh_TW]=網頁瀏覽器
|
||||
Exec=/usr/bin/chromium-browser %U
|
||||
Terminal=false
|
||||
X-MultipleArgs=false
|
||||
Type=Application
|
||||
Icon=chromium-browser
|
||||
Categories=Network;WebBrowser;
|
||||
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;
|
||||
StartupWMClass=Chromium-browser
|
||||
Keywords=web;browser;internet;
|
||||
Actions=new-window;new-private-window;
|
||||
|
||||
[Desktop Action new-window]
|
||||
Name=Open a New Window
|
||||
Name[ach]=Dirica manyen
|
||||
Name[af]=Nuwe venster
|
||||
Name[an]=Nueva finestra
|
||||
Name[ar]=نافذة جديدة
|
||||
Name[as]=নতুন উইন্ডো
|
||||
Name[ast]=Ventana nueva
|
||||
Name[az]=Yeni Pəncərə
|
||||
Name[be]=Новае акно
|
||||
Name[bg]=Нов прозорец
|
||||
Name[bn_BD]=নতুন উইন্ডো (N)
|
||||
Name[bn_IN]=নতুন উইন্ডো
|
||||
Name[br]=Prenestr nevez
|
||||
Name[brx]=गोदान उइन्ड'(N)
|
||||
Name[bs]=Novi prozor
|
||||
Name[ca]=Finestra nova
|
||||
Name[cak]=K'ak'a' tzuwäch
|
||||
Name[cs]=Nové okno
|
||||
Name[cy]=Ffenestr Newydd
|
||||
Name[da]=Nyt vindue
|
||||
Name[de]=Neues Fenster
|
||||
Name[dsb]=Nowe wokno
|
||||
Name[el]=Νέο παράθυρο
|
||||
Name[en_GB]=New Window
|
||||
Name[en_US]=New Window
|
||||
Name[en_ZA]=New Window
|
||||
Name[eo]=Nova fenestro
|
||||
Name[es_AR]=Nueva ventana
|
||||
Name[es_CL]=Nueva ventana
|
||||
Name[es_ES]=Nueva ventana
|
||||
Name[es_MX]=Nueva ventana
|
||||
Name[et]=Uus aken
|
||||
Name[eu]=Leiho berria
|
||||
Name[fa]=پنجره جدید
|
||||
Name[ff]=Henorde Hesere
|
||||
Name[fi]=Uusi ikkuna
|
||||
Name[fr]=Nouvelle fenêtre
|
||||
Name[fy_NL]=Nij finster
|
||||
Name[ga_IE]=Fuinneog Nua
|
||||
Name[gd]=Uinneag ùr
|
||||
Name[gl]=Nova xanela
|
||||
Name[gn]=Ovetã pyahu
|
||||
Name[gu_IN]=નવી વિન્ડો
|
||||
Name[he]=חלון חדש
|
||||
Name[hi_IN]=नया विंडो
|
||||
Name[hr]=Novi prozor
|
||||
Name[hsb]=Nowe wokno
|
||||
Name[hu]=Új ablak
|
||||
Name[hy_AM]=Նոր Պատուհան
|
||||
Name[id]=Jendela Baru
|
||||
Name[is]=Nýr gluggi
|
||||
Name[it]=Nuova finestra
|
||||
Name[ja]=新しいウィンドウ
|
||||
Name[ja_JP@mac]=新規ウインドウ
|
||||
Name[ka]=ახალი ფანჯარა
|
||||
Name[kk]=Жаңа терезе
|
||||
Name[km]=បង្អួចថ្មី
|
||||
Name[kn]=ಹೊಸ ಕಿಟಕಿ
|
||||
Name[ko]=새 창
|
||||
Name[kok]=नवें जनेल
|
||||
Name[ks]=نئئ وِنڈو
|
||||
Name[lij]=Neuvo barcon
|
||||
Name[lo]=ຫນ້າຕ່າງໃຫມ່
|
||||
Name[lt]=Naujas langas
|
||||
Name[ltg]=Jauns lūgs
|
||||
Name[lv]=Jauns logs
|
||||
Name[mai]=नव विंडो
|
||||
Name[mk]=Нов прозорец
|
||||
Name[ml]=പുതിയ ജാലകം
|
||||
Name[mr]=नवीन पटल
|
||||
Name[ms]=Tetingkap Baru
|
||||
Name[my]=ဝင်းဒိုးအသစ်
|
||||
Name[nb_NO]=Nytt vindu
|
||||
Name[ne_NP]=नयाँ सञ्झ्याल
|
||||
Name[nl]=Nieuw venster
|
||||
Name[nn_NO]=Nytt vindauge
|
||||
Name[or]=ନୂତନ ୱିଣ୍ଡୋ
|
||||
Name[pa_IN]=ਨਵੀਂ ਵਿੰਡੋ
|
||||
Name[pl]=Nowe okno
|
||||
Name[pt_BR]=Nova janela
|
||||
Name[pt_PT]=Nova janela
|
||||
Name[rm]=Nova fanestra
|
||||
Name[ro]=Fereastră nouă
|
||||
Name[ru]=Новое окно
|
||||
Name[sat]=नावा विंडो (N)
|
||||
Name[si]=නව කවුළුවක්
|
||||
Name[sk]=Nové okno
|
||||
Name[sl]=Novo okno
|
||||
Name[son]=Zanfun taaga
|
||||
Name[sq]=Dritare e Re
|
||||
Name[sr]=Нови прозор
|
||||
Name[sv_SE]=Nytt fönster
|
||||
Name[ta]=புதிய சாளரம்
|
||||
Name[te]=కొత్త విండో
|
||||
Name[th]=หน้าต่างใหม่
|
||||
Name[tr]=Yeni pencere
|
||||
Name[tsz]=Eraatarakua jimpani
|
||||
Name[uk]=Нове вікно
|
||||
Name[ur]=نیا دریچہ
|
||||
Name[uz]=Yangi oyna
|
||||
Name[vi]=Cửa sổ mới
|
||||
Name[wo]=Palanteer bu bees
|
||||
Name[xh]=Ifestile entsha
|
||||
Name[zh_CN]=新建窗口
|
||||
Name[zh_TW]=開新視窗
|
||||
Exec=chromium-browser %U
|
||||
|
||||
[Desktop Action new-private-window]
|
||||
Name=Open a New Private Window
|
||||
Name[ach]=Dirica manyen me mung
|
||||
Name[af]=Nuwe privaatvenster
|
||||
Name[an]=Nueva finestra privada
|
||||
Name[ar]=نافذة خاصة جديدة
|
||||
Name[as]=নতুন ব্যক্তিগত উইন্ডো
|
||||
Name[ast]=Ventana privada nueva
|
||||
Name[az]=Yeni Məxfi Pəncərə
|
||||
Name[be]=Новае акно адасаблення
|
||||
Name[bg]=Нов прозорец за поверително сърфиране
|
||||
Name[bn_BD]=নতুন ব্যক্তিগত উইন্ডো
|
||||
Name[bn_IN]=নতুন ব্যক্তিগত উইন্ডো
|
||||
Name[br]=Prenestr merdeiñ prevez nevez
|
||||
Name[brx]=गोदान प्राइभेट उइन्ड'
|
||||
Name[bs]=Novi privatni prozor
|
||||
Name[ca]=Finestra privada nova
|
||||
Name[cak]=K'ak'a' ichinan tzuwäch
|
||||
Name[cs]=Nové anonymní okno
|
||||
Name[cy]=Ffenestr Breifat Newydd
|
||||
Name[da]=Nyt privat vindue
|
||||
Name[de]=Neues privates Fenster
|
||||
Name[dsb]=Nowe priwatne wokno
|
||||
Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης
|
||||
Name[en_GB]=New Private Window
|
||||
Name[en_US]=New Private Window
|
||||
Name[en_ZA]=New Private Window
|
||||
Name[eo]=Nova privata fenestro
|
||||
Name[es_AR]=Nueva ventana privada
|
||||
Name[es_CL]=Nueva ventana privada
|
||||
Name[es_ES]=Nueva ventana privada
|
||||
Name[es_MX]=Nueva ventana privada
|
||||
Name[et]=Uus privaatne aken
|
||||
Name[eu]=Leiho pribatu berria
|
||||
Name[fa]=پنجره ناشناس جدید
|
||||
Name[ff]=Henorde Suturo Hesere
|
||||
Name[fi]=Uusi yksityinen ikkuna
|
||||
Name[fr]=Nouvelle fenêtre de navigation privée
|
||||
Name[fy_NL]=Nij priveefinster
|
||||
Name[ga_IE]=Fuinneog Nua Phríobháideach
|
||||
Name[gd]=Uinneag phrìobhaideach ùr
|
||||
Name[gl]=Nova xanela privada
|
||||
Name[gn]=Ovetã ñemi pyahu
|
||||
Name[gu_IN]=નવી ખાનગી વિન્ડો
|
||||
Name[he]=חלון פרטי חדש
|
||||
Name[hi-IN]=नयी निजी विंडो
|
||||
Name[hr]=Novi privatni prozor
|
||||
Name[hsb]=Nowe priwatne wokno
|
||||
Name[hu]=Új privát ablak
|
||||
Name[hy_AM]=Սկսել Գաղտնի դիտարկում
|
||||
Name[id]=Jendela Mode Pribadi Baru
|
||||
Name[is]=Nýr huliðsgluggi
|
||||
Name[it]=Nuova finestra anonima
|
||||
Name[ja]=新しいプライベートウィンドウ
|
||||
Name[ja_JP@mac]=新規プライベートウインドウ
|
||||
Name[ka]=ახალი პირადი ფანჯარა
|
||||
Name[kk]=Жаңа жекелік терезе
|
||||
Name[km]=បង្អួចឯកជនថ្មី
|
||||
Name[kn]=ಹೊಸ ಖಾಸಗಿ ಕಿಟಕಿ
|
||||
Name[ko]=새 사생활 보호 모드
|
||||
Name[kok]=नवो खाजगी विंडो
|
||||
Name[ks]=نْو پرایوٹ وینڈو&
|
||||
Name[lij]=Neuvo barcon privou
|
||||
Name[lo]=ເປີດຫນ້າຕ່າງສວນຕົວຂື້ນມາໃຫມ່
|
||||
Name[lt]=Naujas privataus naršymo langas
|
||||
Name[ltg]=Jauns privatais lūgs
|
||||
Name[lv]=Jauns privātais logs
|
||||
Name[mai]=नया निज विंडो (W)
|
||||
Name[mk]=Нов приватен прозорец
|
||||
Name[ml]=പുതിയ സ്വകാര്യ ജാലകം
|
||||
Name[mr]=नवीन वैयक्तिक पटल
|
||||
Name[ms]=Tetingkap Persendirian Baharu
|
||||
Name[my]=New Private Window
|
||||
Name[nb_NO]=Nytt privat vindu
|
||||
Name[ne_NP]=नयाँ निजी सञ्झ्याल
|
||||
Name[nl]=Nieuw privévenster
|
||||
Name[nn_NO]=Nytt privat vindauge
|
||||
Name[or]=ନୂତନ ବ୍ୟକ୍ତିଗତ ୱିଣ୍ଡୋ
|
||||
Name[pa_IN]=ਨਵੀਂ ਪ੍ਰਾਈਵੇਟ ਵਿੰਡੋ
|
||||
Name[pl]=Nowe okno prywatne
|
||||
Name[pt_BR]=Nova janela privativa
|
||||
Name[pt_PT]=Nova janela privada
|
||||
Name[rm]=Nova fanestra privata
|
||||
Name[ro]=Fereastră privată nouă
|
||||
Name[ru]=Новое приватное окно
|
||||
Name[sat]=नावा निजेराक् विंडो (W )
|
||||
Name[si]=නව පුද්ගලික කවුළුව (W)
|
||||
Name[sk]=Nové okno v režime Súkromné prehliadanie
|
||||
Name[sl]=Novo zasebno okno
|
||||
Name[son]=Sutura zanfun taaga
|
||||
Name[sq]=Dritare e Re Private
|
||||
Name[sr]=Нови приватан прозор
|
||||
Name[sv_SE]=Nytt privat fönster
|
||||
Name[ta]=புதிய தனிப்பட்ட சாளரம்
|
||||
Name[te]=కొత్త ఆంతరంగిక విండో
|
||||
Name[th]=หน้าต่างส่วนตัวใหม่
|
||||
Name[tr]=Yeni gizli pencere
|
||||
Name[tsz]=Juchiiti eraatarakua jimpani
|
||||
Name[uk]=Приватне вікно
|
||||
Name[ur]=نیا نجی دریچہ
|
||||
Name[uz]=Yangi maxfiy oyna
|
||||
Name[vi]=Cửa sổ riêng tư mới
|
||||
Name[wo]=Panlanteeru biir bu bees
|
||||
Name[xh]=Ifestile yangasese entsha
|
||||
Name[zh_CN]=新建隐私浏览窗口
|
||||
Name[zh_TW]=新增隱私視窗
|
||||
Exec=chromium-browser --incognito %U
|
||||
51
chromium-lts/chromium-browser.sh
Executable file
51
chromium-lts/chromium-browser.sh
Executable file
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# Let the wrapped binary know that it has been run through the wrapper.
|
||||
export CHROME_WRAPPER="`readlink -f "$0"`"
|
||||
|
||||
HERE="`dirname "$CHROME_WRAPPER"`"
|
||||
|
||||
# We include some xdg utilities next to the binary, and we want to prefer them
|
||||
# over the system versions when we know the system versions are very old. We
|
||||
# detect whether the system xdg utilities are sufficiently new to be likely to
|
||||
# work for us by looking for xdg-settings. If we find it, we leave $PATH alone,
|
||||
# so that the system xdg utilities (including any distro patches) will be used.
|
||||
if ! which xdg-settings &> /dev/null; then
|
||||
# Old xdg utilities. Prepend $HERE to $PATH to use ours instead.
|
||||
export PATH="$HERE:$PATH"
|
||||
else
|
||||
# Use system xdg utilities. But first create mimeapps.list if it doesn't
|
||||
# exist; some systems have bugs in xdg-mime that make it fail without it.
|
||||
xdg_app_dir="${XDG_DATA_HOME:-$HOME/.local/share/applications}"
|
||||
mkdir -p "$xdg_app_dir"
|
||||
[ -f "$xdg_app_dir/mimeapps.list" ] || touch "$xdg_app_dir/mimeapps.list"
|
||||
fi
|
||||
|
||||
export CHROME_VERSION_EXTRA="Built from source for @@BUILD_TARGET@@"
|
||||
|
||||
# We don't want bug-buddy intercepting our crashes. http://crbug.com/24120
|
||||
export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME
|
||||
|
||||
# Allow users to override command-line options and prefer user defined
|
||||
# CHROMIUM_USER_FLAGS from env over system wide CHROMIUM_FLAGS
|
||||
[[ -f /etc/chromium/chromium.conf ]] && . /etc/chromium/chromium.conf
|
||||
CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-$CHROMIUM_FLAGS}
|
||||
|
||||
CHROMIUM_DISTRO_FLAGS=" --enable-plugins \
|
||||
--enable-extensions \
|
||||
--enable-user-scripts \
|
||||
--enable-printing \
|
||||
--enable-sync \
|
||||
--auto-ssl-client-auth @@EXTRA_FLAGS@@"
|
||||
|
||||
# Sanitize std{in,out,err} because they'll be shared with untrusted child
|
||||
# processes (http://crbug.com/376567).
|
||||
exec < /dev/null
|
||||
exec > >(exec cat)
|
||||
exec 2> >(exec cat >&2)
|
||||
|
||||
exec -a "$0" "$HERE/chromium-browser" $CHROMIUM_FLAGS $CHROMIUM_DISTRO_FLAGS "$@"
|
||||
16
chromium-lts/chromium-browser.xml
Normal file
16
chromium-lts/chromium-browser.xml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE default-apps SYSTEM "gnome-da-list.dtd">
|
||||
<default-apps>
|
||||
<web-browsers>
|
||||
<web-browser>
|
||||
<name>Chromium</name>
|
||||
<executable>chromium-browser</executable>
|
||||
<command>/usr/bin/chromium-browser %s</command>
|
||||
<icon-name>chromium-browser</icon-name>
|
||||
<run-in-terminal>false</run-in-terminal>
|
||||
<netscape-remote>true</netscape-remote>
|
||||
<tab-command>/usr/bin/chromium-browser %s</tab-command>
|
||||
<win-command>/usr/bin/chromium-browser --new-window %s</win-command>
|
||||
</web-browser>
|
||||
</web-browsers>
|
||||
</default-apps>
|
||||
26
chromium-lts/chromium-disable-font-tests.patch
Normal file
26
chromium-lts/chromium-disable-font-tests.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
description: disable building font tests
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/skia/BUILD.gn
|
||||
+++ b/skia/BUILD.gn
|
||||
@@ -860,7 +860,7 @@ group("test_fonts_resources") {
|
||||
if (is_apple) {
|
||||
deps += [ ":test_fonts_bundle_data" ]
|
||||
data_deps += [ ":test_fonts_bundle_data" ]
|
||||
- } else {
|
||||
+ } else if (false) {
|
||||
deps += [ "//third_party/test_fonts" ]
|
||||
data_deps += [ "//third_party/test_fonts" ]
|
||||
}
|
||||
--- a/third_party/test_fonts/fontconfig/BUILD.gn
|
||||
+++ b/third_party/test_fonts/fontconfig/BUILD.gn
|
||||
@@ -8,9 +8,7 @@ if (is_linux || is_chromeos) {
|
||||
group("test_support") {
|
||||
testonly = true
|
||||
public_deps = [ ":fontconfig_util_linux" ]
|
||||
- data_deps = [ "//third_party/test_fonts" ]
|
||||
if (current_toolchain == host_toolchain) {
|
||||
- data_deps += [ ":do_generate_fontconfig_caches" ]
|
||||
}
|
||||
}
|
||||
|
||||
366
chromium-lts/chromium-latest.py
Executable file
366
chromium-lts/chromium-latest.py
Executable file
|
|
@ -0,0 +1,366 @@
|
|||
#!/usr/bin/python3
|
||||
# Copyright 2021-2025, Than Ngo <than@redhat.com>
|
||||
# Copyright 2010,2015-2019 Tom Callaway <tcallawa@redhat.com>
|
||||
# Copyright 2013-2016 Tomas Popela <tpopela@redhat.com>
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
try:
|
||||
import argparse
|
||||
optparse = False
|
||||
except ImportError:
|
||||
from optparse import OptionParser
|
||||
optparse = True
|
||||
import csv
|
||||
import glob
|
||||
import hashlib
|
||||
import locale
|
||||
import os
|
||||
import shutil
|
||||
import io
|
||||
import sys
|
||||
import urllib.request, urllib.parse, urllib.error
|
||||
|
||||
chromium_url = "http://commondatastorage.googleapis.com/chromium-browser-official/"
|
||||
|
||||
chromium_root_dir = "."
|
||||
version_string = "stable"
|
||||
|
||||
name = 'Chromium Latest'
|
||||
script_version = 0.9
|
||||
my_description = '{0} {1}'.format(name, script_version)
|
||||
|
||||
|
||||
def dlProgress(count, blockSize, totalSize):
|
||||
|
||||
if (totalSize <= blockSize):
|
||||
percent = int(count * 100)
|
||||
else:
|
||||
percent = int(count * blockSize * 100 / totalSize)
|
||||
sys.stdout.write("\r" + "Downloading ... %d%%" % percent)
|
||||
sys.stdout.flush()
|
||||
|
||||
|
||||
def delete_chromium_dir(ch_dir):
|
||||
|
||||
full_dir = "%s/%s" % (latest_dir, ch_dir)
|
||||
print('Deleting %s ' % full_dir)
|
||||
if os.path.isdir(full_dir):
|
||||
shutil.rmtree(full_dir)
|
||||
print('[DONE]')
|
||||
else:
|
||||
print('[NOT FOUND]')
|
||||
|
||||
|
||||
def delete_chromium_files(files):
|
||||
|
||||
full_path = "%s/%s" % (latest_dir, files)
|
||||
print('Deleting ' + full_path + ' ', end=' ')
|
||||
for filename in glob.glob(full_path):
|
||||
if os.path.isfile(filename):
|
||||
os.remove(filename)
|
||||
print('[DONE]')
|
||||
else:
|
||||
print('[NOT FOUND]')
|
||||
|
||||
def check_omahaproxy(channel="stable"):
|
||||
|
||||
version = 0
|
||||
status_url = "http://omahaproxy.appspot.com/all?os=linux&channel=" + channel
|
||||
|
||||
usock = urllib.request.urlopen(status_url)
|
||||
status_dump = usock.read().decode('utf-8')
|
||||
usock.close()
|
||||
status_list = io.StringIO(status_dump)
|
||||
status_reader = list(csv.reader(status_list, delimiter=','))
|
||||
linux_channels = [s for s in status_reader if "linux" in s]
|
||||
linux_channel = [s for s in linux_channels if channel in s]
|
||||
version = linux_channel[0][2]
|
||||
|
||||
if version == 0:
|
||||
print('I could not find the latest %s build. Bailing out.' % channel)
|
||||
sys.exit(1)
|
||||
else:
|
||||
print('Latest Chromium Version on %s at %s is %s' % (channel, status_url, version))
|
||||
return version
|
||||
|
||||
|
||||
def remove_file_if_exists(filename):
|
||||
|
||||
if os.path.isfile("./%s" % filename):
|
||||
try:
|
||||
os.remove(filename)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def download_file_and_compare_hashes(file_to_download):
|
||||
|
||||
hashes_file = '%s.hashes' % file_to_download
|
||||
|
||||
if (args.clean):
|
||||
remove_file_if_exists(file_to_download)
|
||||
remove_file_if_exists(hashes_file)
|
||||
|
||||
# Let's make sure we haven't already downloaded it.
|
||||
tarball_local_file = "./%s" % file_to_download
|
||||
if os.path.isfile(tarball_local_file):
|
||||
print("%s already exists!" % file_to_download)
|
||||
else:
|
||||
path = '%s%s' % (chromium_url, file_to_download)
|
||||
print("Downloading %s" % path)
|
||||
# Perhaps look at using python-progressbar at some point?
|
||||
info=urllib.request.urlretrieve(path, file_to_download, reporthook=dlProgress)[1]
|
||||
urllib.request.urlcleanup()
|
||||
print("")
|
||||
if (info["Content-Type"] != "application/x-tar"):
|
||||
print('Chromium tarballs for %s are not on servers.' % file_to_download)
|
||||
remove_file_if_exists (file_to_download)
|
||||
sys.exit(1)
|
||||
|
||||
hashes_local_file = "./%s" % hashes_file
|
||||
if not os.path.isfile(hashes_local_file):
|
||||
path = '%s%s' % (chromium_url, hashes_file)
|
||||
print("Downloading %s" % path)
|
||||
# Perhaps look at using python-progressbar at some point?
|
||||
info=urllib.request.urlretrieve(path, hashes_file, reporthook=dlProgress)[1]
|
||||
urllib.request.urlcleanup()
|
||||
print("")
|
||||
|
||||
if os.path.isfile(hashes_local_file):
|
||||
with open(hashes_local_file, "r") as input_file:
|
||||
md5sum = input_file.readline().split()[1]
|
||||
md5 = hashlib.md5()
|
||||
with open(tarball_local_file, "rb") as f:
|
||||
for block in iter(lambda: f.read(65536), b""):
|
||||
md5.update(block)
|
||||
if (md5sum == md5.hexdigest()):
|
||||
print("MD5 matches for %s!" % file_to_download)
|
||||
else:
|
||||
print("MD5 mismatch for %s!" % file_to_download)
|
||||
sys.exit(1)
|
||||
else:
|
||||
print("Cannot compare hashes for %s!" % file_to_download)
|
||||
|
||||
|
||||
def download_version(version):
|
||||
|
||||
download_file_and_compare_hashes ('chromium-%s.tar.xz' % version)
|
||||
|
||||
if (args.tests):
|
||||
download_file_and_compare_hashes ('chromium-%s-testdata.tar.xz' % version)
|
||||
|
||||
def nacl_versions(version):
|
||||
|
||||
if sys.version_info[0] == 2 and sys.version_info[1] == 6:
|
||||
return
|
||||
|
||||
myvars = {}
|
||||
chrome_dir = './chromium-%s' % version
|
||||
with open(chrome_dir + "/native_client/tools/REVISIONS") as myfile:
|
||||
for line in myfile:
|
||||
name, var = line.partition("=")[::2]
|
||||
myvars[name] = var
|
||||
print("nacl-binutils commit: %s" % myvars["NACL_BINUTILS_COMMIT"])
|
||||
print("nacl-gcc commit: %s" % myvars["NACL_GCC_COMMIT"])
|
||||
print("nacl-newlib commit: %s" % myvars["NACL_NEWLIB_COMMIT"])
|
||||
|
||||
# Parse GIT_REVISIONS dict from toolchain_build.py
|
||||
|
||||
sys.path.append(os.path.abspath(chrome_dir + "/native_client/toolchain_build"))
|
||||
from toolchain_build import GIT_REVISIONS
|
||||
print("nacl-arm-binutils commit: %s" % GIT_REVISIONS['binutils']['rev'])
|
||||
print("nacl-arm-gcc commit: %s" % GIT_REVISIONS['gcc']['rev'])
|
||||
|
||||
|
||||
def download_chrome_latest_rpm(arch):
|
||||
|
||||
chrome_rpm = 'google-chrome-%s_current_%s.rpm' % (version_string, arch)
|
||||
path = 'https://dl.google.com/linux/direct/%s' % chrome_rpm
|
||||
|
||||
if (args.clean):
|
||||
remove_file_if_exists(chrome_rpm)
|
||||
|
||||
# Let's make sure we haven't already downloaded it.
|
||||
if os.path.isfile("./%s" % chrome_rpm):
|
||||
print("%s already exists!" % chrome_rpm)
|
||||
else:
|
||||
print("Downloading %s" % path)
|
||||
# Perhaps look at using python-progressbar at some point?
|
||||
info=urllib.request.urlretrieve(path, chrome_rpm, reporthook=dlProgress)[1]
|
||||
urllib.request.urlcleanup()
|
||||
print("")
|
||||
if (info["Content-Type"] != "binary/octet-stream" and info["Content-Type"] != "application/x-redhat-package-manager"):
|
||||
print('Chrome %s rpms are not on servers.' % version_string)
|
||||
remove_file_if_exists (chrome_rpm)
|
||||
sys.exit(1)
|
||||
|
||||
# This is where the magic happens
|
||||
if __name__ == '__main__':
|
||||
|
||||
# Locale magic
|
||||
locale.setlocale(locale.LC_ALL, '')
|
||||
|
||||
# Create the parser object
|
||||
if optparse:
|
||||
parser = OptionParser(description=my_description)
|
||||
parser_add_argument = parser.add_option
|
||||
else:
|
||||
parser = argparse.ArgumentParser(description=my_description)
|
||||
parser_add_argument = parser.add_argument
|
||||
|
||||
parser_add_argument(
|
||||
'--ffmpegarm', action='store_true',
|
||||
help='Leave arm sources when cleaning ffmpeg')
|
||||
parser_add_argument(
|
||||
'--beta', action='store_true',
|
||||
help='Get the latest beta Chromium source')
|
||||
parser_add_argument(
|
||||
'--clean', action='store_true',
|
||||
help='Re-download all previously downloaded sources')
|
||||
parser_add_argument(
|
||||
'--cleansources', action='store_true',
|
||||
help='Get the latest Chromium release from given channel and clean various directories to from unnecessary or unwanted stuff')
|
||||
parser_add_argument(
|
||||
'--dev', action='store_true',
|
||||
help='Get the latest dev Chromium source')
|
||||
parser_add_argument(
|
||||
'--ffmpegclean', action='store_true',
|
||||
help='Get the latest Chromium release from given channel and cleans ffmpeg sources from proprietary stuff')
|
||||
parser_add_argument(
|
||||
'--ffmpegremove', action='store_true',
|
||||
help='Get the latest Chromium release from given channel and remove ffmpeg sources')
|
||||
parser_add_argument(
|
||||
'--chrome', action='store_true',
|
||||
help='Get the latest Chrome rpms for the given channel')
|
||||
parser_add_argument(
|
||||
'--prep', action='store_true',
|
||||
help='Prepare everything, but don\'t compress the result')
|
||||
parser_add_argument(
|
||||
'--stable', action='store_true',
|
||||
help='Get the latest stable Chromium source')
|
||||
parser_add_argument(
|
||||
'--tests', action='store_true',
|
||||
help='Get the additional data for running tests')
|
||||
parser_add_argument(
|
||||
'--version',
|
||||
help='Download a specific version of Chromium')
|
||||
parser_add_argument(
|
||||
'--naclvers',
|
||||
help='Display the commit versions of nacl toolchain components')
|
||||
|
||||
# Parse the args
|
||||
if optparse:
|
||||
args, options = parser.parse_args()
|
||||
else:
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.stable:
|
||||
version_string = "stable"
|
||||
elif args.beta:
|
||||
version_string = "beta"
|
||||
elif args.dev:
|
||||
version_string = "dev"
|
||||
elif (not (args.stable or args.beta or args.dev)):
|
||||
if (not args.version):
|
||||
print('No version specified, downloading STABLE')
|
||||
args.stable = True
|
||||
|
||||
chromium_version = args.version if args.version else check_omahaproxy(version_string)
|
||||
|
||||
if args.dev:
|
||||
version_string = "unstable"
|
||||
|
||||
if args.chrome:
|
||||
if args.version:
|
||||
print('You cannot specify a Chrome RPM version!')
|
||||
sys.exit(1)
|
||||
latest = 'google-chrome-%s_current_i386' % version_string
|
||||
download_chrome_latest_rpm("i386")
|
||||
latest = 'google-chrome-%s_current_x86_64' % version_string
|
||||
download_chrome_latest_rpm("x86_64")
|
||||
if (not (args.ffmpegclean or args.tests)):
|
||||
sys.exit(0)
|
||||
|
||||
latest = 'chromium-%s.tar.xz' % chromium_version
|
||||
|
||||
download_version(chromium_version)
|
||||
|
||||
# Lets make sure we haven't unpacked it already
|
||||
latest_dir = "%s/chromium-%s" % (chromium_root_dir, chromium_version)
|
||||
if (args.clean and os.path.isdir(latest_dir)):
|
||||
shutil.rmtree(latest_dir)
|
||||
|
||||
if os.path.isdir(latest_dir):
|
||||
print("%s already exists, perhaps %s has already been unpacked?" % (latest_dir, latest))
|
||||
else:
|
||||
print("Unpacking %s into %s, please wait." % (latest, latest_dir))
|
||||
if (os.system("tar -xJf %s" % latest) != 0):
|
||||
print("%s is possibly corrupted, exiting." % (latest))
|
||||
sys.exit(1)
|
||||
|
||||
if (args.naclvers):
|
||||
nacl_versions(chromium_version)
|
||||
|
||||
if (args.cleansources):
|
||||
junk_dirs = ['build/linux/debian_bullseye_amd64-sysroot',
|
||||
'build/linux/debian_bullseye_i386-sysroot',
|
||||
'third_party/node/linux/node-linux-x64',
|
||||
'third_party/rust-toolchain',
|
||||
'third_party/rust-src',
|
||||
'third_party/devtools-frontend/src/third_party/esbuild']
|
||||
junk_files = ['third_party/node/linux/node-linux-x64.tar.gz',
|
||||
'buildtools/third_party/eu-strip/bin/eu-strip',
|
||||
'buildtools/linux64/gn']
|
||||
|
||||
# First, the dirs:
|
||||
for directory in junk_dirs:
|
||||
delete_chromium_dir(directory)
|
||||
# Remove junk files
|
||||
for file in junk_files:
|
||||
delete_chromium_files(file)
|
||||
|
||||
# There has got to be a better, more portable way to do this.
|
||||
os.system("find %s -depth -name reference_build -type d -exec rm -rf {} \\;" % latest_dir)
|
||||
|
||||
# I could not find good bindings for xz/lzma support, so we system call here too.
|
||||
chromium_clean_xz_file = "chromium-" + chromium_version + "-clean.tar.xz"
|
||||
|
||||
remove_file_if_exists(chromium_clean_xz_file)
|
||||
|
||||
if (args.ffmpegclean):
|
||||
print("Cleaning ffmpeg from proprietary things...")
|
||||
os.system("./clean_ffmpeg.sh %s %d" % (latest_dir, 0 if args.ffmpegarm else 1))
|
||||
print("Cleaning openh264 from proprietary things...")
|
||||
os.system("find %s/third_party/openh264/* -type d | xargs rm -rf" % latest_dir)
|
||||
print("Done!")
|
||||
|
||||
if (args.ffmpegremove):
|
||||
print("Removing ffmpeg source...")
|
||||
os.system("find %s/third_party/ffmpeg/* -type d | xargs rm -rf" % latest_dir)
|
||||
print("Cleaning openh264 from proprietary things...")
|
||||
os.system("find %s/third_party/openh264/* -type d | xargs rm -rf" % latest_dir)
|
||||
print("Done!")
|
||||
|
||||
if (not args.prep):
|
||||
print("Compressing cleaned tree, please wait...")
|
||||
os.chdir(chromium_root_dir)
|
||||
os.system("tar --exclude=\\.svn -cf - chromium-%s | xz -6 -T0 -f > %s" % (chromium_version, chromium_clean_xz_file))
|
||||
|
||||
print("Finished!")
|
||||
54
chromium-lts/chromium.conf
Normal file
54
chromium-lts/chromium.conf
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# system wide chromium flags
|
||||
|
||||
ARCH="$(arch)"
|
||||
|
||||
# GRAPHIC_DRIVER=[amd|intel|nvidia|default]
|
||||
GRAPHIC_DRIVER=default
|
||||
|
||||
# WEB_DARKMODE=[on|off]
|
||||
WEB_DARKMODE=off
|
||||
|
||||
# NATIVE_WAYLAND=[on|off]
|
||||
NATIVE_WAYLAND=off
|
||||
|
||||
CHROMIUM_FLAGS=""
|
||||
if [ "$NATIVE_WAYLAND" == "off" ] ; then
|
||||
CHROMIUM_FLAGS+=" --enable-native-gpu-memory-buffers"
|
||||
CHROMIUM_FLAGS+=" --enable-gpu-memory-buffer-video-frames"
|
||||
CHROMIUM_FLAGS+=" --enable-zero-copy"
|
||||
CHROMIUM_FLAGS+=" --ignore-gpu-blocklist --disable-gpu-driver-bug-workaround"
|
||||
CHROMIUM_FLAGS+=" --enable-chrome-browser-cloud-management"
|
||||
CHROMIUM_FLAGS+=" --enable-gpu-rasterization"
|
||||
fi
|
||||
|
||||
FEATURES=""
|
||||
|
||||
case "$GRAPHIC_DRIVER" in
|
||||
amd|intel)
|
||||
# Need new mesa with AMD multi planes support, is supported in fedora >= 40 (mesa-24.1.1 or newer)
|
||||
# see https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26165
|
||||
CHROMIUM_FLAGS+=" --use-gl=angle --use-angle=vulkan --enable-accelerated-video-decode"
|
||||
FEATURES+="Vulkan,VulkanFromANGLE,DefaultANGLEVulkan,VaapiIgnoreDriverChecks,VaapiVideoDecoder,UseMultiPlaneFormatForHardwareVideo,AcceleratedVideoDecodeLinuxZeroCopyGL"
|
||||
;;
|
||||
nvidia)
|
||||
# The NVIDIA VaAPI drivers are known to not support Chromium
|
||||
# see https://crbug.com/1492880. This feature switch is
|
||||
# provided for developers to test VaAPI drivers on NVIDIA GPUs
|
||||
CHROMIUM_FLAGS+=" --use-gl=angle --use-angle=gl"
|
||||
FEATURES+="AcceleratedVideoDecodeLinuxGL,AcceleratedVideoDecodeLinuxZeroCopyGL,VaapiOnNvidiaGPUs"
|
||||
;;
|
||||
*)
|
||||
CHROMIUM_FLAGS+=" --use-gl=angle --use-angle=gl"
|
||||
FEATURES+="AcceleratedVideoEncoder,AcceleratedVideoDecodeLinuxGL"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Web Dark mode
|
||||
if [ "$WEB_DARKMODE" == "on" ] ; then
|
||||
darktype="WebContentsForceDark:inversion_method/cielab_based/image_behavior/none/foreground_lightness_threshold/150/background_lightness_threshold/205"
|
||||
FEATURES+=",$darktype"
|
||||
fi
|
||||
|
||||
if [ "$ARCH" == "x86_64" ] ; then
|
||||
CHROMIUM_FLAGS+=" --enable-features=$FEATURES"
|
||||
fi
|
||||
3973
chromium-lts/chromium.spec
Normal file
3973
chromium-lts/chromium.spec
Normal file
File diff suppressed because it is too large
Load diff
390
chromium-lts/clean_ffmpeg.sh
Executable file
390
chromium-lts/clean_ffmpeg.sh
Executable file
|
|
@ -0,0 +1,390 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2013-2015 Tomas Popela <tpopela@redhat.com>
|
||||
# Copyright 2022-2024 Than Ngo <than@redhat.com>
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
# $1 files
|
||||
# $2 verbose
|
||||
function copy_files() {
|
||||
for file in $1
|
||||
do
|
||||
dir_name=$(echo "$file" | sed 's%/[^/]*$%/%')
|
||||
if [[ $dir_name == */* ]]; then
|
||||
tmp_dir_name="tmp_"$dir_name
|
||||
mkdir -p "../tmp_ffmpeg/$tmp_dir_name"
|
||||
else
|
||||
tmp_dir_name=$file
|
||||
fi
|
||||
|
||||
if [ "$2" -eq 1 ]; then
|
||||
cp "$file" "../tmp_ffmpeg/$tmp_dir_name"
|
||||
else
|
||||
cp "$file" "../tmp_ffmpeg/$tmp_dir_name" > /dev/null 2>&1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
where=$(pwd)
|
||||
|
||||
pushd $1
|
||||
patch -p0 < ../ffmpeg-clean.patch
|
||||
popd
|
||||
|
||||
if ! generated_files=$(./get_free_ffmpeg_source_files.py "$1" "$2"); then
|
||||
exit 1
|
||||
fi
|
||||
# As the build system files does not contain the header files, cheat here
|
||||
# and generate the header files names from source files. These that does not
|
||||
# exist will be later skipped while copying.
|
||||
generated_files_headers="${generated_files//.c/.h}"
|
||||
generated_files_headers="$generated_files_headers ${generated_files//.c/_internal.h}"
|
||||
if [ "$2" -ne "1" ]; then
|
||||
generated_files_headers="$generated_files_headers ${generated_files//.S/.h}"
|
||||
fi
|
||||
generated_files_headers="$generated_files_headers ${generated_files//.asm/.h}"
|
||||
|
||||
header_files=" libavcodec/x86/inline_asm.h \
|
||||
libavcodec/x86/hpeldsp.h \
|
||||
libavcodec/x86/mathops.h \
|
||||
libavcodec/x86/vpx_arith.h \
|
||||
libavcodec/aarch64/vp8dsp.h \
|
||||
libavcodec/arm/vp8dsp.h \
|
||||
libavcodec/arm/vpx_arith.h \
|
||||
libavcodec/aac.h \
|
||||
libavcodec/aacps.h \
|
||||
libavcodec/aacpsdsp.h \
|
||||
libavcodec/aacsbrdata.h \
|
||||
libavcodec/aac_ac3_parser.h \
|
||||
libavcodec/parser.h \
|
||||
libavcodec/aac_defines.h \
|
||||
libavcodec/ac3.h \
|
||||
libavcodec/ac3defs.h \
|
||||
libavcodec/ac3tab.h \
|
||||
libavcodec/adts_header.h \
|
||||
libavcodec/avcodec.h \
|
||||
libavcodec/blockdsp.h \
|
||||
libavcodec/bytestream.h \
|
||||
libavcodec/cbrt_data.h \
|
||||
libavcodec/cbrt_tablegen.h \
|
||||
libavcodec/codec.h \
|
||||
libavcodec/codec_id.h \
|
||||
libavcodec/codec_internal.h \
|
||||
libavcodec/codec_par.h \
|
||||
libavcodec/dct.h \
|
||||
libavcodec/dct32.h \
|
||||
libavcodec/defs.h \
|
||||
libavcodec/dv.h \
|
||||
libavcodec/error_resilience.h \
|
||||
libavcodec/fdctdsp.h \
|
||||
libavcodec/flac.h \
|
||||
libavcodec/flacdsp.h \
|
||||
libavcodec/flac_parse.h \
|
||||
libavcodec/frame_thread_encoder.h \
|
||||
libavcodec/get_bits.h \
|
||||
libavcodec/h263dsp.h \
|
||||
libavcodec/h264chroma.h \
|
||||
libavcodec/hevc/hevc.h \
|
||||
libavcodec/hpeldsp.h \
|
||||
libavcodec/hwaccels.h \
|
||||
libavcodec/hwaccel_internal.h \
|
||||
libavcodec/hwconfig.h \
|
||||
libavcodec/idctdsp.h \
|
||||
libavcodec/internal.h \
|
||||
libavcodec/itut35.h \
|
||||
libavcodec/kbdwin.h \
|
||||
libavcodec/mathops.h \
|
||||
libavcodec/me_cmp.h \
|
||||
libavcodec/mlp_parse.h \
|
||||
libavcodec/motion_est.h \
|
||||
libavcodec/mpeg12.h \
|
||||
libavcodec/mpeg12data.h \
|
||||
libavcodec/mpeg12vlc.h \
|
||||
libavcodec/mpegaudio.h \
|
||||
libavcodec/mpegaudiodecheader.h \
|
||||
libavcodec/mpegaudiodec_common_tablegen.h \
|
||||
libavcodec/mpegaudiodsp.h \
|
||||
libavcodec/mpegaudio_tablegen.h \
|
||||
libavcodec/mpegpicture.h \
|
||||
libavcodec/mpegutils.h \
|
||||
libavcodec/mpegvideo.h \
|
||||
libavcodec/mpegvideodata.h \
|
||||
libavcodec/mpegvideoencdsp.h \
|
||||
libavcodec/opus/enc.h \
|
||||
libavcodec/opus/opus.h \
|
||||
libavcodec/options_table.h \
|
||||
libavcodec/packet.h \
|
||||
libavcodec/packet_internal.h \
|
||||
libavcodec/pcm_tablegen.h \
|
||||
libavcodec/pixblockdsp.h \
|
||||
libavcodec/pixels.h \
|
||||
libavcodec/png.h \
|
||||
libavcodec/pngdsp.h \
|
||||
libavcodec/progressframe.h \
|
||||
libavcodec/put_bits.h \
|
||||
libavcodec/qpeldsp.h \
|
||||
libavcodec/ratecontrol.h \
|
||||
libavcodec/rectangle.h \
|
||||
libavcodec/rl.h \
|
||||
libavcodec/rnd_avg.h \
|
||||
libavcodec/sbr.h \
|
||||
libavcodec/sbrdsp.h \
|
||||
libavcodec/sinewin.h \
|
||||
libavcodec/sinewin_tablegen.h \
|
||||
libavcodec/startcode.h \
|
||||
libavcodec/thread.h \
|
||||
libavcodec/threadframe.h \
|
||||
libavcodec/unary.h \
|
||||
libavcodec/version.h \
|
||||
libavcodec/version_major.h \
|
||||
libavcodec/videodsp.h \
|
||||
libavcodec/vlc.h \
|
||||
libavcodec/vorbisdsp.h \
|
||||
libavcodec/vp3data.h \
|
||||
libavcodec/vp4data.h \
|
||||
libavcodec/vp3dsp.h \
|
||||
libavcodec/vp56.h \
|
||||
libavcodec/vp56dsp.h \
|
||||
libavcodec/vp8data.h \
|
||||
libavcodec/vp8dsp.h \
|
||||
libavcodec/vp89_rac.h \
|
||||
libavformat/apetag.h \
|
||||
libavformat/avformat.h \
|
||||
libavformat/dv.h \
|
||||
libavformat/img2.h \
|
||||
libavformat/internal.h \
|
||||
libavformat/mov_chan.h \
|
||||
libavformat/pcm.h \
|
||||
libavformat/rdt.h \
|
||||
libavformat/rtp.h \
|
||||
libavformat/rtpdec.h \
|
||||
libavformat/spdif.h \
|
||||
libavformat/srtp.h \
|
||||
libavformat/options_table.h \
|
||||
libavformat/version.h \
|
||||
libavformat/version_major.h \
|
||||
libavformat/w64.h \
|
||||
libavformat/iamf_parse.h \
|
||||
libavformat/iamf_reader.h \
|
||||
libavformat/iamf.h \
|
||||
libavformat/dvdclut.h \
|
||||
libavutil/aarch64/cpu.h \
|
||||
libavutil/aarch64/intreadwrite.h \
|
||||
libavutil/x86/asm.h \
|
||||
libavutil/x86/bswap.h \
|
||||
libavutil/x86/cpu.h \
|
||||
libavutil/emms.h \
|
||||
libavutil/x86/intreadwrite.h \
|
||||
libavutil/x86/intmath.h
|
||||
libavutil/x86/timer.h \
|
||||
libavutil/attributes.h \
|
||||
libavutil/attributes_internal.h \
|
||||
libavutil/audio_fifo.h \
|
||||
libavutil/avassert.h \
|
||||
libavutil/avutil.h \
|
||||
libavutil/bswap.h \
|
||||
libavutil/common.h \
|
||||
libavutil/colorspace.h \
|
||||
libavutil/cpu.h \
|
||||
libavutil/cpu_internal.h \
|
||||
libavutil/dynarray.h \
|
||||
libavutil/ffmath.h \
|
||||
libavutil/fixed_dsp.h \
|
||||
libavutil/float_dsp.h \
|
||||
libavutil/imgutils.h \
|
||||
libavutil/imgutils_internal.h \
|
||||
libavutil/internal.h \
|
||||
libavutil/intfloat.h \
|
||||
libavutil/intreadwrite.h \
|
||||
libavutil/libm.h \
|
||||
libavutil/lls.h \
|
||||
libavutil/macros.h \
|
||||
libavutil/pixfmt.h \
|
||||
libavutil/qsort.h \
|
||||
libavutil/replaygain.h \
|
||||
libavutil/softfloat.h \
|
||||
libavutil/softfloat_tables.h \
|
||||
libavutil/thread.h \
|
||||
libavutil/timer.h \
|
||||
libavutil/timestamp.h \
|
||||
libavutil/tx_priv.h \
|
||||
libavutil/version.h \
|
||||
libavutil/sfc64.h \
|
||||
libavutil/executor.h \
|
||||
libswresample/swresample.h \
|
||||
libswresample/version.h \
|
||||
libswresample/version_major.h \
|
||||
compat/va_copy.h "
|
||||
|
||||
manual_files=" libavcodec/aarch64/h264pred_neon.S \
|
||||
libavcodec/aarch64/hpeldsp_neon.S \
|
||||
libavcodec/aarch64/neon.S \
|
||||
libavcodec/aarch64/vorbisdsp_neon.S \
|
||||
libavcodec/aarch64/autorename_libavcodec_aarch64_vorbisdsp_neon.S \
|
||||
libavcodec/aarch64/autorename_libavcodec_aarch64_vorbisdsp_init.c \
|
||||
libavcodec/aarch64/autorename_libavcodec_aarch64_videodsp_init.c \
|
||||
libavcodec/aarch64/vorbisdsp_init.c \
|
||||
libavcodec/aarch64/vp8dsp_neon.S \
|
||||
libavcodec/x86/hpeldsp.asm \
|
||||
libavcodec/x86/hpeldsp_rnd_template.c \
|
||||
libavcodec/x86/rnd_template.c \
|
||||
libavcodec/x86/videodsp.asm \
|
||||
libavcodec/x86/videodsp_init.c \
|
||||
libavcodec/x86/vorbisdsp_init.c \
|
||||
libavcodec/x86/vp3dsp.asm \
|
||||
libavcodec/x86/vp8dsp.asm \
|
||||
libavcodec/bit_depth_template.c \
|
||||
libavcodec/flacdec.c \
|
||||
libavcodec/flacdsp.c \
|
||||
libavcodec/flacdsp_template.c \
|
||||
libavcodec/flacdsp_lpc_template.c \
|
||||
libavcodec/h264pred_template.c \
|
||||
libavcodec/hpel_template.c \
|
||||
libavcodec/hpeldsp.c \
|
||||
libavcodec/options.c \
|
||||
libavcodec/parser.c \
|
||||
libavcodec/pcm.c \
|
||||
libavcodec/pel_template.c \
|
||||
libavcodec/utils.c \
|
||||
libavcodec/videodsp.c \
|
||||
libavcodec/videodsp_template.c \
|
||||
libavcodec/vorbisdsp.c \
|
||||
libavcodec/vp3dsp.c \
|
||||
libavcodec/vp8dsp.c \
|
||||
libavformat/flacdec.c \
|
||||
libavformat/options.c \
|
||||
libavformat/pcm.c \
|
||||
libavformat/utils.c \
|
||||
libavformat/version.c \
|
||||
libavformat/dvdclut.c \
|
||||
libavutil/aarch64/asm.S \
|
||||
libavutil/aarch64/cpu.c \
|
||||
libavutil/aarch64/cpu_sve.S \
|
||||
libavutil/aarch64/float_dsp_init.c \
|
||||
libavutil/aarch64/float_dsp_neon.S \
|
||||
libavutil/aarch64/autorename_libavutil_aarch64_cpu.c \
|
||||
libavutil/aarch64/autorename_libavutil_aarch64_float_dsp_init.c \
|
||||
libavutil/aarch64/autorename_libavutil_aarch64_float_dsp_neon.S \
|
||||
libavutil/aarch64/tx_float_neon.S \
|
||||
libavutil/aarch64/timer.h \
|
||||
libavutil/cpu.c \
|
||||
libavutil/fixed_dsp.c \
|
||||
libavutil/float_dsp.c \
|
||||
libavutil/imgutils.c \
|
||||
libavutil/tx_float.c \
|
||||
libavutil/tx_template.c \
|
||||
libavutil/utils.c \
|
||||
libavutil/version.c \
|
||||
libavutil/x86/cpu.c \
|
||||
libavutil/x86/float_dsp_init.c \
|
||||
libavutil/x86/tx_float_init.c \
|
||||
libavutil/aarch64/tx_float_init.c \
|
||||
libavutil/executor.c \
|
||||
libavutil/x86/x86inc.asm \
|
||||
libavutil/x86/x86util.asm "
|
||||
|
||||
mp3_files=" libavcodec/aarch64/aacpsdsp_init_aarch64.c \
|
||||
libavcodec/aarch64/aacpsdsp_neon.S \
|
||||
libavcodec/aarch64/autorename_libavcodec_aarch64_aacpsdsp_neon.S \
|
||||
libavcodec/aarch64/autorename_libavcodec_aarch64_sbrdsp_neon.S \
|
||||
libavcodec/aarch64/mpegaudiodsp_init.c \
|
||||
libavcodec/aarch64/mpegaudiodsp_neon.S \
|
||||
libavcodec/aarch64/sbrdsp_init_aarch64.c \
|
||||
libavcodec/aarch64/sbrdsp_neon.S \
|
||||
libavcodec/aac_ac3_parser.c \
|
||||
libavcodec/aac_parser.c \
|
||||
libavcodec/aacps_float.c \
|
||||
libavcodec/aacpsdsp_float.c \
|
||||
libavcodec/aacsbr.c \
|
||||
libavcodec/aactab.c \
|
||||
libavcodec/ac3tab.c \
|
||||
libavcodec/autorename_libavcodec_mpegaudiodsp.c \
|
||||
libavcodec/autorename_libavcodec_sbrdsp.c \
|
||||
libavcodec/cbrt_data.c \
|
||||
libavcodec/dct32_fixed.c \
|
||||
libavcodec/dct32_float.c \
|
||||
libavcodec/dct32_template.c \
|
||||
libavcodec/kbdwin.c \
|
||||
libavcodec/mpegaudio.c \
|
||||
libavcodec/mpegaudio_parser.c \
|
||||
libavcodec/mpegaudiodec_fixed.c \
|
||||
libavcodec/mpegaudiodec_template.c \
|
||||
libavcodec/mpegaudiodecheader.c \
|
||||
libavcodec/mpegaudiodsp.c \
|
||||
libavcodec/mpegaudiodsp_data.c \
|
||||
libavcodec/mpegaudiodsp_fixed.c \
|
||||
libavcodec/mpegaudiodsp_float.c \
|
||||
libavcodec/mpegaudiodsp_template.c \
|
||||
libavcodec/sbrdsp.c \
|
||||
libavcodec/sbrdsp_template.c \
|
||||
libavcodec/sinewin.c \
|
||||
libavcodec/x86/dct32.asm \
|
||||
libavcodec/x86/imdct36.asm \
|
||||
libavcodec/x86/mpegaudiodsp.c \
|
||||
libavcodec/x86/sbrdsp_init.c \
|
||||
libavcodec/x86/sbrdsp.asm \
|
||||
libavformat/aacdec.c \
|
||||
libavformat/apetag.c \
|
||||
libavformat/img2.c \
|
||||
libavformat/mov.c \
|
||||
libavformat/mov_chan.c \
|
||||
libavformat/mp3dec.c "
|
||||
|
||||
other_files=" BUILD.gn \
|
||||
Changelog \
|
||||
COPYING.GPLv2 \
|
||||
COPYING.GPLv3 \
|
||||
COPYING.LGPLv2.1 \
|
||||
COPYING.LGPLv3 \
|
||||
CREDITS \
|
||||
CREDITS.chromium \
|
||||
ffmpeg_generated.gni \
|
||||
ffmpeg_options.gni \
|
||||
INSTALL.md \
|
||||
LICENSE.md \
|
||||
MAINTAINERS \
|
||||
OWNERS \
|
||||
README.chromium \
|
||||
README.md \
|
||||
RELEASE "
|
||||
|
||||
cd "$1/third_party/ffmpeg" || exit 1
|
||||
|
||||
copy_files "$generated_files" 0
|
||||
copy_files "$generated_files_headers" 0
|
||||
copy_files "$manual_files" 1
|
||||
copy_files "$other_files" 1
|
||||
copy_files "$header_files" 1
|
||||
copy_files "$mp3_files" 1
|
||||
|
||||
mkdir -p ../tmp_ffmpeg/tmp_chromium/config
|
||||
cp -r chromium/config ../tmp_ffmpeg/tmp_chromium
|
||||
|
||||
cd ../tmp_ffmpeg || exit 1
|
||||
|
||||
while IFS= read -r -d '' tmp_directory
|
||||
do
|
||||
new_name=${tmp_directory//tmp_/}
|
||||
mv "$tmp_directory" "$new_name"
|
||||
done < <(find . -type d -name 'tmp_*' -print0)
|
||||
|
||||
cd "$where" || exit 1
|
||||
|
||||
rm -rf "$1/third_party/ffmpeg"
|
||||
mv "$1/third_party/tmp_ffmpeg" "$1/third_party/ffmpeg"
|
||||
17
chromium-lts/dawn-fix-ppc64le-detection.patch
Normal file
17
chromium-lts/dawn-fix-ppc64le-detection.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
--- a/third_party/dawn/src/dawn/common/Platform.h
|
||||
+++ b/third_party/dawn/src/dawn/common/Platform.h
|
||||
@@ -159,10 +159,12 @@
|
||||
#elif defined(__s390x__)
|
||||
#define DAWN_PLATFORM_IS_S390X 1
|
||||
|
||||
-#elif defined(__PPC__)
|
||||
-#define DAWN_PLATFORM_IS_PPC 1
|
||||
+// Order matters here
|
||||
+// PPC64 also defines PPC, which can lead to detection failures on ppc64le systems
|
||||
#elif defined(__PPC64__)
|
||||
#define DAWN_PLATFORM_IS_PPC64 1
|
||||
+#elif defined(__PPC__)
|
||||
+#define DAWN_PLATFORM_IS_PPC 1
|
||||
|
||||
#elif defined(__wasm32__)
|
||||
#define DAWN_PLATFORM_IS_WASM32 1
|
||||
17
chromium-lts/ffmpeg-clean.patch
Normal file
17
chromium-lts/ffmpeg-clean.patch
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
diff -up third_party/ffmpeg/ffmpeg_generated.gni.me third_party/ffmpeg/ffmpeg_generated.gni
|
||||
--- third_party/ffmpeg/ffmpeg_generated.gni.me 2024-07-19 23:49:33.776963768 +0200
|
||||
+++ third_party/ffmpeg/ffmpeg_generated.gni 2024-07-19 23:50:14.377819007 +0200
|
||||
@@ -14,10 +14,10 @@ ffmpeg_asm_sources = []
|
||||
|
||||
use_linux_config = is_linux || is_chromeos || is_fuchsia
|
||||
|
||||
-if (current_cpu == "arm64" || current_cpu == "x64" ||
|
||||
+if ((current_cpu == "arm64") || (current_cpu == "x64") ||
|
||||
(is_android && current_cpu == "arm" && arm_use_neon) ||
|
||||
- (is_android && current_cpu == "x86") || is_apple || is_win ||
|
||||
- use_linux_config) {
|
||||
+ (is_android && current_cpu == "x86") || (is_apple) || (is_win) ||
|
||||
+ (use_linux_config)) {
|
||||
ffmpeg_c_sources += [
|
||||
"libavcodec/ac3_channel_layout_tab.c",
|
||||
"libavcodec/ac3_parser.c",
|
||||
29
chromium-lts/fix-breakpad-compile.patch
Normal file
29
chromium-lts/fix-breakpad-compile.patch
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
Index: chromium-128.0.6613.113/third_party/breakpad/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/third_party/breakpad/BUILD.gn
|
||||
+++ chromium-128.0.6613.113/third_party/breakpad/BUILD.gn
|
||||
@@ -782,7 +782,6 @@ if (is_linux || is_chromeos || is_androi
|
||||
"breakpad/src/client/minidump_file_writer.h",
|
||||
"breakpad/src/common/convert_UTF.cc",
|
||||
"breakpad/src/common/convert_UTF.h",
|
||||
- "breakpad/src/common/linux/breakpad_getcontext.S",
|
||||
"breakpad/src/common/linux/elf_core_dump.cc",
|
||||
"breakpad/src/common/linux/elf_core_dump.h",
|
||||
"breakpad/src/common/linux/elfutils.cc",
|
||||
@@ -814,6 +813,8 @@ if (is_linux || is_chromeos || is_androi
|
||||
configs += [ "//build/config/compiler:no_chromium_code" ]
|
||||
public_configs = [ ":client_config" ]
|
||||
|
||||
+ defines = [ "HAVE_GETCONTEXT" ]
|
||||
+
|
||||
if (current_cpu == "arm" && is_chromeos_ash) {
|
||||
# Avoid running out of registers in
|
||||
# linux_syscall_support.h:sys_clone()'s inline assembly.
|
||||
@@ -871,7 +872,6 @@ if (is_linux || is_chromeos || is_androi
|
||||
"breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc",
|
||||
"breakpad/src/client/linux/minidump_writer/minidump_writer_unittest_utils.cc",
|
||||
"breakpad/src/client/linux/minidump_writer/proc_cpuinfo_reader_unittest.cc",
|
||||
- "breakpad/src/common/linux/breakpad_getcontext_unittest.cc",
|
||||
"breakpad/src/common/linux/elf_core_dump_unittest.cc",
|
||||
"breakpad/src/common/linux/file_id_unittest.cc",
|
||||
"breakpad/src/common/linux/linux_libc_support_unittest.cc",
|
||||
12
chromium-lts/fix-clang-selection.patch
Normal file
12
chromium-lts/fix-clang-selection.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Index: chromium-128.0.6613.113/build/config/BUILDCONFIG.gn
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/build/config/BUILDCONFIG.gn
|
||||
+++ chromium-128.0.6613.113/build/config/BUILDCONFIG.gn
|
||||
@@ -138,7 +138,6 @@ declare_args() {
|
||||
# Set to true when compiling with the Clang compiler.
|
||||
is_clang = current_os != "linux" ||
|
||||
(current_cpu != "s390x" && current_cpu != "s390" &&
|
||||
- current_cpu != "ppc64" && current_cpu != "ppc" &&
|
||||
current_cpu != "mips" && current_cpu != "mips64" &&
|
||||
current_cpu != "riscv64")
|
||||
|
||||
39
chromium-lts/fix-different-data-layouts.patch
Normal file
39
chromium-lts/fix-different-data-layouts.patch
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
Author: Daniel Richard G. <skunk@iSKUNK.ORG>
|
||||
|
||||
When building Chromium on unstable/ppc64el with ThinLTO enabled, this error
|
||||
occurs in the final link:
|
||||
|
||||
ld.lld-16: error: Linking two modules of different data layouts:
|
||||
$C_CXX_OBJECT is 'e-m:e-i64:64-n32:64-S128-v256:256:256-v512:512:512' whereas
|
||||
$RUST_LIBRARY is 'e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512'
|
||||
|
||||
This is because the LLVM data layout for powerpc64le-unknown-linux-gnu has
|
||||
evolved over time, gaining the "Fn32" bit that specifies function pointer
|
||||
alignment. See the following source locations:
|
||||
|
||||
llvm-project/clang/lib/Basic/Targets/PPC.h
|
||||
(class PPC64TargetInfo, under "Triple.getArch() == llvm::Triple::ppc64le")
|
||||
|
||||
rust/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs
|
||||
(note that this file was relocated in a later version)
|
||||
|
||||
This change occurred in clang-17, and rustc followed suit in 1.73.0. Since
|
||||
we use an older clang and a newer rustc in our unstable build, we get an
|
||||
inconsistency in data layouts when targeting this particular platform.
|
||||
|
||||
The error reported by the linker is not technically an error, however, only
|
||||
a warning goosed up by a --fatal-warnings flag.
|
||||
|
||||
Index: chromium-128.0.6613.113/build/config/compiler/BUILD.gn
|
||||
===================================================================
|
||||
--- chromium-128.0.6613.113.orig/build/config/compiler/BUILD.gn
|
||||
+++ chromium-128.0.6613.113/build/config/compiler/BUILD.gn
|
||||
@@ -380,7 +380,7 @@ config("compiler") {
|
||||
|
||||
# Linker warnings.
|
||||
if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
|
||||
- current_os != "zos") {
|
||||
+ current_os != "zos" && current_cpu != "ppc64") {
|
||||
ldflags += [ "-Wl,--fatal-warnings" ]
|
||||
}
|
||||
if (fatal_linker_warnings && is_apple) {
|
||||
22
chromium-lts/fix-page-allocator-overflow.patch
Normal file
22
chromium-lts/fix-page-allocator-overflow.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
--- a/base/allocator/dispatcher/tls.h
|
||||
+++ b/base/allocator/dispatcher/tls.h
|
||||
@@ -83,6 +83,8 @@
|
||||
constexpr static size_t AllocationChunkSize = 16384;
|
||||
#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)
|
||||
constexpr static size_t AllocationChunkSize = 16384;
|
||||
+#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_PPC64)
|
||||
+ constexpr static size_t AllocationChunkSize = 16384;
|
||||
#else
|
||||
constexpr static size_t AllocationChunkSize = 4096;
|
||||
#endif
|
||||
--- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h
|
||||
+++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h
|
||||
@@ -392,7 +400,7 @@
|
||||
// TODO(casey.smalley@arm.com): under 64k pages we can end up in a situation
|
||||
// where a normal slot span will be large enough to contain multiple items,
|
||||
// but the address will go over the final partition page after being aligned.
|
||||
-#if PA_BUILDFLAG(IS_LINUX) && PA_BUILDFLAG(PA_ARCH_CPU_ARM64)
|
||||
+#if PA_BUILDFLAG(IS_LINUX) && (PA_BUILDFLAG(PA_ARCH_CPU_ARM64) || PA_BUILDFLAG(PA_ARCH_CPU_PPC64))
|
||||
constexpr size_t kMaxSupportedAlignment = kSuperPageSize / 4;
|
||||
#else
|
||||
constexpr size_t kMaxSupportedAlignment = kSuperPageSize / 2;
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue