Skip to contentSkip to conversation

package/boost: Boost.Atomic needs atomic intrinsics

PATCH In review Michael Nosthoff via buildroot 2 participants 3 messages Dec 23, 2022 – Aug 9, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/boost: Boost.Atomic needs atomic intrinsics

From: Michael <[email protected]>

similar to previous problems with nios2 and not-available atomic ints the build for Boost.Atomics also fails for ARC Targets which don't have the ATOMICS_EXT flag set.

according to [0] "Boost.Atomic has a hard requirement of the native atomic operations on bytes". The same tests mentioned there fail for ARC.

so introduce a dependency on BR2_ARC_ATOMIC_EXT for BR2_arc.

add depends clause for all packages using boost-atomic/filesystem.

Fixes:
http://autobuild.buildroot.net/results/4ca54a85672d7b9328b1909b457e548c6032a493

[0] https://github.com/boostorg/atomic/issues/42#issuecomment-734130348

---

I'm not 100% sure if BR2_ARC_ATOMIC_EXT is the correct flag to use. I'm open to suggestions for better ways and what to propagate to dependent packages.

---
 package/bitcoin/Config.in       | 1 +
 package/boost/Config.in         | 4 ++++
 package/botan/Config.in         | 4 ++--
 package/cc-tool/Config.in       | 2 ++
 package/domoticz/Config.in      | 4 +++-
 package/gnuradio/Config.in      | 1 +
 package/gqrx/Config.in          | 1 +
 package/i2pd/Config.in          | 3 +++
 package/libcpprestsdk/Config.in | 1 +
 package/log4cxx/Config.in       | 1 +
 package/mongodb/Config.in       | 1 +
 package/osm2pgsql/Config.in     | 2 ++
 package/pulseview/Config.in     | 2 ++
 package/supertux/Config.in      | 2 ++
 package/uhd/Config.in           | 2 ++
 15 files changed, 28 insertions(+), 3 deletions(-)
package/bitcoin/Config.in +1 -0
index a344811d6b..d46e8df9bc 100644
@@ -11,6 +11,7 @@ config BR2_PACKAGE_BITCOIN
 	bool "bitcoin"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread, boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
 	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/boost/Config.in +4 -0
index b99b01f22e..d06f164a39 100644
@@ -19,6 +19,7 @@ if BR2_PACKAGE_BOOST
 config BR2_PACKAGE_BOOST_ATOMIC
 	bool "boost-atomic"
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
 	help
 	  C++11-style atomic<>.
 
@@ -108,6 +109,7 @@ config BR2_PACKAGE_BOOST_FIBER
 	# since mips32r2/mips64r2.
 	depends on !BR2_MIPS_CPU_MIPS32 && !BR2_MIPS_CPU_MIPS64
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-filesystem
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context
 	select BR2_PACKAGE_BOOST_CONTEXT
 	select BR2_PACKAGE_BOOST_FILESYSTEM
@@ -129,6 +131,7 @@ comment "boost-fiber needs a toolchain not affected by GCC bug 64735"
 config BR2_PACKAGE_BOOST_FILESYSTEM
 	bool "boost-filesystem"
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic
 	select BR2_PACKAGE_BOOST_ATOMIC
 	select BR2_PACKAGE_BOOST_SYSTEM
 	help
@@ -200,6 +203,7 @@ 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_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
 	select BR2_PACKAGE_BOOST_ATOMIC
 	select BR2_PACKAGE_BOOST_DATE_TIME
package/botan/Config.in +2 -2
index 8f7f3f5c7a..9c35484275 100644
@@ -18,8 +18,8 @@ config BR2_PACKAGE_BOTAN
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_PACKAGE_BOTAN_ARCH_SUPPORTS
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::future
-	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
+	select BR2_PACKAGE_BOOST_FILESYSTEM if BR2_PACKAGE_BOOST && BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS && !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
+	select BR2_PACKAGE_BOOST_SYSTEM if BR2_PACKAGE_BOOST && BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS && !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
 	help
 	  Botan is a crypto library for C++
 
package/cc-tool/Config.in +2 -0
index fa5674b36d..5dca40cbbb 100644
@@ -3,6 +3,7 @@ config BR2_PACKAGE_CC_TOOL
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
 	depends on BR2_USE_WCHAR # boost-filesystem
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb
 	select BR2_PACKAGE_LIBUSB
@@ -20,6 +21,7 @@ config BR2_PACKAGE_CC_TOOL
 
 comment "cc-tool needs a toolchain w/ C++, threads, wchar, gcc >= 4.9 "
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
 	depends on !BR2_INSTALL_LIBSTDCPP || \
 		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \
 		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
package/domoticz/Config.in +3 -1
index 85361eecf0..bb4e49bf9a 100644
@@ -8,7 +8,8 @@ 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_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread, boost-atomic
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr
 	select BR2_PACKAGE_BOOST
 	select BR2_PACKAGE_BOOST_ATOMIC
@@ -36,6 +37,7 @@ config BR2_PACKAGE_DOMOTICZ
 comment "domoticz needs lua 5.3 and a toolchain w/ C++, gcc >= 6, NPTL, wchar, dynamic library"
 	depends on BR2_USE_MMU
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
 	depends on !BR2_INSTALL_LIBSTDCPP || \
 		!BR2_TOOLCHAIN_GCC_AT_LEAST_6 || \
 		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
package/gnuradio/Config.in +1 -0
index 103175946c..3766470cf7 100644
@@ -16,6 +16,7 @@ config BR2_PACKAGE_GNURADIO
 	depends on BR2_USE_MMU # use fork()
 	depends on BR2_USE_WCHAR # boost
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic, boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_43744
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
 	select BR2_PACKAGE_BOOST
package/gqrx/Config.in +1 -0
index adcdbb0896..fd4274f3a0 100644
@@ -21,6 +21,7 @@ config BR2_PACKAGE_GQRX
 	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_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_43744 # gnuradio
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # gnuradio
 	select BR2_PACKAGE_BOOST
package/i2pd/Config.in +3 -0
index c1ba08ef75..6076d43837 100644
@@ -5,6 +5,7 @@ config BR2_PACKAGE_I2PD
 	# pthread_condattr_setclock
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_USE_WCHAR # boost
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr
@@ -30,6 +31,7 @@ comment "i2pd needs a toolchain w/ C++, NPTL, wchar"
 	depends on BR2_USE_MMU
 	depends on BR2_TOOLCHAIN_HAS_ATOMIC
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
 	depends on !BR2_INSTALL_LIBSTDCPP || \
 		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_USE_WCHAR
 
@@ -37,4 +39,5 @@ comment "i2pd needs exception_ptr"
 	depends on BR2_USE_MMU
 	depends on BR2_TOOLCHAIN_HAS_ATOMIC
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
 	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
package/libcpprestsdk/Config.in +1 -0
index e533b30393..58818978d7 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_LIBCPPRESTSDK
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_USE_WCHAR # boost
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic, boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
 	select BR2_PACKAGE_BOOST
package/log4cxx/Config.in +1 -0
index 27a5f06988..34e54e90be 100644
@@ -7,6 +7,7 @@ config BR2_PACKAGE_LOG4CXX
 	depends on BR2_USE_MMU # apr
 	depends on BR2_USE_WCHAR || BR2_TOOLCHAIN_GCC_AT_LEAST_7 # boost
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS || BR2_TOOLCHAIN_GCC_AT_LEAST_7 # boost-thread
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) || BR2_TOOLCHAIN_GCC_AT_LEAST_7 # boost-atomic
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 || BR2_TOOLCHAIN_GCC_AT_LEAST_7 # boost-thread
 	select BR2_PACKAGE_APR
 	select BR2_PACKAGE_APR_UTIL
package/mongodb/Config.in +1 -0
index 1ea4282573..4053e4dbdb 100644
@@ -5,6 +5,7 @@ config BR2_PACKAGE_MONGODB_ARCH_SUPPORTS
 	default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5
 	default y if BR2_aarch64 || BR2_x86_64
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
 
 config BR2_PACKAGE_MONGODB
 	bool "mongodb"
