summaryrefslogtreecommitdiffstats
path: root/package/php/php.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/php/php.mk')
-rw-r--r--package/php/php.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/package/php/php.mk b/package/php/php.mk
index 6492747d70..448b7ef64c 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -213,6 +213,13 @@ endif
ifeq ($(BR2_PACKAGE_PCRE),y)
PHP_CONF_OPTS += --with-pcre-regex=$(STAGING_DIR)/usr
PHP_DEPENDENCIES += pcre
+else
+# The bundled pcre library is not configurable through ./configure options,
+# and by default is configured to be thread-safe, so it wants pthreads. So
+# we must explicitly tell it when we don't have threads.
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
+PHP_CFLAGS += -DSLJIT_SINGLE_THREADED=1
+endif
endif
ifeq ($(BR2_PACKAGE_PHP_EXT_CURL),y)
OpenPOWER on IntegriCloud