Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/capnproto: update ucontext handling
@ 2024-03-06 14:55 Fabrice Fontaine
  2024-04-07 16:25 ` Arnout Vandecappelle via buildroot
  2026-11-23 18:12 ` [Buildroot] [PATCH v2] " Angelo Compagnucci
  0 siblings, 2 replies; 4+ messages in thread
From: Fabrice Fontaine @ 2024-03-06 14:55 UTC (permalink / raw)
  To: buildroot; +Cc: Koen Martens, Fabrice Fontaine

musl workaround for getcontext/setcontext is not needed since commit
eaeba56aa2d21f1d264c7e361731808e3f072d9d

Moreover, select libucontext if possible to get full ucontext support

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/c-capnproto/Config.in  | 6 ++++--
 package/capnproto/Config.in    | 8 ++++++--
 package/capnproto/capnproto.mk | 5 ++---
 3 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/package/c-capnproto/Config.in b/package/c-capnproto/Config.in
index c472128c3f..abe2a602ba 100644
--- a/package/c-capnproto/Config.in
+++ b/package/c-capnproto/Config.in
@@ -7,7 +7,8 @@ config BR2_PACKAGE_C_CAPNPROTO
 	depends on BR2_TOOLCHAIN_HAS_THREADS # capnproto
 	depends on BR2_TOOLCHAIN_HAS_ATOMIC # capnproto
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # capnproto
-	depends on BR2_TOOLCHAIN_HAS_UCONTEXT # capnproto
+	depends on BR2_TOOLCHAIN_HAS_UCONTEXT || \
+		BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS # capnproto
 	select BR2_PACKAGE_CAPNPROTO
 	help
 	  A C plugin for Cap'n Proto. Generates the code generator
@@ -24,4 +25,5 @@ comment "c-capnproto needs host and target gcc >= 5 w/ C++14, threads, atomic, u
 		!BR2_TOOLCHAIN_HAS_THREADS || \
 		!BR2_TOOLCHAIN_HAS_ATOMIC || \
 		BR2_TOOLCHAIN_HAS_GCC_BUG_64735 || \
-		!BR2_TOOLCHAIN_HAS_UCONTEXT
+		!(BR2_TOOLCHAIN_HAS_UCONTEXT || \
+			BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS)
diff --git a/package/capnproto/Config.in b/package/capnproto/Config.in
index 943ba9de29..93e3a64fb8 100644
--- a/package/capnproto/Config.in
+++ b/package/capnproto/Config.in
@@ -7,7 +7,10 @@ config BR2_PACKAGE_CAPNPROTO
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_TOOLCHAIN_HAS_ATOMIC
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735
-	depends on BR2_TOOLCHAIN_HAS_UCONTEXT
+	depends on BR2_TOOLCHAIN_HAS_UCONTEXT || \
+		BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS
+	select BR2_PACKAGE_LIBUCONTEXT if \
+		BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS
 	help
 	  Cap'n Proto is an insanely fast data interchange format
 	  and capability-based RPC system. Think JSON, except
@@ -25,4 +28,5 @@ comment "capnproto needs host and target gcc >= 5 w/ C++14, threads, atomic, uco
 		!BR2_TOOLCHAIN_HAS_THREADS || \
 		!BR2_TOOLCHAIN_HAS_ATOMIC || \
 		BR2_TOOLCHAIN_HAS_GCC_BUG_64735 || \
-		!BR2_TOOLCHAIN_HAS_UCONTEXT
+		!(BR2_TOOLCHAIN_HAS_UCONTEXT || \
+			BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS)
diff --git a/package/capnproto/capnproto.mk b/package/capnproto/capnproto.mk
index 7424a1420f..d322c27a54 100644
--- a/package/capnproto/capnproto.mk
+++ b/package/capnproto/capnproto.mk
@@ -29,9 +29,8 @@ else
 CAPNPROTO_CONF_OPTS += --without-openssl
 endif
 