package/osm2pgsql/Config.in +2 -0
index e903e92c49..834cfb5a93 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_OSM2PGSQL
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14
 	depends on BR2_TOOLCHAIN_HAS_THREADS # boost, libosmium
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
 	depends on BR2_USE_WCHAR # boost, libosmium
 	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::future
 	select BR2_PACKAGE_BOOST
@@ -24,6 +25,7 @@ config BR2_PACKAGE_OSM2PGSQL
 
 comment "osm2pgsql needs a toolchain w/ C++,  wchar, threads, gcc >= 4.9"
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
 		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || !BR2_TOOLCHAIN_HAS_THREADS
 
package/pulseview/Config.in +2 -0
index f122551b9f..0bec0594ab 100644
@@ -5,6 +5,7 @@ config BR2_PACKAGE_PULSEVIEW
 	depends on BR2_USE_WCHAR
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
 	depends on BR2_USE_MMU
 	depends on BR2_INSTALL_LIBSTDCPP
 	# libsigrok->libzip
@@ -34,6 +35,7 @@ comment "pulseview needs a toolchain w/ locale, wchar, threads, dynamic library,
 	depends on BR2_USE_MMU
 	depends on BR2_PACKAGE_QT5
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
 	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || !BR2_USE_WCHAR \
 		|| !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP \
 		|| BR2_STATIC_LIBS || !BR2_ENABLE_LOCALE || \
package/supertux/Config.in +2 -0
index e8e96a3ae5..62d2d67c7b 100644
@@ -7,6 +7,7 @@ config BR2_PACKAGE_SUPERTUX
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_6 # C++14
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # openal
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
 	depends on BR2_USE_MMU # SDL2 OpenGL (GLX)
 	depends on !BR2_STATIC_LIBS # SDL2
 	depends on BR2_USE_WCHAR # Boost
@@ -40,6 +41,7 @@ comment "supertux needs OpenGL and a toolchain w/ C++, gcc >= 6, NPTL, dynamic l
 	depends on BR2_PACKAGE_XORG7
 	depends on BR2_USE_MMU
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_HAS_LIBGL || \
 		!BR2_TOOLCHAIN_GCC_AT_LEAST_6 || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
 		BR2_STATIC_LIBS || !BR2_USE_WCHAR
package/uhd/Config.in +2 -0
index 75554259d0..4514c9529b 100644
@@ -1,6 +1,7 @@
 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_arc && !BR2_ARC_ATOMIC_EXT)
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
 		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
 
@@ -12,6 +13,7 @@ config BR2_PACKAGE_UHD
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic, boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
 	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 · 6 lines
2.37.1 (Apple Git-137.1)

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 9 lines · Michael Nosthoff via buildroot

From: Michael <[email protected]>

similar to previous problems with nios2 and not-available atomic ints the build for Boost.Atomics also fails for ARC Targets which don't have the ATOMICS_EXT flag set.

according to [0] "Boost.Atomic has a hard requirement of the native atomic operations on bytes". The same tests mentioned there fail for ARC.

Based on that comment, the option
BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS was introduced. So that one should have been used instead.

Quoted 11 lines

so introduce a dependency on BR2_ARC_ATOMIC_EXT for BR2_arc.

add depends clause for all packages using boost-atomic/filesystem.

Fixes:

   http://autobuild.buildroot.net/results/4ca54a85672d7b9328b1909b457e548c6032a493

[0] https://github.com/boostorg/atomic/issues/42#issuecomment-734130348

I changed the entire patch to this:

toolchain/Config.in +1 -0
index 1aa17cbfbd..8acdc62fc2 100644
@@ -94,6 +94,7 @@ config BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
        depends on !BR2_ARM_CPU_ARMV5
        depends on !BR2_sparc_v8
        depends on !BR2_m68k_cf5208
+       depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
 
 # GCC uses thunk functions to adjust the 'this' pointer when calling
 # C++ member functions in classes derived with multiple inheritance.

and applied to master, thanks.

Regards,
Arnout

Quoted 288 lines

---

I'm not 100% sure if BR2_ARC_ATOMIC_EXT is the correct flag to use. I'm open to suggestions for better ways and what to propagate to dependent packages.

