ports/lang/php81/files/patch-ext_pcre_pcre2lib_sljit_sljitConfigInternal.h
Piotr Kubaj b6bb44e5ba pcre: fix runtime issues on powerpc
In sljitConfigInternal.h, pcre checks for existence of __builtin___clear_cache() function.
LLVM provides that function for all platforms, even those that don't have implemented flushing the cache.

This leads to runtime errors on e.g. powerpc (32-bit) with __clear_cache() calling compilerrt_abort(), resulting in SIGABRT.
2022-03-25 14:29:03 +00:00

11 lines
450 B
C

--- ext/pcre/pcre2lib/sljit/sljitConfigInternal.h.orig 2022-03-25 09:54:56 UTC
+++ ext/pcre/pcre2lib/sljit/sljitConfigInternal.h
@@ -283,7 +283,7 @@
/* Instruction cache flush. */
/****************************/
-#if (!defined SLJIT_CACHE_FLUSH && defined __has_builtin)
+#if (!defined SLJIT_CACHE_FLUSH && defined __has_builtin && !defined SLJIT_CONFIG_PPC_32)
#if __has_builtin(__builtin___clear_cache)
#define SLJIT_CACHE_FLUSH(from, to) \