From: Bernd Kuhls Date: Mon, 5 Sep 2016 21:00:56 +0000 (+0200) Subject: package/opencv3: use BR2_TOOLCHAIN_HAS_LIBATOMIC X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4904c4c;p=buildroot.git package/opencv3: use BR2_TOOLCHAIN_HAS_LIBATOMIC It uses __atomic_fetch_add_4 so libatomic must be pulled in if necessary. Fixes http://autobuild.buildroot.net/results/652/6521223b426c3cb4dfefab27bc6021900db6910e/ Signed-off-by: Bernd Kuhls Signed-off-by: Thomas Petazzoni --- diff --git a/package/opencv3/Config.in b/package/opencv3/Config.in index 2f4aa7aca8..4c00bf1b94 100644 --- a/package/opencv3/Config.in +++ b/package/opencv3/Config.in @@ -1,6 +1,7 @@ menuconfig BR2_PACKAGE_OPENCV3 bool "opencv3" select BR2_PACKAGE_ZLIB + depends on BR2_TOOLCHAIN_HAS_ATOMIC depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL depends on BR2_INSTALL_LIBSTDCPP depends on BR2_USE_WCHAR @@ -335,6 +336,7 @@ config BR2_PACKAGE_OPENCV3_INSTALL_DATA endif # BR2_PACKAGE_OPENCV3 comment "opencv3 needs a toolchain w/ C++, NPTL, wchar, dynamic library" + depends on BR2_TOOLCHAIN_HAS_ATOMIC depends on !BR2_INSTALL_LIBSTDCPP || \ !BR2_USE_WCHAR || \ !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ diff --git a/package/opencv3/opencv3.mk b/package/opencv3/opencv3.mk index 91cdfe6428..2529de9f4b 100644 --- a/package/opencv3/opencv3.mk +++ b/package/opencv3/opencv3.mk @@ -10,6 +10,11 @@ OPENCV3_INSTALL_STAGING = YES OPENCV3_LICENSE = BSD-3c OPENCV3_LICENSE_FILES = LICENSE +# Uses __atomic_fetch_add_4 +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +OPENCV3_CONF_OPTS += -DCMAKE_CXX_FLAGS="-latomic" +endif + # OpenCV component options OPENCV3_CONF_OPTS += \ -DBUILD_DOCS=OFF \