---
  package/bitcoin/Config.in       | 1 +
  package/boost/Config.in         | 4 ++++
  package/botan/Config.in         | 4 ++--
  package/cc-tool/Config.in       | 2 ++
  package/domoticz/Config.in      | 4 +++-
  package/gnuradio/Config.in      | 1 +
  package/gqrx/Config.in          | 1 +
  package/i2pd/Config.in          | 3 +++
  package/libcpprestsdk/Config.in | 1 +
  package/log4cxx/Config.in       | 1 +
  package/mongodb/Config.in       | 1 +
  package/osm2pgsql/Config.in     | 2 ++
  package/pulseview/Config.in     | 2 ++
  package/supertux/Config.in      | 2 ++
  package/uhd/Config.in           | 2 ++
  15 files changed, 28 insertions(+), 3 deletions(-)
package/bitcoin/Config.in +1 -0
index a344811d6b..d46e8df9bc 100644
@@ -11,6 +11,7 @@ config BR2_PACKAGE_BITCOIN
  	bool "bitcoin"
  	depends on BR2_INSTALL_LIBSTDCPP
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread, boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
  	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/boost/Config.in +4 -0
index b99b01f22e..d06f164a39 100644
@@ -19,6 +19,7 @@ if BR2_PACKAGE_BOOST
  config BR2_PACKAGE_BOOST_ATOMIC
  	bool "boost-atomic"
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
  	help
  	  C++11-style atomic<>.
 
@@ -108,6 +109,7 @@ config BR2_PACKAGE_BOOST_FIBER
  	# since mips32r2/mips64r2.
  	depends on !BR2_MIPS_CPU_MIPS32 && !BR2_MIPS_CPU_MIPS64
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-filesystem
  	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-context
  	select BR2_PACKAGE_BOOST_CONTEXT
  	select BR2_PACKAGE_BOOST_FILESYSTEM
@@ -129,6 +131,7 @@ comment "boost-fiber needs a toolchain not affected by GCC bug 64735"
  config BR2_PACKAGE_BOOST_FILESYSTEM
  	bool "boost-filesystem"
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic
  	select BR2_PACKAGE_BOOST_ATOMIC
  	select BR2_PACKAGE_BOOST_SYSTEM
  	help
@@ -200,6 +203,7 @@ 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_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic
  	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
  	select BR2_PACKAGE_BOOST_ATOMIC
  	select BR2_PACKAGE_BOOST_DATE_TIME
package/botan/Config.in +2 -2
index 8f7f3f5c7a..9c35484275 100644
@@ -18,8 +18,8 @@ config BR2_PACKAGE_BOTAN
  	depends on BR2_TOOLCHAIN_HAS_THREADS
  	depends on BR2_PACKAGE_BOTAN_ARCH_SUPPORTS
  	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::future
-	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
+	select BR2_PACKAGE_BOOST_FILESYSTEM if BR2_PACKAGE_BOOST && BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS && !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
+	select BR2_PACKAGE_BOOST_SYSTEM if BR2_PACKAGE_BOOST && BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS && !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
  	help
  	  Botan is a crypto library for C++
 
package/cc-tool/Config.in +2 -0
index fa5674b36d..5dca40cbbb 100644
@@ -3,6 +3,7 @@ config BR2_PACKAGE_CC_TOOL
  	depends on BR2_INSTALL_LIBSTDCPP
  	depends on BR2_TOOLCHAIN_HAS_THREADS
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
  	depends on BR2_USE_WCHAR # boost-filesystem
  	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb
  	select BR2_PACKAGE_LIBUSB
@@ -20,6 +21,7 @@ config BR2_PACKAGE_CC_TOOL
 
  comment "cc-tool needs a toolchain w/ C++, threads, wchar, gcc >= 4.9 "
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
  	depends on !BR2_INSTALL_LIBSTDCPP || \
  		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \
  		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
package/domoticz/Config.in +3 -1
index 85361eecf0..bb4e49bf9a 100644
@@ -8,7 +8,8 @@ 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_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-thread, boost-atomic
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic
  	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr
  	select BR2_PACKAGE_BOOST
  	select BR2_PACKAGE_BOOST_ATOMIC
