diff --git a/srcpkgs/chromium/patches/fix-dawn-platform.patch b/srcpkgs/chromium/patches/fix-dawn-platform.patch new file mode 100644 index 00000000000..fbcd2706a94 --- /dev/null +++ b/srcpkgs/chromium/patches/fix-dawn-platform.patch @@ -0,0 +1,62 @@ +From f815e833c946a59620a2ca9df37a1da746f61460 Mon Sep 17 00:00:00 2001 +From: q66 +Date: Sat, 1 Oct 2022 00:21:09 +0000 +Subject: [PATCH] fix dawn build for ppc64 + +--- + third_party/dawn/src/dawn/common/Assert.cpp | 4 ++-- + third_party/dawn/src/dawn/common/Platform.h | 10 +++++----- + 2 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/third_party/dawn/src/dawn/common/Assert.cpp b/third_party/dawn/src/dawn/common/Assert.cpp +index ecc92dfc..8ee91a90 100644 +--- a/third_party/dawn/src/dawn/common/Assert.cpp ++++ b/third_party/dawn/src/dawn/common/Assert.cpp +@@ -31,9 +31,9 @@ void BreakPoint() { + __asm__ __volatile__("ebreak"); + #elif DAWN_PLATFORM_IS(MIPS) + __asm__ __volatile__("break"); +-#elif DAWN_PLATFORM_IS(S390) || DAWN_PLATFORM_IS_(S390X) ++#elif DAWN_PLATFORM_IS(S390) || DAWN_PLATFORM_IS(S390X) + __asm__ __volatile__(".word 0x0001"); +-#elif DAWN_PLATFORM_IS(PPC) || DAWN_PLATFORM_IS_(PPC64) ++#elif DAWN_PLATFORM_IS(PPC) || DAWN_PLATFORM_IS(PPC64) + __asm__ __volatile__("twge 2,2"); + #else + #error "Unsupported platform" +diff --git a/third_party/dawn/src/dawn/common/Platform.h b/third_party/dawn/src/dawn/common/Platform.h +index 39d5eb41..2011367d 100644 +--- a/third_party/dawn/src/dawn/common/Platform.h ++++ b/third_party/dawn/src/dawn/common/Platform.h +@@ -124,15 +124,15 @@ + #define DAWN_PLATFORM_IS_MIPS64 1 + #endif + +-#elif defiend(__s390__) ++#elif defined(__s390__) + #define DAWN_PLATFORM_IS_S390 1 +-#elif defiend(__s390x__) ++#elif defined(__s390x__) + #define DAWN_PLATFORM_IS_S390X 1 + +-#elif defined(__PPC__) +-#define DAWN_PLATFORM_IS_PPC 1 + #elif defined(__PPC64__) + #define DAWN_PLATFORM_IS_PPC64 1 ++#elif defined(__PPC__) ++#define DAWN_PLATFORM_IS_PPC 1 + + #else + #error "Unsupported platform." +@@ -149,7 +149,7 @@ + static_assert(sizeof(sizeof(char)) == 8, "Expect sizeof(size_t) == 8"); + #elif defined(DAWN_PLATFORM_IS_I386) || defined(DAWN_PLATFORM_IS_ARM32) || \ + defined(DAWN_PLATFORM_IS_RISCV32) || defined(DAWN_PLATFORM_IS_MIPS32) || \ +- defined(DAWN_PLATFORM_IS_S390) || defined(DAWN_PLATFORM_IS_PPC32) || \ ++ defined(DAWN_PLATFORM_IS_S390) || defined(DAWN_PLATFORM_IS_PPC) || \ + defined(DAWN_PLATFORM_IS_EMSCRIPTEN) + #define DAWN_PLATFORM_IS_32_BIT 1 + static_assert(sizeof(sizeof(char)) == 4, "Expect sizeof(size_t) == 4"); +-- +2.34.1 + diff --git a/srcpkgs/chromium/patches/xxx-ppc64le-support.patch b/srcpkgs/chromium/patches/xxx-ppc64le-support.patch index 3c2df31566e..475a0067cbf 100644 --- a/srcpkgs/chromium/patches/xxx-ppc64le-support.patch +++ b/srcpkgs/chromium/patches/xxx-ppc64le-support.patch @@ -3393,6 +3393,37 @@ index e4ac22644..1c57015db 100644 (defined(__s390__) && !defined(__s390x__)) /* On these architectures, implement mmap() with mmap2(). */ LSS_INLINE void* LSS_NAME(mmap)(void *s, size_t l, int p, int f, int d, +@@ -4872,11 +4872,11 @@ struct kernel_statx { + LSS_SC_BODY(4, int, 8, d, type, protocol, sv); + } + #endif +- #if defined(__NR_recvmsg) ++ #if defined(__NR_recvmsg) && !defined(__PPC__) + LSS_INLINE _syscall3(ssize_t, recvmsg, int, s, struct kernel_msghdr*, msg, + int, flags) + #endif +- #if defined(__NR_sendmsg) ++ #if defined(__NR_sendmsg) && !defined(__PPC__) + LSS_INLINE _syscall3(ssize_t, sendmsg, int, s, const struct kernel_msghdr*, + msg, int, flags) + #endif +@@ -4885,13 +4885,13 @@ struct kernel_statx { + int, flags, const struct kernel_sockaddr*, to, + unsigned int, tolen) + #endif +- #if defined(__NR_shutdown) ++ #if defined(__NR_shutdown) && !defined(__PPC__) + LSS_INLINE _syscall2(int, shutdown, int, s, int, how) + #endif +- #if defined(__NR_socket) ++ #if defined(__NR_socket) && !defined(__PPC__) + LSS_INLINE _syscall3(int, socket, int, domain, int, type, int, protocol) + #endif +- #if defined(__NR_socketpair) ++ #if defined(__NR_socketpair) && !defined(__PPC__) + LSS_INLINE _syscall4(int, socketpair, int, d, int, type, int, protocol, + int*, sv) + #endif diff --git a/third_party/pdfium/third_party/libpng16/pngpriv.h b/third_party/pdfium/third_party/libpng16/pngpriv.h index 583c26f..e03d697 100644 --- a/third_party/pdfium/third_party/libpng16/pngpriv.h