Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/php: depend on libucontext for musl builds
@ 2023-05-16 19:33 Bernd Kuhls
  2023-08-06 16:03 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2023-05-16 19:33 UTC (permalink / raw)
  To: buildroot

Depends on new libucontext package:
http://patchwork.ozlabs.org/project/buildroot/patch/20220811063502.1823571-1-james.hilliard1@gmail.com/

Musl does not implement functions operating on ucontext_t:
https://wiki.musl-libc.org/open-issues.html

Fixes:
http://autobuild.buildroot.net/results/778/77857026b7cb3b9eb5ef57c779f4737b094b6974/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 package/php/Config.in | 6 +++++-
 package/php/php.mk    | 5 +++++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/package/php/Config.in b/package/php/Config.in
index 69b4268c1d..18779ba1f9 100644
--- a/package/php/Config.in
+++ b/package/php/Config.in
@@ -8,7 +8,9 @@ config BR2_PACKAGE_PHP_ARCH_SUPPORTS
 	default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
 	default y if BR2_RISCV_64
 	default y if BR2_s390x
-	default y if BR2_TOOLCHAIN_HAS_UCONTEXT
+	default y if \
+		BR2_TOOLCHAIN_HAS_UCONTEXT || \
+		BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS
 
 config BR2_PACKAGE_PHP
 	bool "php"
@@ -18,6 +20,8 @@ config BR2_PACKAGE_PHP
 	# section .text LMA [...,...]"
 	depends on !BR2_BINFMT_FLAT
 	depends on BR2_USE_WCHAR
+	select BR2_PACKAGE_LIBUCONTEXT if BR2_TOOLCHAIN_USES_MUSL && \
+		BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS
 	select BR2_PACKAGE_PHP_SAPI_CGI if \
 	       !BR2_PACKAGE_PHP_SAPI_APACHE && \
 	       !BR2_PACKAGE_PHP_SAPI_CLI && \
diff --git a/package/php/php.mk b/package/php/php.mk
index 981da5b15d..0f6760afad 100644
--- a/package/php/php.mk
+++ b/package/php/php.mk
@@ -39,6 +39,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
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-06 16:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-16 19:33 [Buildroot] [PATCH 1/1] package/php: depend on libucontext for musl builds Bernd Kuhls
2023-08-06 16:03 ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox