From: Angelo Compagnucci <angelo.compagnucci@gmail.com>
To: buildroot@buildroot.org
Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com>,
Arnout Vandecappelle <arnout@rnout.be>
Subject: [Buildroot] [PATCH v2] package/capnproto: update ucontext handling
Date: Mon, 23 Nov 2026 19:12:15 +0100 [thread overview]
Message-ID: <20261123181215.2805909-1-angelo.compagnucci@gmail.com> (raw)
In-Reply-To: <20240306145531.1413586-1-fontaine.fabrice@gmail.com>
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
next prev parent reply other threads:[~2026-11-23 18:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2026-11-26 22:00 ` [Buildroot] [PATCH v2] " Thomas Petazzoni via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261123181215.2805909-1-angelo.compagnucci@gmail.com \
--to=angelo.compagnucci@gmail.com \
--cc=arnout@rnout.be \
--cc=buildroot@buildroot.org \
--cc=fontaine.fabrice@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox