void-packages/srcpkgs/chromium/patches/fix-dawn-platform.patch

63 lines
2.3 KiB
Diff
Raw Normal View History

2022-10-30 17:41:39 +01:00
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(-)
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) || defined(DAWN_PLATFORM_IS_LOONGARCH32)
#define DAWN_PLATFORM_IS_32_BIT 1
static_assert(sizeof(sizeof(char)) == 4, "Expect sizeof(size_t) == 4");
--
2.34.1