git: 20bcd77fd602 - main - graphics/skia124: fix build on powerpc64le
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 12 Oct 2026 07:54:35 UTC
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=20bcd77fd602f6ca14d257872528799dcc5524f2
commit 20bcd77fd602f6ca14d257872528799dcc5524f2
Author: Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-10-11 15:00:43 +0000
Commit: Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-10-12 07:54:30 +0000
graphics/skia124: fix build on powerpc64le
Backport skia 7baeaff3a6bb and skcms 2c7a7bff0512 (skia ccc8932d35ac):
clang cannot honour [[clang::musttail]] on indirect calls on PowerPC.
---
.../files/patch-include_private_base_SkFeatures.h | 13 +++++++++++++
.../files/patch-modules_skcms_src_skcms__internals.h | 19 +++++++++++++++++++
.../skia124/files/patch-src_core_SkRasterPipeline.h | 12 ++++++++++++
3 files changed, 44 insertions(+)
diff --git a/graphics/skia124/files/patch-include_private_base_SkFeatures.h b/graphics/skia124/files/patch-include_private_base_SkFeatures.h
new file mode 100644
index 000000000000..43f1533d0d92
--- /dev/null
+++ b/graphics/skia124/files/patch-include_private_base_SkFeatures.h
@@ -0,0 +1,13 @@
+--- include/private/base/SkFeatures.h.orig 2026-10-11 14:39:49 UTC
++++ include/private/base/SkFeatures.h
+@@ -65,6 +65,10 @@
+ #define SK_CPU_X86 1
+ #endif
+
++#if defined(__powerpc__) || defined (__powerpc64__)
++ #define SK_CPU_PPC 1
++#endif
++
+ /**
+ * SK_CPU_SSE_LEVEL
+ *
diff --git a/graphics/skia124/files/patch-modules_skcms_src_skcms__internals.h b/graphics/skia124/files/patch-modules_skcms_src_skcms__internals.h
new file mode 100644
index 000000000000..3dbf78d8d7ab
--- /dev/null
+++ b/graphics/skia124/files/patch-modules_skcms_src_skcms__internals.h
@@ -0,0 +1,19 @@
+--- modules/skcms/src/skcms_internals.h.orig 2024-06-11 14:20:28 UTC
++++ modules/skcms/src/skcms_internals.h
+@@ -39,6 +39,8 @@ extern "C" {
+ // - Clang 18 runs into an ICE on armv7/androideabi with [[clang::musttail]].
+ // (http://crbug.com/1504548)
+ // - Android RISC-V also runs into an ICE (b/314692534)
++ // - So does Linux ppc64le (https://github.com/llvm/llvm-project/issues/108014,
++ // https://github.com/llvm/llvm-project/issues/98859)
+ // - LoongArch developers indicate they had to turn it off
+ // - Windows builds generate incorrect code with [[clang::musttail]] and crash mysteriously.
+ // (http://crbug.com/1505442)
+@@ -47,6 +49,7 @@ extern "C" {
+ && !defined(__EMSCRIPTEN__) \
+ && !defined(__arm__) \
+ && !defined(__riscv) \
++ && !defined(__powerpc__) \
+ && !defined(__loongarch__) \
+ && !defined(_WIN32) && !defined(__SYMBIAN32__)
+ #define SKCMS_HAS_MUSTTAIL 1
diff --git a/graphics/skia124/files/patch-src_core_SkRasterPipeline.h b/graphics/skia124/files/patch-src_core_SkRasterPipeline.h
new file mode 100644
index 000000000000..4f885fc4e7e5
--- /dev/null
+++ b/graphics/skia124/files/patch-src_core_SkRasterPipeline.h
@@ -0,0 +1,12 @@
+--- src/core/SkRasterPipeline.h.orig 2026-10-11 14:39:49 UTC
++++ src/core/SkRasterPipeline.h
+@@ -26,7 +26,8 @@ struct skcms_TransferFunction;
+ struct SkImageInfo;
+ struct skcms_TransferFunction;
+
+-#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32)
++#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && \
++ !defined(SK_CPU_PPC)
+ #define SK_HAS_MUSTTAIL 1
+ #else
+ #define SK_HAS_MUSTTAIL 0