package/capnproto: update ucontext handling
PATCH 1/1 package/capnproto: update ucontext handling
musl workaround for getcontext/setcontext is not needed since commit eaeba56aa2d21f1d264c7e361731808e3f072d9d
Moreover, select libucontext if possible to get full ucontext support
--- package/c-capnproto/Config.in | 6 ++++-- package/capnproto/Config.in | 8 ++++++-- package/capnproto/capnproto.mk | 5 ++--- 3 files changed, 12 insertions(+), 7 deletions(-)
package/c-capnproto/Config.in +4 -2
@@ -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)
package/capnproto/Config.in +6 -2
@@ -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)
package/capnproto/capnproto.mk +2 -3
@@ -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))
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 38 lines · Fabrice Fontaine
musl workaround for getcontext/setcontext is not needed since commit
eaeba56aa2d21f1d264c7e361731808e3f072d9dMoreover, select libucontext if possible to get full ucontext support
Signed-off-by Fabrice Fontaine <[email protected]>--- package/c-capnproto/Config.in | 6 ++++-- package/capnproto/Config.in | 8 ++++++-- package/capnproto/capnproto.mk | 5 ++--- 3 files changed, 12 insertions(+), 7 deletions(-)package/c-capnproto/Config.in +4
-2@@ -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)package/capnproto/Config.in +0
-0
package/capnproto/Config.in config BR2_PACKAGE_CAPNPROTO · line 13
Quoted 8 lines
package/capnproto/Config.in +4
-1@@ -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
Quoted 16 lines
package/capnproto/Config.in +2
-1help 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)package/capnproto/capnproto.mk +0
-0@@ -29,9 +29,8 @@ else CAPNPROTO_CONF_OPTS += --without-openssl
package/capnproto/capnproto.mk else · line 36
Quoted 10 lines
package/capnproto/capnproto.mk +2
-3endif -# 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
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 1/1 package/capnproto: update ucontext handling
In reply to Fabrice FontaineFrom: Fabrice Fontaine <[email protected]>
musl workaround for getcontext/setcontext is not needed since commit eaeba56aa2d21f1d264c7e361731808e3f072d9d
Moreover, select libucontext if possible to get full ucontext support
---
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/[email protected]/
package/c-capnproto/Config.in | 6 ++++-- package/capnproto/Config.in | 8 ++++++-- package/capnproto/capnproto.mk | 5 ++--- 3 files changed, 12 insertions(+), 7 deletions(-)
package/c-capnproto/Config.in +4 -2
@@ -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)
package/capnproto/Config.in +6 -2
@@ -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)
package/capnproto/capnproto.mk +2 -3
@@ -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))
Signature · 6 lines
2.53.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot