Compare commits
1 commit
edge
...
qt6-qtwebe
Author | SHA1 | Date | |
---|---|---|---|
0e0b3c47a3 |
23 changed files with 897 additions and 0 deletions
16
backports/qt6-qtwebengine/0001-Enable-building-on-musl.patch
Normal file
16
backports/qt6-qtwebengine/0001-Enable-building-on-musl.patch
Normal file
|
@ -0,0 +1,16 @@
|
|||
diff --git a/configure.cmake b/configure.cmake
|
||||
index 172831c6..76813841 100644
|
||||
--- a/configure.cmake
|
||||
+++ b/configure.cmake
|
||||
@@ -403,11 +403,6 @@ add_check_for_support(
|
||||
CONDITION NOT LINUX OR PkgConfig_FOUND
|
||||
MESSAGE "A pkg-config support is required."
|
||||
)
|
||||
-add_check_for_support(
|
||||
- MODULES QtWebEngine QtPdf
|
||||
- CONDITION NOT LINUX OR TEST_glibc
|
||||
- MESSAGE "A suitable version >= 2.17 of glibc is required."
|
||||
-)
|
||||
add_check_for_support(
|
||||
MODULES QtWebEngine QtPdf
|
||||
CONDITION NOT LINUX OR TEST_khr
|
18
backports/qt6-qtwebengine/0002-temp-failure-retry.patch
Normal file
18
backports/qt6-qtwebengine/0002-temp-failure-retry.patch
Normal file
|
@ -0,0 +1,18 @@
|
|||
random glibc macro
|
||||
--- a/src/3rdparty/chromium/sandbox/linux/suid/process_util.h
|
||||
+++ b/src/3rdparty/chromium/sandbox/linux/suid/process_util.h
|
||||
@@ -11,6 +11,14 @@
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
+// Some additional functions
|
||||
+# define TEMP_FAILURE_RETRY(expression) \
|
||||
+ (__extension__ \
|
||||
+ ({ long int __result; \
|
||||
+ do __result = (long int) (expression); \
|
||||
+ while (__result == -1L && errno == EINTR); \
|
||||
+ __result; }))
|
||||
+
|
||||
// This adjusts /proc/process/oom_score_adj so the Linux OOM killer
|
||||
// will prefer certain process types over others. The range for the
|
||||
// adjustment is [-1000, 1000], with [0, 1000] being user accessible.
|
73
backports/qt6-qtwebengine/0003-qt-musl-mallinfo.patch
Normal file
73
backports/qt6-qtwebengine/0003-qt-musl-mallinfo.patch
Normal file
|
@ -0,0 +1,73 @@
|
|||
musl does not implement mallinfo()/mallinfo2()
|
||||
(or rather, malloc-ng, musl's allocator, doesn't)
|
||||
--
|
||||
--- a/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
|
||||
+++ b/src/3rdparty/chromium/base/trace_event/malloc_dump_provider.cc
|
||||
@@ -185,7 +185,6 @@
|
||||
#define MALLINFO2_FOUND_IN_LIBC
|
||||
struct mallinfo2 info = mallinfo2();
|
||||
#endif
|
||||
-#endif // defined(__GLIBC__) && defined(__GLIBC_PREREQ)
|
||||
#if !defined(MALLINFO2_FOUND_IN_LIBC)
|
||||
struct mallinfo info = mallinfo();
|
||||
#endif
|
||||
@@ -205,6 +204,7 @@
|
||||
sys_alloc_dump->AddScalar(MemoryAllocatorDump::kNameSize,
|
||||
MemoryAllocatorDump::kUnitsBytes, info.uordblks);
|
||||
}
|
||||
+#endif // defined(__GLIBC__) && defined(__GLIBC_PREREQ)
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -339,7 +340,7 @@
|
||||
&allocated_objects_count);
|
||||
#elif BUILDFLAG(IS_FUCHSIA)
|
||||
// TODO(fuchsia): Port, see https://crbug.com/706592.
|
||||
-#else
|
||||
+#elif defined(__GLIBC__)
|
||||
ReportMallinfoStats(/*pmd=*/nullptr, &total_virtual_size, &resident_size,
|
||||
&allocated_objects_size, &allocated_objects_count);
|
||||
#endif
|
||||
--- a/src/3rdparty/chromium/base/process/process_metrics_posix.cc
|
||||
+++ b/src/3rdparty/chromium/base/process/process_metrics_posix.cc
|
||||
@@ -105,7 +105,7 @@
|
||||
|
||||
#endif // !BUILDFLAG(IS_FUCHSIA)
|
||||
|
||||
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
|
||||
+#if (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
|
||||
namespace {
|
||||
|
||||
size_t GetMallocUsageMallinfo() {
|
||||
@@ -123,7 +123,7 @@
|
||||
}
|
||||
|
||||
} // namespace
|
||||
-#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
|
||||
+#endif // (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) ||
|
||||
// BUILDFLAG(IS_ANDROID)
|
||||
|
||||
size_t ProcessMetrics::GetMallocUsage() {
|
||||
@@ -131,9 +131,9 @@
|
||||
malloc_statistics_t stats = {0};
|
||||
malloc_zone_statistics(nullptr, &stats);
|
||||
return stats.size_in_use;
|
||||
-#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
|
||||
+#elif (BUILDFLAG(IS_LINUX) && defined(__GLIBC__)) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID)
|
||||
return GetMallocUsageMallinfo();
|
||||
-#elif BUILDFLAG(IS_FUCHSIA)
|
||||
+#else
|
||||
// TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
|
||||
return 0;
|
||||
#endif
|
||||
--- a/src/3rdparty/chromium/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc
|
||||
+++ b/src/3rdparty/chromium/base/allocator/partition_allocator/shim/allocator_shim_default_dispatch_to_partition_alloc.cc
|
||||
@@ -717,7 +717,7 @@
|
||||
|
||||
#endif // !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_ANDROID)
|
||||
|
||||
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
||||
+#if 0
|
||||
SHIM_ALWAYS_EXPORT struct mallinfo mallinfo(void) __THROW {
|
||||
base::SimplePartitionStatsDumper allocator_dumper;
|
||||
Allocator()->DumpStats("malloc", true, &allocator_dumper);
|
64
backports/qt6-qtwebengine/0004-qt-musl-resolve.patch
Normal file
64
backports/qt6-qtwebengine/0004-qt-musl-resolve.patch
Normal file
|
@ -0,0 +1,64 @@
|
|||
--- a/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc
|
||||
+++ b/src/3rdparty/chromium/net/dns/public/scoped_res_state.cc
|
||||
@@ -13,7 +13,7 @@
|
||||
namespace net {
|
||||
|
||||
ScopedResState::ScopedResState() {
|
||||
-#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA)
|
||||
+#if BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_FUCHSIA) || defined(_GNU_SOURCE)
|
||||
// Note: res_ninit in glibc always returns 0 and sets RES_INIT.
|
||||
// res_init behaves the same way.
|
||||
memset(&_res, 0, sizeof(_res));
|
||||
@@ -25,16 +25,8 @@
|
||||
}
|
||||
|
||||
ScopedResState::~ScopedResState() {
|
||||
-#if !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA)
|
||||
-
|
||||
- // Prefer res_ndestroy where available.
|
||||
-#if BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
|
||||
- res_ndestroy(&res_);
|
||||
-#else
|
||||
- res_nclose(&res_);
|
||||
-#endif // BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_FREEBSD)
|
||||
-
|
||||
-#endif // !BUILDFLAG(IS_OPENBSD) && !BUILDFLAG(IS_FUCHSIA)
|
||||
+ // musl res_init() doesn't actually do anything
|
||||
+ // no destruction is necessary as no memory has been allocated
|
||||
}
|
||||
|
||||
bool ScopedResState::IsValid() const {
|
||||
--- a/src/3rdparty/chromium/net/dns/dns_reloader.cc
|
||||
+++ b/src/3rdparty/chromium/net/dns/dns_reloader.cc
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include "build/build_config.h"
|
||||
|
||||
-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \
|
||||
- !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_FUCHSIA)
|
||||
+#if defined(__GLIBC__)
|
||||
|
||||
#include <resolv.h>
|
||||
|
||||
--- a/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc
|
||||
+++ b/src/3rdparty/chromium/net/dns/host_resolver_system_task.cc
|
||||
@@ -310,8 +310,7 @@
|
||||
}
|
||||
|
||||
void EnsureSystemHostResolverCallReady() {
|
||||
-#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_APPLE) && !BUILDFLAG(IS_OPENBSD) && \
|
||||
- !BUILDFLAG(IS_ANDROID)
|
||||
+#if defined(__GLIBC__)
|
||||
EnsureDnsReloaderInit();
|
||||
#elif BUILDFLAG(IS_WIN)
|
||||
EnsureWinsockInit();
|
||||
@@ -396,8 +396,7 @@
|
||||
base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
|
||||
base::BlockingType::WILL_BLOCK);
|
||||
|
||||
-#if BUILDFLAG(IS_POSIX) && \
|
||||
- !(BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_OPENBSD) || BUILDFLAG(IS_ANDROID))
|
||||
+#if defined(__GLIBC__)
|
||||
DnsReloaderMaybeReload();
|
||||
#endif
|
||||
auto [ai, err, os_error] = AddressInfo::Get(host, hints, nullptr, network);
|
13
backports/qt6-qtwebengine/0005-qt-musl-crashpad.patch
Normal file
13
backports/qt6-qtwebengine/0005-qt-musl-crashpad.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h b/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h
|
||||
index 5b55c24..08cec52 100644
|
||||
--- a/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h
|
||||
+++ b/src/3rdparty/chromium/third_party/crashpad/crashpad/util/linux/thread_info.h
|
||||
@@ -273,7 +273,7 @@ union FloatContext {
|
||||
"Size mismatch");
|
||||
#elif defined(ARCH_CPU_ARMEL)
|
||||
static_assert(sizeof(f32_t::fpregs) == sizeof(user_fpregs), "Size mismatch");
|
||||
-#if !defined(__GLIBC__)
|
||||
+#if defined(OS_ANDROID)
|
||||
static_assert(sizeof(f32_t::vfp) == sizeof(user_vfp), "Size mismatch");
|
||||
#endif
|
||||
#elif defined(ARCH_CPU_ARM64)
|
97
backports/qt6-qtwebengine/0006-no-execinfo.patch
Normal file
97
backports/qt6-qtwebengine/0006-no-execinfo.patch
Normal file
|
@ -0,0 +1,97 @@
|
|||
this can be linked to, but is entirely useless
|
||||
--- a/src/3rdparty/chromium/base/debug/stack_trace_posix.cc
|
||||
+++ b/src/3rdparty/chromium/base/debug/stack_trace_posix.cc
|
||||
@@ -27,7 +27,7 @@
|
||||
#if !defined(USE_SYMBOLIZE)
|
||||
#include <cxxabi.h>
|
||||
#endif
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__) && !defined(_AIX)
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
// Note: code in this function is NOT async-signal safe (std::string uses
|
||||
// malloc internally).
|
||||
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__) && !defined(_AIX)
|
||||
std::string::size_type search_from = 0;
|
||||
while (search_from < text->size()) {
|
||||
// Look for the start of a mangled symbol, from search_from.
|
||||
@@ -136,7 +136,7 @@
|
||||
virtual ~BacktraceOutputHandler() = default;
|
||||
};
|
||||
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__) && !defined(_AIX)
|
||||
void OutputPointer(void* pointer, BacktraceOutputHandler* handler) {
|
||||
// This should be more than enough to store a 64-bit number in hex:
|
||||
// 16 hex digits + 1 for null-terminator.
|
||||
@@ -839,7 +839,7 @@
|
||||
// If we do not have unwind tables, then try tracing using frame pointers.
|
||||
return base::debug::TraceStackFramePointers(const_cast<const void**>(trace),
|
||||
count, 0);
|
||||
-#elif !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#elif defined(__GLIBC__) && !defined(_AIX)
|
||||
// Though the backtrace API man page does not list any possible negative
|
||||
// return values, we take no chance.
|
||||
return base::saturated_cast<size_t>(backtrace(trace, count));
|
||||
@@ -852,13 +852,13 @@
|
||||
// NOTE: This code MUST be async-signal safe (it's used by in-process
|
||||
// stack dumping signal handler). NO malloc or stdio is allowed here.
|
||||
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__) && !defined(_AIX)
|
||||
PrintBacktraceOutputHandler handler;
|
||||
ProcessBacktrace(trace_, count_, prefix_string, &handler);
|
||||
#endif
|
||||
}
|
||||
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__) && !defined(_AIX)
|
||||
void StackTrace::OutputToStreamWithPrefix(std::ostream* os,
|
||||
const char* prefix_string) const {
|
||||
StreamBacktraceOutputHandler handler(os);
|
||||
--- a/src/3rdparty/chromium/v8/src/codegen/external-reference-table.cc.orig
|
||||
+++ b/src/3rdparty/chromium/v8/src/codegen/external-reference-table.cc
|
||||
@@ -11,7 +11,9 @@
|
||||
|
||||
#if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID)
|
||||
#define SYMBOLIZE_FUNCTION
|
||||
+#if defined(__GLIBC__)
|
||||
#include <execinfo.h>
|
||||
+#endif
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -96,7 +98,7 @@
|
||||
}
|
||||
|
||||
const char* ExternalReferenceTable::ResolveSymbol(void* address) {
|
||||
-#ifdef SYMBOLIZE_FUNCTION
|
||||
+#if defined(SYMBOLIZE_FUNCTION) && defined(__GLIBC__)
|
||||
char** names = backtrace_symbols(&address, 1);
|
||||
const char* name = names[0];
|
||||
// The array of names is malloc'ed. However, each name string is static
|
||||
--- a/src/3rdparty/chromium/base/debug/stack_trace.cc
|
||||
+++ b/src/3rdparty/chromium/base/debug/stack_trace.cc
|
||||
@@ -251,7 +253,9 @@
|
||||
}
|
||||
|
||||
void StackTrace::OutputToStream(std::ostream* os) const {
|
||||
+#if defined(__GLIBC__) && !defined(_AIX)
|
||||
OutputToStreamWithPrefix(os, nullptr);
|
||||
+#endif
|
||||
}
|
||||
|
||||
std::string StackTrace::ToString() const {
|
||||
@@ -281,7 +281,7 @@
|
||||
}
|
||||
std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
|
||||
std::stringstream stream;
|
||||
-#if !defined(__UCLIBC__) && !defined(_AIX)
|
||||
+#if defined(__GLIBC__) && !defined(_AIX)
|
||||
OutputToStreamWithPrefix(&stream, prefix_string);
|
||||
#endif
|
||||
return stream.str();
|
101
backports/qt6-qtwebengine/0007-musl-sandbox.patch
Normal file
101
backports/qt6-qtwebengine/0007-musl-sandbox.patch
Normal file
|
@ -0,0 +1,101 @@
|
|||
diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc ./sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
||||
index ff5a1c0..da56b9b 100644
|
||||
--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
||||
+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
||||
@@ -139,21 +139,11 @@ namespace sandbox {
|
||||
// present (as in newer versions of posix_spawn).
|
||||
ResultExpr RestrictCloneToThreadsAndEPERMFork() {
|
||||
const Arg<unsigned long> flags(0);
|
||||
-
|
||||
- // TODO(mdempsky): Extend DSL to support (flags & ~mask1) == mask2.
|
||||
- const uint64_t kAndroidCloneMask = CLONE_VM | CLONE_FS | CLONE_FILES |
|
||||
- CLONE_SIGHAND | CLONE_THREAD |
|
||||
- CLONE_SYSVSEM;
|
||||
- const uint64_t kObsoleteAndroidCloneMask = kAndroidCloneMask | CLONE_DETACHED;
|
||||
-
|
||||
- const uint64_t kGlibcPthreadFlags =
|
||||
- CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD |
|
||||
- CLONE_SYSVSEM | CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID;
|
||||
- const BoolExpr glibc_test = flags == kGlibcPthreadFlags;
|
||||
-
|
||||
- const BoolExpr android_test =
|
||||
- AnyOf(flags == kAndroidCloneMask, flags == kObsoleteAndroidCloneMask,
|
||||
- flags == kGlibcPthreadFlags);
|
||||
+ const int required = CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND |
|
||||
+ CLONE_THREAD | CLONE_SYSVSEM;
|
||||
+ const int safe = CLONE_SETTLS | CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID |
|
||||
+ CLONE_DETACHED;
|
||||
+ const BoolExpr thread_clone_ok = (flags&~safe)==required;
|
||||
|
||||
// The following two flags are the two important flags in any vfork-emulating
|
||||
// clone call. EPERM any clone call that contains both of them.
|
||||
@@ -163,7 +153,7 @@ ResultExpr RestrictCloneToThreadsAndEPERMFork() {
|
||||
AnyOf((flags & (CLONE_VM | CLONE_THREAD)) == 0,
|
||||
(flags & kImportantCloneVforkFlags) == kImportantCloneVforkFlags);
|
||||
|
||||
- return If(IsAndroid() ? android_test : glibc_test, Allow())
|
||||
+ return If(thread_clone_ok, Allow())
|
||||
.ElseIf(is_fork_or_clone_vfork, Error(EPERM))
|
||||
.Else(CrashSIGSYSClone());
|
||||
}
|
||||
diff --git a/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ./sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
index d9d1882..0567557 100644
|
||||
--- a/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
+++ b/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
|
||||
@@ -392,6 +392,7 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) {
|
||||
#if defined(__i386__)
|
||||
case __NR_waitpid:
|
||||
#endif
|
||||
+ case __NR_set_tid_address:
|
||||
return true;
|
||||
case __NR_clone: // Should be parameter-restricted.
|
||||
case __NR_setns: // Privileged.
|
||||
@@ -404,7 +405,6 @@ bool SyscallSets::IsAllowedProcessStartOrDeath(int sysno) {
|
||||
#if defined(__i386__) || defined(__x86_64__) || defined(__mips__)
|
||||
case __NR_set_thread_area:
|
||||
#endif
|
||||
- case __NR_set_tid_address:
|
||||
case __NR_unshare:
|
||||
#if !defined(__mips__) && !defined(__aarch64__)
|
||||
case __NR_vfork:
|
||||
@@ -514,6 +514,8 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) {
|
||||
case __NR_mlock:
|
||||
case __NR_munlock:
|
||||
case __NR_munmap:
|
||||
+ case __NR_mremap:
|
||||
+ case __NR_membarrier:
|
||||
return true;
|
||||
case __NR_madvise:
|
||||
case __NR_mincore:
|
||||
@@ -531,7 +533,6 @@ bool SyscallSets::IsAllowedAddressSpaceAccess(int sysno) {
|
||||
case __NR_modify_ldt:
|
||||
#endif
|
||||
case __NR_mprotect:
|
||||
- case __NR_mremap:
|
||||
case __NR_msync:
|
||||
case __NR_munlockall:
|
||||
case __NR_readahead:
|
||||
diff --git a/sandbox/linux/system_headers/linux_syscalls.h ./sandbox/linux/system_headers/linux_syscalls.h
|
||||
index 2b78a0c..b6fedb5 100644
|
||||
--- a/src/3rdparty/chromium/sandbox/linux/system_headers/linux_syscalls.h
|
||||
+++ b/src/3rdparty/chromium/sandbox/linux/system_headers/linux_syscalls.h
|
||||
@@ -10,6 +10,7 @@
|
||||
#define SANDBOX_LINUX_SYSTEM_HEADERS_LINUX_SYSCALLS_H_
|
||||
|
||||
#include "build/build_config.h"
|
||||
+#include <sys/syscall.h>
|
||||
|
||||
#if defined(__x86_64__)
|
||||
#include "sandbox/linux/system_headers/x86_64_linux_syscalls.h"
|
||||
--- a/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
+++ b/src/3rdparty/chromium/sandbox/policy/linux/bpf_renderer_policy_linux.cc
|
||||
@@ -94,6 +94,9 @@
|
||||
case __NR_pwrite64:
|
||||
case __NR_sched_get_priority_max:
|
||||
case __NR_sched_get_priority_min:
|
||||
+ case __NR_sched_getparam:
|
||||
+ case __NR_sched_getscheduler:
|
||||
+ case __NR_sched_setscheduler:
|
||||
case __NR_sysinfo:
|
||||
case __NR_times:
|
||||
case __NR_uname:
|
12
backports/qt6-qtwebengine/0008-musl-stat.patch
Normal file
12
backports/qt6-qtwebengine/0008-musl-stat.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
--- a/src/3rdparty/chromium/base/files/file.h
|
||||
+++ b/src/3rdparty/chromium/base/files/file.h
|
||||
@@ -19,7 +19,8 @@
|
||||
#include "build/build_config.h"
|
||||
|
||||
#if BUILDFLAG(IS_BSD) || BUILDFLAG(IS_APPLE) || BUILDFLAG(IS_NACL) || \
|
||||
- BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_ANDROID) && __ANDROID_API__ < 21)
|
||||
+ BUILDFLAG(IS_FUCHSIA) || (BUILDFLAG(IS_ANDROID) && __ANDROID_API__ < 21) || \
|
||||
+ (defined(OS_LINUX) && !defined(__GLIBC__))
|
||||
struct stat;
|
||||
namespace base {
|
||||
typedef struct stat stat_wrapper_t;
|
31
backports/qt6-qtwebengine/0009-close.patch
Normal file
31
backports/qt6-qtwebengine/0009-close.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
--- a/src/3rdparty/chromium/base/files/scoped_file_linux.cc
|
||||
+++ b/src/3rdparty/chromium/base/files/scoped_file_linux.cc
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
+#include <dlfcn.h>
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "base/debug/stack_trace.h"
|
||||
@@ -80,9 +81,18 @@
|
||||
|
||||
extern "C" {
|
||||
|
||||
-int __close(int);
|
||||
-
|
||||
__attribute__((visibility("default"), noinline)) int close(int fd) {
|
||||
+ static int (*__close)(int) = nullptr;
|
||||
+
|
||||
+ if (__close == nullptr) {
|
||||
+ __close = (int (*)(int))dlsym(RTLD_NEXT, "close");
|
||||
+
|
||||
+ if (__close == nullptr) {
|
||||
+ RAW_LOG(ERROR, "musl close not found\n");
|
||||
+ IMMEDIATE_CRASH();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (base::IsFDOwned(fd) && g_is_ownership_enforced)
|
||||
CrashOnFdOwnershipViolation();
|
||||
return __close(fd);
|
13
backports/qt6-qtwebengine/0010-canonicalize-file-name.patch
Normal file
13
backports/qt6-qtwebengine/0010-canonicalize-file-name.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
no canonicalize_file_name on musl. funnily, the file using this says this is
|
||||
not portable, but avoids the nonportability of realpath(path, NULL);
|
||||
--- a/src/3rdparty/chromium/third_party/nasm/config/config-linux.h
|
||||
+++ b/src/3rdparty/chromium/third_party/nasm/config/config-linux.h
|
||||
@@ -139,7 +139,7 @@
|
||||
#define HAVE_ACCESS 1
|
||||
|
||||
/* Define to 1 if you have the `canonicalize_file_name' function. */
|
||||
-#define HAVE_CANONICALIZE_FILE_NAME 1
|
||||
+/* #define HAVE_CANONICALIZE_FILE_NAME 1 */
|
||||
|
||||
/* Define to 1 if you have the `cpu_to_le16' intrinsic function. */
|
||||
/* #undef HAVE_CPU_TO_LE16 */
|
20
backports/qt6-qtwebengine/0011-wtf-stacksize.patch
Normal file
20
backports/qt6-qtwebengine/0011-wtf-stacksize.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- a/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc
|
||||
+++ b/src/3rdparty/chromium/third_party/blink/renderer/platform/wtf/stack_util.cc
|
||||
@@ -29,7 +29,7 @@
|
||||
// FIXME: On Mac OSX and Linux, this method cannot estimate stack size
|
||||
// correctly for the main thread.
|
||||
|
||||
-#elif defined(__GLIBC__) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \
|
||||
+#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \
|
||||
BUILDFLAG(IS_FUCHSIA)
|
||||
// pthread_getattr_np() can fail if the thread is not invoked by
|
||||
// pthread_create() (e.g., the main thread of blink_unittests).
|
||||
@@ -97,7 +97,7 @@
|
||||
}
|
||||
|
||||
void* GetStackStart() {
|
||||
-#if defined(__GLIBC__) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \
|
||||
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_FREEBSD) || \
|
||||
BUILDFLAG(IS_FUCHSIA)
|
||||
pthread_attr_t attr;
|
||||
int error;
|
20
backports/qt6-qtwebengine/0014-missing-includes.patch
Normal file
20
backports/qt6-qtwebengine/0014-missing-includes.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- a/src/3rdparty/chromium/sandbox/linux/services/credentials.h
|
||||
+++ b/src/3rdparty/chromium/sandbox/linux/services/credentials.h
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
+#include <sys/types.h>
|
||||
|
||||
#include "sandbox/linux/system_headers/capability.h"
|
||||
#include "sandbox/sandbox_export.h"
|
||||
--- a/src/3rdparty/chromium/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h
|
||||
+++ b/src/3rdparty/chromium/net/third_party/quiche/src/quiche/http2/adapter/window_manager.h
|
||||
@@ -2,6 +2,7 @@
|
||||
#define QUICHE_HTTP2_ADAPTER_WINDOW_MANAGER_H_
|
||||
|
||||
#include <stddef.h>
|
||||
+#include <inttypes.h>
|
||||
|
||||
#include <functional>
|
||||
|
159
backports/qt6-qtwebengine/APKBUILD
Normal file
159
backports/qt6-qtwebengine/APKBUILD
Normal file
|
@ -0,0 +1,159 @@
|
|||
# Contributor: Bart Ribbers <bribbers@disroot.org>
|
||||
# Maintainer: Bart Ribbers <bribbers@disroot.org>
|
||||
pkgname=qt6-qtwebengine
|
||||
pkgver=6.5.2
|
||||
pkgrel=1
|
||||
pkgdesc="Provides support for web applications using the Chromium browser project"
|
||||
url="https://qt.io/"
|
||||
# riscv64 unknown current CPU
|
||||
# s390x blocked by qt6-qtdeclarative
|
||||
# ppc64le not supported by chromium
|
||||
# 32-bit arches are blocked by memory exhaustion and "libblink_core.a: error adding symbols: file format not recognized"
|
||||
arch="all !riscv64 !s390x !ppc64le !armv7 !x86 !armhf"
|
||||
license="LGPL-2.1-only AND LGPL-3.0-only AND GPL-3.0-only AND Qt-GPL-exception-1.0"
|
||||
depends_dev="
|
||||
alsa-lib-dev
|
||||
ffmpeg-dev
|
||||
icu-dev
|
||||
krb5-dev
|
||||
lcms2-dev
|
||||
libevent-dev
|
||||
libvpx-dev>=1.10.0-r1
|
||||
libxkbfile-dev
|
||||
libxml2-dev
|
||||
libxslt-dev
|
||||
minizip-dev
|
||||
nss-dev
|
||||
opus-dev
|
||||
pciutils-dev
|
||||
pipewire-dev
|
||||
pulseaudio-dev
|
||||
qt6-qtbase-dev
|
||||
qt6-qtdeclarative-dev
|
||||
qt6-qtpositioning-dev
|
||||
qt6-qttools-dev
|
||||
qt6-qtwebchannel-dev
|
||||
snappy-dev
|
||||
"
|
||||
makedepends="$depends_dev
|
||||
bison
|
||||
bsd-compat-headers
|
||||
clang
|
||||
cmake
|
||||
flex
|
||||
lld
|
||||
llvm
|
||||
gperf
|
||||
gzip
|
||||
nodejs
|
||||
perl
|
||||
py3-html5lib
|
||||
python3
|
||||
samurai
|
||||
"
|
||||
subpackages="$pkgname-dev"
|
||||
builddir="$srcdir/qtwebengine-everywhere-src-${pkgver/_/-}"
|
||||
|
||||
case $pkgver in
|
||||
*_alpha*|*_beta*|*_rc*) _rel=development_releases;;
|
||||
*) _rel=official_releases;;
|
||||
esac
|
||||
|
||||
source="https://download.qt.io/$_rel/qt/${pkgver%.*}/${pkgver/_/-}/submodules/qtwebengine-everywhere-src-${pkgver/_/-}.tar.xz
|
||||
0001-Enable-building-on-musl.patch
|
||||
0002-temp-failure-retry.patch
|
||||
0003-qt-musl-mallinfo.patch
|
||||
0004-qt-musl-resolve.patch
|
||||
0005-qt-musl-crashpad.patch
|
||||
0006-no-execinfo.patch
|
||||
0007-musl-sandbox.patch
|
||||
0008-musl-stat.patch
|
||||
0009-close.patch
|
||||
0010-canonicalize-file-name.patch
|
||||
0011-wtf-stacksize.patch
|
||||
0014-missing-includes.patch
|
||||
aarch64-skia.patch
|
||||
chromium-use-alpine-target.patch
|
||||
clang16-aescrypto.patch
|
||||
default-pthread-stacksize.patch
|
||||
fix-narrowing-cast.patch
|
||||
gcc13.patch
|
||||
lfs64.patch
|
||||
no-sandbox-settls.patch
|
||||
pipewire-fcntl-call.patch
|
||||
systypes.patch
|
||||
"
|
||||
|
||||
build() {
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
export AR=llvm-ar
|
||||
export NM=llvm-nm
|
||||
export RANLIB=llvm-ranlib
|
||||
export LDFLAGS="$LDFLAGS -fuse-ld=lld"
|
||||
export CFLAGS="${CFLAGS/-fstack-clash-protection} -D_LARGEFILE64_SOURCE -Wno-builtin-macro-redefined -Wno-deprecated-declarations"
|
||||
export CXXFLAGS="${CXXFLAGS/-fstack-clash-protection} -D_LARGEFILE64_SOURCE -Wno-builtin-macro-redefined -Wno-deprecated-declarations"
|
||||
|
||||
cmake -B build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DINSTALL_BINDIR=lib/qt6/bin \
|
||||
-DINSTALL_DOCDIR=share/doc/qt6 \
|
||||
-DINSTALL_ARCHDATADIR=lib/qt6 \
|
||||
-DINSTALL_DATADIR=share/qt6 \
|
||||
-DINSTALL_INCLUDEDIR=include/qt6 \
|
||||
-DINSTALL_MKSPECSDIR=lib/qt6/mkspecs \
|
||||
-DINSTALL_EXAMPLESDIR=share/doc/qt6/examples \
|
||||
-DQT_FEATURE_use_lld_linker=ON \
|
||||
-DQT_FEATURE_webengine_system_alsa=ON \
|
||||
-DQT_FEATURE_webengine_system_ffmpeg=ON \
|
||||
-DQT_FEATURE_webengine_system_icu=ON \
|
||||
-DQT_FEATURE_webengine_system_libevent=ON \
|
||||
-DQT_FEATURE_webengine_system_libpci=ON \
|
||||
-DQT_FEATURE_webengine_system_libpng=ON \
|
||||
-DQT_FEATURE_webengine_system_libwebp=ON \
|
||||
-DQT_FEATURE_webengine_system_libxml=ON \
|
||||
-DQT_FEATURE_webengine_system_minizip=ON \
|
||||
-DQT_FEATURE_webengine_system_opus=ON \
|
||||
-DQT_FEATURE_webengine_system_pulseaudio=ON \
|
||||
-DQT_FEATURE_webengine_system_zlib=ON \
|
||||
-DQT_FEATURE_webengine_proprietary_codecs=ON \
|
||||
-DQT_FEATURE_webengine_kerberos=ON \
|
||||
-DQT_FEATURE_webengine_webrtc_pipewire=ON
|
||||
cmake --build build
|
||||
}
|
||||
|
||||
check() {
|
||||
cd build
|
||||
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
|
||||
}
|
||||
|
||||
package() {
|
||||
DESTDIR="$pkgdir" cmake --install build
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
f5791002495ebfa9912477f39a96d28bd4f4329f636f6b2055f1b811503b3c394c3ddd7baed5643f78f1905b1e8f860b4202b5d8e4afe5791e5450b9f46eac12 qtwebengine-everywhere-src-6.5.2.tar.xz
|
||||
9a05c07c4616053d247b1200cdd1883e8067babc5ab5bc169ea1599643d120c445fb4db586f5e247e122711f37e148d13fc8a7443d879877d7c82fb1f778db58 0001-Enable-building-on-musl.patch
|
||||
7b6ed37975c55e5ebc20b9a6207044b6f86102d69caa6fdd457078a7ae242026d3de5537651d3d86497ba18ddd1e97523aa082da4dff703a8a4f618bccd4af57 0002-temp-failure-retry.patch
|
||||
82433802b2f22391a6321782eae7f60a2a8453b3a73199cfb7a4e7cd3fc7388ef9896651a7a55d0c8ec67bccb9d4b065709e0f48c0eeadda670225c0462590bb 0003-qt-musl-mallinfo.patch
|
||||
75fdfcff866f31f4afc6bd73ad67c4d8bcb91f7257e2a6056192b1f12e8fb3a587b6ae5f52e6985cf7d2cfcbe3b5e791e99898da01986492b755facb26c11858 0004-qt-musl-resolve.patch
|
||||
173c401e1a0daa7a1471880807e4fb0a74fc338a0f306dc067147878c29e7bb94cae43c37fe2bf21dd7a7ffd2d739697fd21d10c059ce647df01d8236612cc68 0005-qt-musl-crashpad.patch
|
||||
54040483142e12b45860ad09f744182cf2319b6aa0bb59d6a903b28d13fdeff296252fee1c4481cce57ada41bf84b42b88c2de10d8b3b5c62b917045ca9e2298 0006-no-execinfo.patch
|
||||
5603a1f6cf17d201f32eedd3e67f6ea0796477cb047084af8b0bdb08e897bdcbc7cd90770689a8050c846be4cc0ff8b01af6349c70eac13e024aa85e3fc6cb1c 0007-musl-sandbox.patch
|
||||
af362cf6154efe442fd6411b96cc49e64b6ae5ccc7fa2bff299559143f1c7677309a196ffbb58e28e1e61fca08106582867d667c96dbd7bf698c06053db5f666 0008-musl-stat.patch
|
||||
484efce13cf1c918fb03f41cbf85d43c8811ba71876be85e8939441a299b918f12113ee93eb456fa8b5590326655b9fcd1fd2949c6a2f5edf81fe5ddb0e61255 0009-close.patch
|
||||
2c7b3039b892f9c2c58cd70f88b3a4d60bcd330143f3547472f1b857fbb37b534c3b79c081b3ce6eea52b236cf1af1dea09e38e22351f0201fe7f1fa70f8974f 0010-canonicalize-file-name.patch
|
||||
cebe80c406d5d7232d70fbe0988eb40d9d420bd785f9398b65ebfe6c56098ac6345dd5c907fcbdf02d1f27f1052535147f72aabda078a6e6ce9e624c0b997961 0011-wtf-stacksize.patch
|
||||
74ff6d0d36c49d3542d614ad8efde7451b710dc2d8857c85fd6fdc51540f540a90a6133f2255e3af7cf3f133dc5be4c30c508672d2026546a84e0ff1c7251a64 0014-missing-includes.patch
|
||||
3b97486b0873a17b35c2187557b320069462e0d08ba88af4af7878628dbeeecfe2ab5bcfc7640c8c87c4c30dbac611d4170c25201c4e7971fbd58eed31e4d756 aarch64-skia.patch
|
||||
35fd16614f3012f4793221983920f85b209abd543331b14d13bf50d23e028fa34756099a3429028d948a825ec97e9dfeb371fd48852d3f3e5de9f3794e03a7f7 chromium-use-alpine-target.patch
|
||||
9e93fb4fb8d1b4bb009e516845c342fa4a13a309671c7c48474f4e94cbd78709ed90ca6a0c8d30422d90eb6476f7ed973e2515705e5bd494ea5eddb2603aa3de clang16-aescrypto.patch
|
||||
8cac36aa644cb1c7d6cbe860dbc5aec2298eb5115db3ea1ac38bcd084ff1185ab21af954d3def0a823863abfe758e16fe231365ba7d8cd4348d5bd6147fae5f3 default-pthread-stacksize.patch
|
||||
2bf4b7e66edc7cd3afddbcdfc9501d55eba4b6d11bbbc75f4107042f909a1fd5b5166e9274d2da53241f2c1cfde7472dfc640af23e3a3d9c2d01cf72ae5cfffd fix-narrowing-cast.patch
|
||||
83057708d6deac9141c88637cccaaabef33d9276e9f02e123d7a782ab5cae46073bfcf6bf2aa4c57eca467b6bc3b6416354a5e7352ad38e71cfe5f46ae8d488a gcc13.patch
|
||||
cef2bef9b6daac9c2d51e6a3430a6e7ffa21ecec7ce6a2160891db8fd24d32b47237a77a6b6bf1c9f52d7c9a4dadc9d5ea4bffa7da012367882aae8bdd3df926 lfs64.patch
|
||||
17141b0de8d629fc4a620318965ab7d6099da90de2a7172f7536a0a2dcded1bdc8b004c36c9000e7f03209e3eeee6e2570037174a0ffd8472ebc2e9af8409ff0 no-sandbox-settls.patch
|
||||
3c3965bf6d7835c0f1744a11675a301639379fac93df7a9b631c029b652d32708f421ca8461595eb58d5e7e886ba5f959ff04436bae204e295d4bfb6f905bd37 pipewire-fcntl-call.patch
|
||||
3f9268b47bcb03b485e39e49188f85e5943237713bdb1cf00e97b456064345314c02387c135f979a26cf48fc636a5d492ba7ce817741d4651ce404358a35751a systypes.patch
|
||||
"
|
20
backports/qt6-qtwebengine/aarch64-skia.patch
Normal file
20
backports/qt6-qtwebengine/aarch64-skia.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- a/src/3rdparty/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
+++ b/src/3rdparty/chromium/third_party/skia/src/opts/SkRasterPipeline_opts.h
|
||||
@@ -976,7 +976,7 @@
|
||||
}
|
||||
|
||||
SI F from_half(U16 h) {
|
||||
-#if defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) \
|
||||
+#if 0 && defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) \
|
||||
&& !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds.
|
||||
#if defined(SK_BUILD_FOR_MAC)
|
||||
return vcvt_f32_f16(h);
|
||||
@@ -1002,7 +1002,7 @@
|
||||
}
|
||||
|
||||
SI U16 to_half(F f) {
|
||||
-#if defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) \
|
||||
+#if 0 && defined(JUMPER_IS_NEON) && defined(SK_CPU_ARM64) \
|
||||
&& !defined(SK_BUILD_FOR_GOOGLE3) // Temporary workaround for some Google3 builds.
|
||||
#if defined(SK_BUILD_FOR_MAC)
|
||||
return vcvt_f16_f32(f);
|
30
backports/qt6-qtwebengine/chromium-use-alpine-target.patch
Normal file
30
backports/qt6-qtwebengine/chromium-use-alpine-target.patch
Normal file
|
@ -0,0 +1,30 @@
|
|||
building for arm targets by default passes --target to clang, because it
|
||||
assumes it's cross compiling (so passes --target as if the host is different,
|
||||
instead of assuming default)
|
||||
|
||||
probably also works: removing this entirely. but to be safe, pass the alpine clang host triple
|
||||
--
|
||||
--- a/src/3rdparty/chromium/build/config/compiler/BUILD.gn
|
||||
+++ b/src/3rdparty/chromium/build/config/compiler/BUILD.gn
|
||||
@@ -915,8 +915,8 @@ config("compiler_cpu_abi") {
|
||||
} else if (current_cpu == "arm") {
|
||||
if (is_clang && !is_android && !is_nacl &&
|
||||
!(is_chromeos_lacros && is_chromeos_device)) {
|
||||
- cflags += [ "--target=arm-linux-gnueabihf" ]
|
||||
- ldflags += [ "--target=arm-linux-gnueabihf" ]
|
||||
+ cflags += [ "--target=armv7-alpine-linux-musleabihf" ]
|
||||
+ ldflags += [ "--target=armv7-alpine-linux-musleabihf" ]
|
||||
}
|
||||
if (!is_nacl) {
|
||||
cflags += [
|
||||
@@ -930,8 +930,8 @@ config("compiler_cpu_abi") {
|
||||
} else if (current_cpu == "arm64") {
|
||||
if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
|
||||
!(is_chromeos_lacros && is_chromeos_device)) {
|
||||
- cflags += [ "--target=aarch64-linux-gnu" ]
|
||||
- ldflags += [ "--target=aarch64-linux-gnu" ]
|
||||
+ cflags += [ "--target=aarch64-alpine-linux-musl" ]
|
||||
+ ldflags += [ "--target=aarch64-alpine-linux-musl" ]
|
||||
}
|
||||
if (is_android) {
|
||||
# Outline atomics crash on Exynos 9810. http://crbug.com/1272795
|
29
backports/qt6-qtwebengine/clang16-aescrypto.patch
Normal file
29
backports/qt6-qtwebengine/clang16-aescrypto.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
clang-16 refuses to compile code that uses certain extensions that were before
|
||||
implicitly enabled.
|
||||
g++ also rejects it.
|
||||
add the required extensions to compile the vectorised code with runtime detection.
|
||||
the code already does this, but these -Xclang args don't work for some reason
|
||||
--
|
||||
--- a/src/3rdparty/chromium/third_party/crc32c/BUILD.gn
|
||||
+++ b/src/3rdparty/chromium/third_party/crc32c/BUILD.gn
|
||||
@@ -109,19 +109,7 @@
|
||||
if (current_cpu == "arm64") {
|
||||
if (is_clang) {
|
||||
cflags = [
|
||||
- "-march=armv8-a",
|
||||
-
|
||||
- # Some builds set -march to a different value from the above.
|
||||
- # The specific feature flags below enable the instructions we need
|
||||
- # in these cases. See https://crbug.com/934016 for example.
|
||||
- "-Xclang",
|
||||
- "-target-feature",
|
||||
- "-Xclang",
|
||||
- "+crc",
|
||||
- "-Xclang",
|
||||
- "-target-feature",
|
||||
- "-Xclang",
|
||||
- "+crypto",
|
||||
+ "-march=armv8-a+crc+crypto",
|
||||
]
|
||||
} else {
|
||||
cflags = [ "-march=armv8-a+crc+crypto" ]
|
23
backports/qt6-qtwebengine/default-pthread-stacksize.patch
Normal file
23
backports/qt6-qtwebengine/default-pthread-stacksize.patch
Normal file
|
@ -0,0 +1,23 @@
|
|||
--- a/src/3rdparty/chromium/base/threading/platform_thread_linux.cc
|
||||
+++ b/src/3rdparty/chromium/base/threading/platform_thread_linux.cc
|
||||
@@ -186,7 +186,8 @@
|
||||
|
||||
size_t GetDefaultThreadStackSize(const pthread_attr_t& attributes) {
|
||||
#if !defined(THREAD_SANITIZER)
|
||||
- return 0;
|
||||
+ // use 2mb to avoid running out of space. This is what android uses
|
||||
+ return 2 * (1 << 20);
|
||||
#else
|
||||
// ThreadSanitizer bloats the stack heavily. Evidence has been that the
|
||||
// default stack size isn't enough for some browser tests.
|
||||
--- a/src/3rdparty/chromium/base/threading/platform_thread_unittest.cc.orig
|
||||
+++ b/src/3rdparty/chromium/base/threading/platform_thread_unittest.cc
|
||||
@@ -411,7 +411,7 @@
|
||||
((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && \
|
||||
!defined(THREAD_SANITIZER)) || \
|
||||
(BUILDFLAG(IS_ANDROID) && !defined(ADDRESS_SANITIZER))
|
||||
- EXPECT_EQ(0u, stack_size);
|
||||
+ EXPECT_EQ(2u << 20, stack_size);
|
||||
#else
|
||||
EXPECT_GT(stack_size, 0u);
|
||||
EXPECT_LT(stack_size, 20u * (1 << 20));
|
44
backports/qt6-qtwebengine/fix-narrowing-cast.patch
Normal file
44
backports/qt6-qtwebengine/fix-narrowing-cast.patch
Normal file
|
@ -0,0 +1,44 @@
|
|||
--- a/src/3rdparty/chromium/base/files/file_util_linux.cc
|
||||
+++ b/src/3rdparty/chromium/base/files/file_util_linux.cc
|
||||
@@ -30,7 +30,7 @@
|
||||
case EXT2_SUPER_MAGIC: // Also ext3 and ext4
|
||||
case MSDOS_SUPER_MAGIC:
|
||||
case REISERFS_SUPER_MAGIC:
|
||||
- case static_cast<int>(BTRFS_SUPER_MAGIC):
|
||||
+ case BTRFS_SUPER_MAGIC:
|
||||
case 0x5346544E: // NTFS
|
||||
case 0x58465342: // XFS
|
||||
case 0x3153464A: // JFS
|
||||
@@ -40,14 +40,14 @@
|
||||
*type = FILE_SYSTEM_NFS;
|
||||
break;
|
||||
case SMB_SUPER_MAGIC:
|
||||
- case static_cast<int>(0xFF534D42): // CIFS
|
||||
+ case 0xFF534D42: // CIFS
|
||||
*type = FILE_SYSTEM_SMB;
|
||||
break;
|
||||
case CODA_SUPER_MAGIC:
|
||||
*type = FILE_SYSTEM_CODA;
|
||||
break;
|
||||
- case static_cast<int>(HUGETLBFS_MAGIC):
|
||||
- case static_cast<int>(RAMFS_MAGIC):
|
||||
+ case HUGETLBFS_MAGIC:
|
||||
+ case RAMFS_MAGIC:
|
||||
case TMPFS_MAGIC:
|
||||
*type = FILE_SYSTEM_MEMORY;
|
||||
break;
|
||||
--- a/src/3rdparty/chromium/base/system/sys_info_posix.cc
|
||||
+++ b/src/3rdparty/chromium/base/system/sys_info_posix.cc
|
||||
@@ -100,10 +100,10 @@
|
||||
if (HANDLE_EINTR(statfs(path.value().c_str(), &stats)) != 0)
|
||||
return false;
|
||||
|
||||
switch (stats.f_type) {
|
||||
case TMPFS_MAGIC:
|
||||
- case static_cast<int>(HUGETLBFS_MAGIC):
|
||||
- case static_cast<int>(RAMFS_MAGIC):
|
||||
+ case HUGETLBFS_MAGIC:
|
||||
+ case RAMFS_MAGIC:
|
||||
return true;
|
||||
}
|
||||
return false;
|
30
backports/qt6-qtwebengine/gcc13.patch
Normal file
30
backports/qt6-qtwebengine/gcc13.patch
Normal file
|
@ -0,0 +1,30 @@
|
|||
--- a/src/3rdparty/chromium/third_party/webrtc/rtc_base/system/file_wrapper.h
|
||||
+++ b/src/3rdparty/chromium/third_party/webrtc/rtc_base/system/file_wrapper.h
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifndef RTC_BASE_SYSTEM_FILE_WRAPPER_H_
|
||||
#define RTC_BASE_SYSTEM_FILE_WRAPPER_H_
|
||||
|
||||
+#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
--- a/src/3rdparty/chromium/components/variations/seed_response.h
|
||||
+++ b/src/3rdparty/chromium/components/variations/seed_response.h
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_VARIATIONS_SEED_RESPONSE_H_
|
||||
#define COMPONENTS_VARIATIONS_SEED_RESPONSE_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace variations {
|
||||
--- a/src/3rdparty/chromium/gpu/config/gpu_driver_bug_workarounds.h
|
||||
+++ b/src/3rdparty/chromium/gpu/config/gpu_driver_bug_workarounds.h
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef GPU_CONFIG_GPU_DRIVER_BUG_WORKAROUNDS_H_
|
||||
#define GPU_CONFIG_GPU_DRIVER_BUG_WORKAROUNDS_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
41
backports/qt6-qtwebengine/lfs64.patch
Normal file
41
backports/qt6-qtwebengine/lfs64.patch
Normal file
|
@ -0,0 +1,41 @@
|
|||
diff --git a/src/3rdparty/gn/src/base/files/file.h b/src/3rdparty/gn/src/base/files/file.h
|
||||
index 2c94eb4..b2db71a 100644
|
||||
--- a/src/3rdparty/gn/src/base/files/file.h
|
||||
+++ b/src/3rdparty/gn/src/base/files/file.h
|
||||
@@ -26,7 +26,7 @@ namespace base {
|
||||
defined(OS_ANDROID) && __ANDROID_API__ < 21
|
||||
typedef struct stat stat_wrapper_t;
|
||||
#elif defined(OS_POSIX) || defined(OS_FUCHSIA)
|
||||
-typedef struct stat64 stat_wrapper_t;
|
||||
+typedef struct stat stat_wrapper_t;
|
||||
#endif
|
||||
|
||||
// Thin wrapper around an OS-level file.
|
||||
diff --git a/src/3rdparty/gn/src/base/files/file_util_posix.cc b/src/3rdparty/gn/src/base/files/file_util_posix.cc
|
||||
index ac281c4..f05a2e8 100644
|
||||
--- a/src/3rdparty/gn/src/base/files/file_util_posix.cc
|
||||
+++ b/src/3rdparty/gn/src/base/files/file_util_posix.cc
|
||||
@@ -70,10 +70,10 @@ int CallLstat(const char* path, stat_wrapper_t* sb) {
|
||||
}
|
||||
#else
|
||||
int CallStat(const char* path, stat_wrapper_t* sb) {
|
||||
- return stat64(path, sb);
|
||||
+ return stat(path, sb);
|
||||
}
|
||||
int CallLstat(const char* path, stat_wrapper_t* sb) {
|
||||
- return lstat64(path, sb);
|
||||
+ return lstat(path, sb);
|
||||
}
|
||||
#endif
|
||||
|
||||
--- a/src/3rdparty/gn/src/base/files/file_posix.cc
|
||||
+++ b/src/3rdparty/gn/src/base/files/file_posix.cc
|
||||
@@ -32,7 +32,7 @@
|
||||
}
|
||||
#else
|
||||
int CallFstat(int fd, stat_wrapper_t* sb) {
|
||||
- return fstat64(fd, sb);
|
||||
+ return fstat(fd, sb);
|
||||
}
|
||||
#endif
|
||||
|
14
backports/qt6-qtwebengine/no-sandbox-settls.patch
Normal file
14
backports/qt6-qtwebengine/no-sandbox-settls.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
this optimisation of CLONE_SETTLS is not valid used like this, and future musl
|
||||
clone(3) will EINVAL on this use
|
||||
--
|
||||
--- a/src/3rdparty/chromium/sandbox/linux/services/credentials.cc
|
||||
+++ b/src/3rdparty/chromium/sandbox/linux/services/credentials.cc
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
int clone_flags = CLONE_FS | LINUX_SIGCHLD;
|
||||
void* tls = nullptr;
|
||||
-#if (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_FAMILY)) && \
|
||||
+#if 0 && (defined(ARCH_CPU_X86_64) || defined(ARCH_CPU_ARM_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
|
18
backports/qt6-qtwebengine/pipewire-fcntl-call.patch
Normal file
18
backports/qt6-qtwebengine/pipewire-fcntl-call.patch
Normal file
|
@ -0,0 +1,18 @@
|
|||
Patch-Source: https://webrtc-review.googlesource.com/c/src/+/305120
|
||||
--
|
||||
diff --git a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
|
||||
index 5878180..b2ad7ad 100644
|
||||
--- a/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
|
||||
+++ b/src/3rdparty/chromium/third_party/webrtc/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc
|
||||
@@ -452,8 +452,8 @@
|
||||
PipeWireThreadLoopLock thread_loop_lock(pw_main_loop_);
|
||||
|
||||
if (fd >= 0) {
|
||||
- pw_core_ = pw_context_connect_fd(
|
||||
- pw_context_, fcntl(fd, F_DUPFD_CLOEXEC), nullptr, 0);
|
||||
+ pw_core_ = pw_context_connect_fd(
|
||||
+ pw_context_, fcntl(fd, F_DUPFD_CLOEXEC, 0), nullptr, 0);
|
||||
} else {
|
||||
pw_core_ = pw_context_connect(pw_context_, nullptr, 0);
|
||||
}
|
||||
|
11
backports/qt6-qtwebengine/systypes.patch
Normal file
11
backports/qt6-qtwebengine/systypes.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/src/3rdparty/chromium/base/third_party/symbolize/symbolize.h
|
||||
+++ b/src/3rdparty/chromium/base/third_party/symbolize/symbolize.h
|
||||
@@ -58,6 +58,8 @@
|
||||
#include "config.h"
|
||||
#include "glog/logging.h"
|
||||
|
||||
+#include <sys/types.h>
|
||||
+
|
||||
#ifdef HAVE_SYMBOLIZE
|
||||
|
||||
#if defined(__ELF__) // defined by gcc
|
Loading…
Reference in a new issue