libtorrent: use the proper BR2_TOOLCHAIN_HAS_SYNC_x symbols
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 2 Feb 2016 15:31:26 +0000 (16:31 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 6 Feb 2016 10:16:00 +0000 (11:16 +0100)
libtorrent uses 1 bytes and 4 bytes __sync built-ins, so let's use the
appropriate BR2_TOOLCHAIN_HAS_SYNC_x symbols instead of
BR2_ARCH_HAS_ATOMICS. The rtorrent package, which is a reverse
dependency of libtorrent, gets fixed as well.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[yann.morin.1998@free.fr: build-tested on an ARC toolchain without
 atomics, with CPU 770D]
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
package/libtorrent/Config.in
package/rtorrent/Config.in

index 17a1f232e7003d11967d86eec2514b22b5d73db1..4787f9c60d03d3e4cf8ddca56221a7e35048cf19 100644 (file)
@@ -2,7 +2,7 @@ config BR2_PACKAGE_LIBTORRENT
        bool "libtorrent"
        depends on BR2_INSTALL_LIBSTDCPP
        depends on BR2_TOOLCHAIN_HAS_THREADS
-       depends on BR2_ARCH_HAS_ATOMICS
+       depends on BR2_TOOLCHAIN_HAS_SYNC_1 && BR2_TOOLCHAIN_HAS_SYNC_4
        select BR2_PACKAGE_ZLIB
        help
          BitTorrent library written in C++ for *nix
@@ -10,5 +10,5 @@ config BR2_PACKAGE_LIBTORRENT
          https://github.com/rakshasa/libtorrent
 
 comment "libtorrent needs a toolchain w/ C++, threads"
-       depends on BR2_ARCH_HAS_ATOMICS
+       depends on BR2_TOOLCHAIN_HAS_SYNC_1 && BR2_TOOLCHAIN_HAS_SYNC_4
        depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
index 05831528247de3ec466a423f3c7484aebe8cd694..190e50fe26c71608c080db56901cda36b26f03e1 100644 (file)
@@ -4,7 +4,7 @@ config BR2_PACKAGE_RTORRENT
        depends on BR2_USE_WCHAR
        depends on BR2_TOOLCHAIN_HAS_THREADS
        depends on BR2_USE_MMU # fork()
-       depends on BR2_ARCH_HAS_ATOMICS # libtorrent
+       depends on BR2_TOOLCHAIN_HAS_SYNC_1 && BR2_TOOLCHAIN_HAS_SYNC_4
        select BR2_PACKAGE_LIBCURL
        select BR2_PACKAGE_LIBTORRENT
        select BR2_PACKAGE_NCURSES
@@ -16,5 +16,5 @@ config BR2_PACKAGE_RTORRENT
 
 comment "rtorrent needs a toolchain w/ C++, threads, wchar"
        depends on BR2_USE_MMU
-       depends on BR2_ARCH_HAS_ATOMICS
+       depends on BR2_TOOLCHAIN_HAS_SYNC_1 && BR2_TOOLCHAIN_HAS_SYNC_4
        depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS)