depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv
depends on BR2_USE_MMU # libuv
depends on !BR2_STATIC_LIBS # libuv
+ depends on BR2_TOOLCHAIN_HAS_ATOMIC
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libuv
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::shared_future
select BR2_PACKAGE_LIBUV
comment "wampcc needs a toolchain w/ C++, NPTL, dynamic library"
depends on BR2_USE_MMU
+ depends on BR2_TOOLCHAIN_HAS_ATOMIC
depends on BR2_TOOLCHAIN_HAS_SYNC_4
depends on !BR2_INSTALL_LIBSTDCPP || \
!BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
comment "wampcc needs a toolchain not affected by GCC bug 64735"
depends on BR2_USE_MMU
+ depends on BR2_TOOLCHAIN_HAS_ATOMIC
depends on BR2_TOOLCHAIN_HAS_SYNC_4
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
WAMPCC_LICENSE = MIT
WAMPCC_LICENSE_FILES = LICENSE
+# Uses __atomic_fetch_add_8
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+WAMPCC_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic"
+endif
+
$(eval $(cmake-package))