void-packages/srcpkgs/qt6-pdf/patches/0125-fix-dawn-platform.patch

56 lines
2.1 KiB
Diff

From f815e833c946a59620a2ca9df37a1da746f61460 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
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(-)
--- a/src/3rdparty/chromium/third_party/dawn/src/dawn/common/Assert.cpp
+++ b/src/3rdparty/chromium/third_party/dawn/src/dawn/common/Assert.cpp
@@ -39,9 +39,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"
--- a/src/3rdparty/chromium/third_party/dawn/src/dawn/common/Platform.h
+++ b/src/3rdparty/chromium/third_party/dawn/src/dawn/common/Platform.h
@@ -140,15 +140,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."
@@ -166,7 +166,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) || defined(DAWN_PLATFORM_IS_LOONGARCH32)
#define DAWN_PLATFORM_IS_32_BIT 1
static_assert(sizeof(sizeof(char)) == 4, "Expect sizeof(size_t) == 4");