Skip to content

Commit

Permalink
editors/libreoffice: fix build on powerpc64le
Browse files Browse the repository at this point in the history
Disable musttail:
fatal error: error in backend: failed to perform tail call elimination on a call site marked musttail
  • Loading branch information
pkubaj committed Nov 21, 2023
1 parent 6c5f756 commit a03cc43
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions editors/libreoffice/Makefile
Expand Up @@ -370,6 +370,7 @@ post-patch:
.if ${COMPILER_FEATURES:Mlibstdc++}
${REINPLACE_CMD} -e 's/gb_CC/gb_CXX/' ${WRKSRC}/solenv/gbuild/platform/unxgcc.mk
.endif
${CP} ${FILESDIR}/powerpc64le-skia.patch.0 ${WRKSRC}/external/skia/

pre-configure:
@${TOUCH} ${WRKSRC}/autogen.lastrun
Expand Down
@@ -1,11 +1,11 @@
--- external/skia/UnpackedTarball_skia.mk.orig 2022-05-12 13:26:05 UTC
--- external/skia/UnpackedTarball_skia.mk.orig 2023-09-22 19:07:01 UTC
+++ external/skia/UnpackedTarball_skia.mk
@@ -39,6 +39,7 @@ skia_patches := \
@@ -39,6 +39,8 @@ skia_patches := \
tdf147342.patch.0 \
redefinition-of-op.patch.0 \
0001-Added-missing-include-cstdio.patch \
+ gfx-skia-skia-src-core-SkCpu.cpp.patch.0 \
+ powerpc64le-skia.patch.0 \

$(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))


11 changes: 11 additions & 0 deletions editors/libreoffice/files/powerpc64le-skia.patch.0
@@ -0,0 +1,11 @@
--- src/core/SkRasterPipeline.h.orig 2023-11-21 02:40:26.293131000 +0000
+++ src/core/SkRasterPipeline.h 2023-11-21 02:40:36.868877000 +0000
@@ -24,7 +24,7 @@
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(__powerpc__)
#define SK_HAS_MUSTTAIL 1
#else
#define SK_HAS_MUSTTAIL 0

0 comments on commit a03cc43

Please sign in to comment.