* [Buildroot] [PATCH 1/1] package/botan: fix build without NPTL
@ 2024-03-05 12:52 Fabrice Fontaine
2024-03-06 14:18 ` Peter Korsgaard
2024-03-20 20:37 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2024-03-05 12:52 UTC (permalink / raw)
To: buildroot; +Cc: Fabrice Fontaine
botan unconditionally uses pthread_setname_np since bump to version
3.2.0 in commit 2f8feb66204ff661e9fd5f508e2dfd1ebc0f2813 and
https://github.com/randombit/botan/commit/313e439c786d68bcf374b2cb0edfe3ffd891db94
resulting in the following build failure:
src/lib/utils/os_utils.cpp:625:22: error: 'pthread_setname_np' was not declared in this scope
625 | static_cast<void>(pthread_setname_np(thread.native_handle(), name.c_str()));
| ^~~~~~~~~~~~~~~~~~
So only enable threads if NPTL is available
Fixes: 2f8feb66204ff661e9fd5f508e2dfd1ebc0f2813
- http://autobuild.buildroot.org/results/03677de6270ff5de61fff2a76e5cd723aa34e64e
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/botan/Config.in | 5 ++---
package/botan/botan.mk | 6 ++++++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/package/botan/Config.in b/package/botan/Config.in
index 5c3f31726e..c74128bb9d 100644
--- a/package/botan/Config.in
+++ b/package/botan/Config.in
@@ -15,7 +15,6 @@ config BR2_PACKAGE_BOTAN
bool "botan"
depends on BR2_INSTALL_LIBSTDCPP
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_10 # C++20
- depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_PACKAGE_BOTAN_ARCH_SUPPORTS
select BR2_PACKAGE_BOOST_FILESYSTEM if BR2_PACKAGE_BOOST && BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
select BR2_PACKAGE_BOOST_SYSTEM if BR2_PACKAGE_BOOST && BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
@@ -24,7 +23,7 @@ config BR2_PACKAGE_BOTAN
http://botan.randombit.net
-comment "botan needs a toolchain w/ C++, threads, gcc >= 10"
- depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP \
+comment "botan needs a toolchain w/ C++, gcc >= 10"
+ depends on !BR2_INSTALL_LIBSTDCPP \
|| !BR2_TOOLCHAIN_GCC_AT_LEAST_10
depends on BR2_PACKAGE_BOTAN_ARCH_SUPPORTS
diff --git a/package/botan/botan.mk b/package/botan/botan.mk
index 88dbfa5807..95352ea41b 100644
--- a/package/botan/botan.mk
+++ b/package/botan/botan.mk
@@ -48,6 +48,12 @@ else
BOTAN_CONF_OPTS += --without-stack-protector
endif
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),y)
+BOTAN_CONF_OPTS += --with-os-feature=threads
+else
+BOTAN_CONF_OPTS += --without-os-feature=threads
+endif
+
ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
BOTAN_CONF_OPTS += --without-os-feature=explicit_bzero,getauxval,getentropy
endif
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/botan: fix build without NPTL
2024-03-05 12:52 [Buildroot] [PATCH 1/1] package/botan: fix build without NPTL Fabrice Fontaine
@ 2024-03-06 14:18 ` Peter Korsgaard
2024-03-20 20:37 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-03-06 14:18 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> botan unconditionally uses pthread_setname_np since bump to version
> 3.2.0 in commit 2f8feb66204ff661e9fd5f508e2dfd1ebc0f2813 and
> https://github.com/randombit/botan/commit/313e439c786d68bcf374b2cb0edfe3ffd891db94
> resulting in the following build failure:
> src/lib/utils/os_utils.cpp:625:22: error: 'pthread_setname_np' was not declared in this scope
> 625 | static_cast<void>(pthread_setname_np(thread.native_handle(), name.c_str()));
> | ^~~~~~~~~~~~~~~~~~
> So only enable threads if NPTL is available
> Fixes: 2f8feb66204ff661e9fd5f508e2dfd1ebc0f2813
> - http://autobuild.buildroot.org/results/03677de6270ff5de61fff2a76e5cd723aa34e64e
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/botan: fix build without NPTL
2024-03-05 12:52 [Buildroot] [PATCH 1/1] package/botan: fix build without NPTL Fabrice Fontaine
2024-03-06 14:18 ` Peter Korsgaard
@ 2024-03-20 20:37 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2024-03-20 20:37 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> botan unconditionally uses pthread_setname_np since bump to version
> 3.2.0 in commit 2f8feb66204ff661e9fd5f508e2dfd1ebc0f2813 and
> https://github.com/randombit/botan/commit/313e439c786d68bcf374b2cb0edfe3ffd891db94
> resulting in the following build failure:
> src/lib/utils/os_utils.cpp:625:22: error: 'pthread_setname_np' was not declared in this scope
> 625 | static_cast<void>(pthread_setname_np(thread.native_handle(), name.c_str()));
> | ^~~~~~~~~~~~~~~~~~
> So only enable threads if NPTL is available
> Fixes: 2f8feb66204ff661e9fd5f508e2dfd1ebc0f2813
> - http://autobuild.buildroot.org/results/03677de6270ff5de61fff2a76e5cd723aa34e64e
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Committed to 2024.02.x, thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-20 20:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-05 12:52 [Buildroot] [PATCH 1/1] package/botan: fix build without NPTL Fabrice Fontaine
2024-03-06 14:18 ` Peter Korsgaard
2024-03-20 20:37 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox