package/boost: atomics needs always lockfree atomic bytes
PATCH 1/1 package/boost: atomics needs always lockfree atomic bytes
Since version 1.74.0, boost atomics needs a toolchain that always supports lockfree atomic bytes so add dependendy on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS:
https://github.com/boostorg/atomic/issues/42
Fixes:
- http://autobuild.buildroot.org/results/c03a786791e3aa7801cf1bff9934c4a105f54ce1
--- package/azmq/Config.in | 2 ++ package/bitcoin/Config.in | 4 +++- package/boost/Config.in | 6 +++++- package/domoticz/Config.in | 2 ++ package/gnuradio/Config.in | 2 ++ package/gqrx/Config.in | 4 +++- package/libcpprestsdk/Config.in | 2 ++ package/uhd/Config.in | 2 ++ 8 files changed, 21 insertions(+), 3 deletions(-)
package/azmq/Config.in +2 -0
@@ -5,6 +5,7 @@ config BR2_PACKAGE_AZMQ depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # boost-log depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 depends on BR2_USE_WCHAR # boost + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr select BR2_PACKAGE_ZEROMQ select BR2_PACKAGE_BOOST
@@ -21,6 +22,7 @@ config BR2_PACKAGE_AZMQ https://github.com/zeromq/azmq comment "azmq needs a toolchain w/ C++11, wchar and NPTL" + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 \ && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS_NPTL)
package/bitcoin/Config.in +3 -1
@@ -10,6 +10,7 @@ config BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS config BR2_PACKAGE_BITCOIN bool "bitcoin" depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::future depends on BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_HAS_THREADS # boost
@@ -36,7 +37,8 @@ config BR2_PACKAGE_BITCOIN https://bitcoincore.org comment "bitcoin needs a toolchain w/ C++, threads, wchar" - depends on BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS + depends on BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS || \ + BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS depends on !BR2_INSTALL_LIBSTDCPP || \ !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
package/boost/Config.in +5 -1
@@ -52,6 +52,7 @@ config BR2_PACKAGE_BOOST_LAYOUT config BR2_PACKAGE_BOOST_ATOMIC bool "boost-atomic" + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS help C++11-style atomic<>.
@@ -207,6 +208,7 @@ comment "boost-locale needs a toolchain not affected by GCC bug 64735" config BR2_PACKAGE_BOOST_LOG bool "boost-log" depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread select BR2_PACKAGE_BOOST_ATOMIC select BR2_PACKAGE_BOOST_DATE_TIME
@@ -218,6 +220,7 @@ config BR2_PACKAGE_BOOST_LOG Logging library. comment "boost-log needs a toolchain w/ NPTL" + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL comment "boost-log needs a toolchain not affected by GCC bug 64735"
@@ -313,8 +316,9 @@ config BR2_PACKAGE_BOOST_TEST config BR2_PACKAGE_BOOST_THREAD bool "boost-thread" + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::current_exception - select BR2_PACKAGE_BOOST_ATOMIC if !BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS + select BR2_PACKAGE_BOOST_ATOMIC select BR2_PACKAGE_BOOST_CHRONO select BR2_PACKAGE_BOOST_SYSTEM help
package/domoticz/Config.in +2 -0
@@ -8,6 +8,7 @@ config BR2_PACKAGE_DOMOTICZ depends on BR2_INSTALL_LIBSTDCPP depends on BR2_USE_WCHAR depends on BR2_PACKAGE_LUA_5_3 + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr select BR2_PACKAGE_BOOST select BR2_PACKAGE_BOOST_DATE_TIME
@@ -32,6 +33,7 @@ config BR2_PACKAGE_DOMOTICZ comment "domoticz needs lua 5.3 and a toolchain w/ C++, gcc >= 4.8, NPTL, wchar, dynamic library" depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS depends on !BR2_INSTALL_LIBSTDCPP || \ !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || \ !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
package/gnuradio/Config.in +2 -0
@@ -1,5 +1,6 @@ comment "gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic library" depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
@@ -13,6 +14,7 @@ config BR2_PACKAGE_GNURADIO depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL depends on BR2_USE_MMU # use fork() depends on BR2_USE_WCHAR # boost + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread select BR2_PACKAGE_BOOST select BR2_PACKAGE_BOOST_ATOMIC
package/gqrx/Config.in +3 -1
@@ -1,6 +1,7 @@ comment "gqrx needs a toolchain w/ C++, threads, wchar, dynamic library" depends on BR2_USE_MMU # gnuradio - depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC || \ + BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ !BR2_USE_WCHAR || !BR2_STATIC_LIBS
@@ -19,6 +20,7 @@ config BR2_PACKAGE_GQRX depends on BR2_USE_WCHAR # boost depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC depends on BR2_PACKAGE_QT5 + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # gnuradio -> boost-atomic depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # gnuradio select BR2_PACKAGE_BOOST select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
package/libcpprestsdk/Config.in +2 -0
@@ -3,6 +3,7 @@ config BR2_PACKAGE_LIBCPPRESTSDK depends on BR2_ENABLE_LOCALE depends on BR2_INSTALL_LIBSTDCPP depends on BR2_USE_WCHAR # boost + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL select BR2_PACKAGE_BOOST
@@ -23,6 +24,7 @@ config BR2_PACKAGE_LIBCPPRESTSDK https://github.com/Microsoft/cpprestsdk comment "libcpprestsdk needs a toolchain w/ NPTL, C++, wchar, locale" + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ !BR2_INSTALL_LIBSTDCPP || \ !BR2_USE_WCHAR || !BR2_ENABLE_LOCALE
package/uhd/Config.in +2 -0
@@ -1,5 +1,6 @@ comment "uhd needs a toolchain w/ C++, NPTL, wchar, dynamic library" depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
@@ -10,6 +11,7 @@ config BR2_PACKAGE_UHD bool "uhd" depends on BR2_INSTALL_LIBSTDCPP depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL depends on BR2_USE_MMU # use fork()
Signature · 1 line
2.29.2
PATCH 1/1 package/boost: atomics needs always lockfree atomic bytes
Hello Fabrice,
Quoted 9 lines · On Fri, 27 Nov 2020 18:48:29 +0100 Fabrice Fontaine…
Since version 1.74.0, boost atomics needs a toolchain that always supports lockfree atomic bytes so add dependendy on
BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS:
https://github.com/boostorg/atomic/issues/42Fixes:
- http://autobuild.buildroot.org/results/c03a786791e3aa7801cf1bff9934c4a105f54ce1Signed-off-by Fabrice Fontaine <[email protected]>
Thanks for the research! A couple of comments/questions below.
Quoted 13 lines
package/bitcoin/Config.in +1
-0@@ -10,6 +10,7 @@ config BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS config BR2_PACKAGE_BITCOIN bool "bitcoin" depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::future depends on BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_HAS_THREADS # boost
package/bitcoin/Config.in config BR2_PACKAGE_BITCOIN · line 40
Quoted 5 lines
package/bitcoin/Config.in +1
-1@@ -36,7 +37,8 @@ config BR2_PACKAGE_BITCOIN https://bitcoincore.org comment "bitcoin needs a toolchain w/ C++, threads, wchar" - depends on BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS + depends on BR2_PACKAGE_BITCOIN_ARCH_SUPPORTS || \
This should be a && here, as we want to see the comment only if the arch is supported *and* lock free atomics are provided.
package/bitcoin/Config.in config BR2_PACKAGE_BITCOIN
Quoted 6 lines
package/bitcoin/Config.in +2
-1config BR2_PACKAGE_BOOST_THREAD bool "boost-thread" + depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::current_exception - select BR2_PACKAGE_BOOST_ATOMIC if !BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS + select BR2_PACKAGE_BOOST_ATOMIC
Are you sure there ? boost-atomic was only needed by boost-thread *if* the toolchain did not provide lock free atomic ints. But anyway, now boost-atomic always requires lockfree atomic ints.
So are you sure boost-atomic still has to be selected here ?
package/bitcoin/Config.in
Quoted 3 lines
comment "gqrx needs a toolchain w/ C++, threads, wchar, dynamic library"
package/bitcoin/Config.in +0
-1depends on BR2_USE_MMU # gnuradio - depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC
This should have been a && here.
package/bitcoin/Config.in
Quoted 2 lines
package/bitcoin/Config.in +2
-0+ depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC || \ + BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
And so another && it should be there.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com