-# musl doesn't support getcontext/setcontext
-ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
-CAPNPROTO_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -DKJ_USE_FIBERS=0"
+ifeq ($(BR2_PACKAGE_LIBUCONTEXT),y)
+CAPNPROTO_DEPENDENCIES += libucontext
 endif
 
 $(eval $(autotools-package))
-- 
2.43.0

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

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

* Re: [Buildroot] [PATCH 1/1] package/capnproto: update ucontext handling
  2024-03-06 14:55 [Buildroot] [PATCH 1/1] package/capnproto: update ucontext handling Fabrice Fontaine
@ 2024-04-07 16:25 ` Arnout Vandecappelle via buildroot
  2026-11-23 18:12 ` [Buildroot] [PATCH v2] " Angelo Compagnucci
  1 sibling, 0 replies; 4+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2024-04-07 16:25 UTC (permalink / raw)
  To: Fabrice Fontaine, buildroot; +Cc: Koen Martens



On 06/03/2024 15:55, Fabrice Fontaine wrote:
> musl workaround for getcontext/setcontext is not needed since commit
> eaeba56aa2d21f1d264c7e361731808e3f072d9d
> 
> Moreover, select libucontext if possible to get full ucontext support
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>   package/c-capnproto/Config.in  | 6 ++++--
>   package/capnproto/Config.in    | 8 ++++++--
>   package/capnproto/capnproto.mk | 5 ++---
>   3 files changed, 12 insertions(+), 7 deletions(-)
> 
> diff --git a/package/c-capnproto/Config.in b/package/c-capnproto/Config.in
> index c472128c3f..abe2a602ba 100644
> --- a/package/c-capnproto/Config.in
> +++ b/package/c-capnproto/Config.in
> @@ -7,7 +7,8 @@ config BR2_PACKAGE_C_CAPNPROTO
>   	depends on BR2_TOOLCHAIN_HAS_THREADS # capnproto
>   	depends on BR2_TOOLCHAIN_HAS_ATOMIC # capnproto
>   	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # capnproto
> -	depends on BR2_TOOLCHAIN_HAS_UCONTEXT # capnproto
> +	depends on BR2_TOOLCHAIN_HAS_UCONTEXT || \
> +		BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS # capnproto
>   	select BR2_PACKAGE_CAPNPROTO
>   	help
>   	  A C plugin for Cap'n Proto. Generates the code generator
> @@ -24,4 +25,5 @@ comment "c-capnproto needs host and target gcc >= 5 w/ C++14, threads, atomic, u
>   		!BR2_TOOLCHAIN_HAS_THREADS || \
>   		!BR2_TOOLCHAIN_HAS_ATOMIC || \
>   		BR2_TOOLCHAIN_HAS_GCC_BUG_64735 || \
> -		!BR2_TOOLCHAIN_HAS_UCONTEXT
> +		!(BR2_TOOLCHAIN_HAS_UCONTEXT || \
> +			BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS)
> diff --git a/package/capnproto/Config.in b/package/capnproto/Config.in
> index 943ba9de29..93e3a64fb8 100644
> --- a/package/capnproto/Config.in
> +++ b/package/capnproto/Config.in
> @@ -7,7 +7,10 @@ config BR2_PACKAGE_CAPNPROTO
>   	depends on BR2_TOOLCHAIN_HAS_THREADS
>   	depends on BR2_TOOLCHAIN_HAS_ATOMIC
>   	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735
> -	depends on BR2_TOOLCHAIN_HAS_UCONTEXT
> +	depends on BR2_TOOLCHAIN_HAS_UCONTEXT || \
> +		BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS
> +	select BR2_PACKAGE_LIBUCONTEXT if \
> +		BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS

  This will select libucontext even if the toolchain already has ucontext, so we 
have it twice? Is that really OK, and even if it is, is it really what we want? 
My feeling is that libucontext should depend on !BR2_TOOLCHAIN_HAS_UCONTEXT...
And here, I feel it should be "if !BR2_TOOLCHAIN_HAS_UCONTEXT && 
BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS". Which is a bit too cumbersome to repeat 
in many places, so maybe we should also introduce an auxiliary symbol for that, 
something like BR2_PACKAGE_LIBUCONTEXT_IF_NEEDED.


  Regards,
  Arnout

>   	help
>   	  Cap'n Proto is an insanely fast data interchange format
>   	  and capability-based RPC system. Think JSON, except
> @@ -25,4 +28,5 @@ comment "capnproto needs host and target gcc >= 5 w/ C++14, threads, atomic, uco
>   		!BR2_TOOLCHAIN_HAS_THREADS || \
>   		!BR2_TOOLCHAIN_HAS_ATOMIC || \
>   		BR2_TOOLCHAIN_HAS_GCC_BUG_64735 || \
> -		!BR2_TOOLCHAIN_HAS_UCONTEXT
> +		!(BR2_TOOLCHAIN_HAS_UCONTEXT || \
> +			BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS)
> diff --git a/package/capnproto/capnproto.mk b/package/capnproto/capnproto.mk
> index 7424a1420f..d322c27a54 100644
> --- a/package/capnproto/capnproto.mk
> +++ b/package/capnproto/capnproto.mk
> @@ -29,9 +29,8 @@ else
>   CAPNPROTO_CONF_OPTS += --without-openssl
>   endif
>   
> -# musl doesn't support getcontext/setcontext
> -ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
> -CAPNPROTO_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -DKJ_USE_FIBERS=0"
> +ifeq ($(BR2_PACKAGE_LIBUCONTEXT),y)
> +CAPNPROTO_DEPENDENCIES += libucontext
>   endif
>   
>   $(eval $(autotools-package))
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v2] package/capnproto: update ucontext handling
  2024-03-06 14:55 [Buildroot] [PATCH 1/1] package/capnproto: update ucontext handling Fabrice Fontaine
  2024-04-07 16:25 ` Arnout Vandecappelle via buildroot
@ 2026-11-23 18:12 ` Angelo Compagnucci
  2026-11-26 22:00   ` Thomas Petazzoni via buildroot
  1 sibling, 1 reply; 4+ messages in thread
From: Angelo Compagnucci @ 2026-11-23 18:12 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine, Arnout Vandecappelle

From: Fabrice Fontaine <fontaine.fabrice@gmail.com>

musl workaround for getcontext/setcontext is not needed since commit
eaeba56aa2d21f1d264c7e361731808e3f072d9d

Moreover, select libucontext if possible to get full ucontext support

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Co-authored-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Tested-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
---
Changes v1 -> v2:
  - only select libucontext when the toolchain has no ucontext, with
    the same condition as libdex [Arnout Vandecappelle]
  - rebase on master

Supersedes v1: https://patchwork.buildroot.org/project/buildroot/patch/20240306145531.1413586-1-fontaine.fabrice@gmail.com/

 package/c-capnproto/Config.in  | 6 ++++--
 package/capnproto/Config.in    | 8 ++++++--
 package/capnproto/capnproto.mk | 5 ++---
 3 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/package/c-capnproto/Config.in b/package/c-capnproto/Config.in
index c472128c3f..abe2a602ba 100644
--- a/package/c-capnproto/Config.in
+++ b/package/c-capnproto/Config.in
@@ -7,7 +7,8 @@ config BR2_PACKAGE_C_CAPNPROTO
 	depends on BR2_TOOLCHAIN_HAS_THREADS # capnproto
 	depends on BR2_TOOLCHAIN_HAS_ATOMIC # capnproto
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # capnproto
-	depends on BR2_TOOLCHAIN_HAS_UCONTEXT # capnproto
+	depends on BR2_TOOLCHAIN_HAS_UCONTEXT || \
+		BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS # capnproto
 	select BR2_PACKAGE_CAPNPROTO
 	help
 	  A C plugin for Cap'n Proto. Generates the code generator
@@ -24,4 +25,5 @@ comment "c-capnproto needs host and target gcc >= 5 w/ C++14, threads, atomic, u
 		!BR2_TOOLCHAIN_HAS_THREADS || \
 		!BR2_TOOLCHAIN_HAS_ATOMIC || \
 		BR2_TOOLCHAIN_HAS_GCC_BUG_64735 || \
-		!BR2_TOOLCHAIN_HAS_UCONTEXT
+		!(BR2_TOOLCHAIN_HAS_UCONTEXT || \
+			BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS)
diff --git a/package/capnproto/Config.in b/package/capnproto/Config.in
index 943ba9de29..4654b5ad77 100644
--- a/package/capnproto/Config.in
+++ b/package/capnproto/Config.in
@@ -7,7 +7,10 @@ config BR2_PACKAGE_CAPNPROTO
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_TOOLCHAIN_HAS_ATOMIC
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735
-	depends on BR2_TOOLCHAIN_HAS_UCONTEXT
+	depends on BR2_TOOLCHAIN_HAS_UCONTEXT || \
+		BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS
+	select BR2_PACKAGE_LIBUCONTEXT if \
+		BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS && !BR2_TOOLCHAIN_HAS_UCONTEXT
 	help
 	  Cap'n Proto is an insanely fast data interchange format
 	  and capability-based RPC system. Think JSON, except
@@ -25,4 +28,5 @@ comment "capnproto needs host and target gcc >= 5 w/ C++14, threads, atomic, uco
 		!BR2_TOOLCHAIN_HAS_THREADS || \
 		!BR2_TOOLCHAIN_HAS_ATOMIC || \
 		BR2_TOOLCHAIN_HAS_GCC_BUG_64735 || \
-		!BR2_TOOLCHAIN_HAS_UCONTEXT
+		!(BR2_TOOLCHAIN_HAS_UCONTEXT || \
+			BR2_PACKAGE_LIBUCONTEXT_ARCH_SUPPORTS)
diff --git a/package/capnproto/capnproto.mk b/package/capnproto/capnproto.mk
index f51e037532..d5be2a3d6c 100644
--- a/package/capnproto/capnproto.mk
+++ b/package/capnproto/capnproto.mk
@@ -33,9 +33,8 @@ else
 CAPNPROTO_CONF_OPTS += --without-openssl
 endif
 
-# musl doesn't support getcontext/setcontext
-ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y)
-CAPNPROTO_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -DKJ_USE_FIBERS=0"
+ifeq ($(BR2_PACKAGE_LIBUCONTEXT),y)
+CAPNPROTO_DEPENDENCIES += libucontext
 endif
 
 $(eval $(autotools-package))
-- 
2.53.0

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

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

* Re: [Buildroot] [PATCH v2] package/capnproto: update ucontext handling
  2026-11-23 18:12 ` [Buildroot] [PATCH v2] " Angelo Compagnucci
@ 2026-11-26 22:00   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-11-26 22:00 UTC (permalink / raw)
  To: Angelo Compagnucci; +Cc: buildroot, Fabrice Fontaine, Arnout Vandecappelle

On Mon, Nov 23, 2026 at 07:12:15PM +0100, Angelo Compagnucci wrote:
> From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> 
> musl workaround for getcontext/setcontext is not needed since commit
> eaeba56aa2d21f1d264c7e361731808e3f072d9d
> 
> Moreover, select libucontext if possible to get full ucontext support
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> Co-authored-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
> Tested-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
> Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>

Applied to next, thanks!

Best regards,

Thomas Petazzoni
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2026-11-26 22:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-06 14:55 [Buildroot] [PATCH 1/1] package/capnproto: update ucontext handling Fabrice Fontaine
2024-04-07 16:25 ` Arnout Vandecappelle via buildroot
2026-11-23 18:12 ` [Buildroot] [PATCH v2] " Angelo Compagnucci
2026-11-26 22:00   ` 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