package/php: add libucontext optional dependency

Select libucontext if the toolchain doesn't support ucontext to allow
building php on musl

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 2824aa8a23)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
Fabrice Fontaine 2024-03-05 16:40:03 +01:00 committed by Peter Korsgaard
parent bb6d0c06eb
commit 2154c51a86
2 changed files with 8 additions and 0 deletions

View File

@ -9,6 +9,7 @@ config BR2_PACKAGE_PHP_ARCH_SUPPORTS
default y if BR2_RISCV_64
default y if BR2_s390x
default y if BR2_TOOLCHAIN_HAS_UCONTEXT
default y if BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS
config BR2_PACKAGE_PHP
bool "php"
@ -25,6 +26,8 @@ config BR2_PACKAGE_PHP
BR2_USE_MMU
select BR2_PACKAGE_PHP_SAPI_CLI if !BR2_USE_MMU
select BR2_PACKAGE_PCRE2
select BR2_PACKAGE_LIBUCONTEXT if \
BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS
help
PHP is a widely-used general-purpose scripting
language that is especially suited for Web development

View File

@ -40,6 +40,11 @@ ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
PHP_EXTRA_LIBS += -latomic
endif
ifeq ($(BR2_PACKAGE_LIBUCONTEXT),y)
PHP_DEPENDENCIES += libucontext
PHP_EXTRA_LIBS += -lucontext
endif
ifeq ($(call qstrip,$(BR2_TARGET_LOCALTIME)),)
PHP_LOCALTIME = UTC
else