From eaeba56aa2d21f1d264c7e361731808e3f072d9d Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Sun, 14 Jan 2024 13:54:48 +0100 Subject: [PATCH] toolchain/Config.in: update ucontext handling As suggested by Thomas Petazzoni in [1], add a comment on BR2_TOOLCHAIN_HAS_UCONTEXT to specify that this boolean will be set to true only when a toolchain provides a full featured ucontext implementation with ucontext_t and {get,make,set}context. As a result, drop its selection from BR2_TOOLCHAIN_USES_MUSL to fix the following musl build failure on php: /home/autobuild/autobuild/instance-8/output-1/host/lib/gcc/m68k-buildroot-linux-musl/12.3.0/../../../../m68k-buildroot-linux-musl/bin/ld: Zend/zend_fibers.o: in function `zend_fiber_init_context': zend_fibers.c:(.text+0x946): undefined reference to `getcontext' [1]: https://patchwork.ozlabs.org/project/buildroot/patch/20230516193307.1543455-1-bernd.kuhls@t-online.de/ Fixes: - http://autobuild.buildroot.org/results/271f9fb8bfa5ba2f74feef81e6b375b54e21cece Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle --- toolchain/Config.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toolchain/Config.in b/toolchain/Config.in index 407a03c42e..3dd6e83d35 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -34,7 +34,6 @@ config BR2_TOOLCHAIN_USES_MUSL select BR2_TOOLCHAIN_HAS_THREADS select BR2_TOOLCHAIN_HAS_THREADS_DEBUG select BR2_TOOLCHAIN_HAS_THREADS_NPTL - select BR2_TOOLCHAIN_HAS_UCONTEXT select BR2_TOOLCHAIN_SUPPORTS_PIE if !BR2_STATIC_LIBS choice @@ -302,6 +301,8 @@ config BR2_TOOLCHAIN_HAS_SSP_STRONG bool default y if BR2_TOOLCHAIN_HAS_SSP && BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 +# This boolean is true if the toolchain provides a full featured +# ucontext implementation with ucontext_t and {get,make,set}context config BR2_TOOLCHAIN_HAS_UCONTEXT bool