@@ -36,6 +37,7 @@ config BR2_PACKAGE_DOMOTICZ
  comment "domoticz needs lua 5.3 and a toolchain w/ C++, gcc >= 6, NPTL, wchar, dynamic library"
  	depends on BR2_USE_MMU
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
  	depends on !BR2_INSTALL_LIBSTDCPP || \
  		!BR2_TOOLCHAIN_GCC_AT_LEAST_6 || \
  		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
package/gnuradio/Config.in +1 -0
index 103175946c..3766470cf7 100644
@@ -16,6 +16,7 @@ config BR2_PACKAGE_GNURADIO
  	depends on BR2_USE_MMU # use fork()
  	depends on BR2_USE_WCHAR # boost
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic, boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
  	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_43744
  	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
  	select BR2_PACKAGE_BOOST
package/gqrx/Config.in +1 -0
index adcdbb0896..fd4274f3a0 100644
@@ -21,6 +21,7 @@ config BR2_PACKAGE_GQRX
  	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_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
  	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_43744 # gnuradio
  	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # gnuradio
  	select BR2_PACKAGE_BOOST
package/i2pd/Config.in +3 -0
index c1ba08ef75..6076d43837 100644
@@ -5,6 +5,7 @@ config BR2_PACKAGE_I2PD
  	# pthread_condattr_setclock
  	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
  	depends on BR2_INSTALL_LIBSTDCPP
  	depends on BR2_USE_WCHAR # boost
  	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr
@@ -30,6 +31,7 @@ comment "i2pd needs a toolchain w/ C++, NPTL, wchar"
  	depends on BR2_USE_MMU
  	depends on BR2_TOOLCHAIN_HAS_ATOMIC
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
  	depends on !BR2_INSTALL_LIBSTDCPP || \
  		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_USE_WCHAR
 
@@ -37,4 +39,5 @@ comment "i2pd needs exception_ptr"
  	depends on BR2_USE_MMU
  	depends on BR2_TOOLCHAIN_HAS_ATOMIC
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
  	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
package/libcpprestsdk/Config.in +1 -0
index e533b30393..58818978d7 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_LIBCPPRESTSDK
  	depends on BR2_INSTALL_LIBSTDCPP
  	depends on BR2_USE_WCHAR # boost
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic, boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
  	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # exception_ptr
  	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
  	select BR2_PACKAGE_BOOST
package/log4cxx/Config.in +1 -0
index 27a5f06988..34e54e90be 100644
@@ -7,6 +7,7 @@ config BR2_PACKAGE_LOG4CXX
  	depends on BR2_USE_MMU # apr
  	depends on BR2_USE_WCHAR || BR2_TOOLCHAIN_GCC_AT_LEAST_7 # boost
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS || BR2_TOOLCHAIN_GCC_AT_LEAST_7 # boost-thread
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) || BR2_TOOLCHAIN_GCC_AT_LEAST_7 # boost-atomic
  	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 || BR2_TOOLCHAIN_GCC_AT_LEAST_7 # boost-thread
  	select BR2_PACKAGE_APR
  	select BR2_PACKAGE_APR_UTIL
package/mongodb/Config.in +1 -0
index 1ea4282573..4053e4dbdb 100644
@@ -5,6 +5,7 @@ config BR2_PACKAGE_MONGODB_ARCH_SUPPORTS
  	default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5
  	default y if BR2_aarch64 || BR2_x86_64
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
 
  config BR2_PACKAGE_MONGODB
  	bool "mongodb"
package/osm2pgsql/Config.in +2 -0
index e903e92c49..834cfb5a93 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_OSM2PGSQL
  	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14
  	depends on BR2_TOOLCHAIN_HAS_THREADS # boost, libosmium
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
  	depends on BR2_USE_WCHAR # boost, libosmium
  	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::future
  	select BR2_PACKAGE_BOOST
@@ -24,6 +25,7 @@ config BR2_PACKAGE_OSM2PGSQL
 
  comment "osm2pgsql needs a toolchain w/ C++,  wchar, threads, gcc >= 4.9"
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
  	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
  		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || !BR2_TOOLCHAIN_HAS_THREADS
 
package/pulseview/Config.in +2 -0
index f122551b9f..0bec0594ab 100644
@@ -5,6 +5,7 @@ config BR2_PACKAGE_PULSEVIEW
  	depends on BR2_USE_WCHAR
  	depends on BR2_TOOLCHAIN_HAS_THREADS
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
  	depends on BR2_USE_MMU
  	depends on BR2_INSTALL_LIBSTDCPP
  	# libsigrok->libzip
@@ -34,6 +35,7 @@ comment "pulseview needs a toolchain w/ locale, wchar, threads, dynamic library,
  	depends on BR2_USE_MMU
  	depends on BR2_PACKAGE_QT5
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
  	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || !BR2_USE_WCHAR \
  		|| !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP \
  		|| BR2_STATIC_LIBS || !BR2_ENABLE_LOCALE || \
package/supertux/Config.in +2 -0
index e8e96a3ae5..62d2d67c7b 100644
@@ -7,6 +7,7 @@ config BR2_PACKAGE_SUPERTUX
  	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_6 # C++14
  	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # openal
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
  	depends on BR2_USE_MMU # SDL2 OpenGL (GLX)
  	depends on !BR2_STATIC_LIBS # SDL2
  	depends on BR2_USE_WCHAR # Boost
@@ -40,6 +41,7 @@ comment "supertux needs OpenGL and a toolchain w/ C++, gcc >= 6, NPTL, dynamic l
  	depends on BR2_PACKAGE_XORG7
  	depends on BR2_USE_MMU
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
  	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_HAS_LIBGL || \
  		!BR2_TOOLCHAIN_GCC_AT_LEAST_6 || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
  		BR2_STATIC_LIBS || !BR2_USE_WCHAR
package/uhd/Config.in +1 -0
index 75554259d0..4514c9529b 100644
@@ -1,6 +1,7 @@
  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_arc && !BR2_ARC_ATOMIC_EXT)
  	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
  		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
 

package/uhd/Config.in config BR2_PACKAGE_UHD · line 19

Quoted 7 lines
package/uhd/Config.in +1 -0
@@ -12,6 +13,7 @@ config BR2_PACKAGE_UHD
  	depends on BR2_INSTALL_LIBSTDCPP
  	depends on !BR2_STATIC_LIBS
  	depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic, boost-filesystem
+	depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) # boost-atomic, boost-filesystem
  	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
  	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
  	depends on BR2_USE_MMU # use fork()

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
Quoted 41 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle via buildroot <[email protected]> writes:

Quoted 8 lines · Michael Nosthoff via buildroot

From: Michael <[email protected]>
similar to previous problems with nios2 and not-available atomic ints
the build for Boost.Atomics also fails for ARC Targets which don't have the ATOMICS_EXT flag set.
according to [0] "Boost.Atomic has a hard requirement of the native atomic operations on bytes". The same tests mentioned there fail for ARC.

Based on that comment, the option BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS was introduced. So that one should have been used instead.

Quoted 7 lines

so introduce a dependency on BR2_ARC_ATOMIC_EXT for BR2_arc. add depends clause for all packages using boost-atomic/filesystem. Fixes:
http://autobuild.buildroot.net/results/4ca54a85672d7b9328b1909b457e548c6032a493
[0]
https://github.com/boostorg/atomic/issues/42#issuecomment-734130348

I changed the entire patch to this:

toolchain/Config.in +1 -0
index 1aa17cbfbd..8acdc62fc2 100644
@@ -94,6 +94,7 @@ config BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
        depends on !BR2_ARM_CPU_ARMV5
        depends on !BR2_sparc_v8
        depends on !BR2_m68k_cf5208
+       depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT)
 
 # GCC uses thunk functions to adjust the 'this' pointer when calling
 # C++ member functions in classes derived with multiple inheritance.
Quoted 1 line

and applied to master, thanks.

Committed to 2024.02.x and 2024.05.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot