aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Fabrice Fontaine <fontaine.fabrice@gmail.com>2020-10-17 15:46:23 +0200
committerGravatar Yann E. MORIN <yann.morin.1998@free.fr>2020-10-17 18:24:50 +0200
commitdd69967123870383496b5c8eb7b574e8b156b36d (patch)
tree7cb3f86dc86959c6aaa967696a4f2d6c901d97e2
parenta2f88b45de0dc76c801bf6a9fc315a85ed3b2abe (diff)
downloadbuildroot-dd69967123870383496b5c8eb7b574e8b156b36d.tar.gz
buildroot-dd69967123870383496b5c8eb7b574e8b156b36d.tar.bz2
package/opencv3: link with libatomic if needed
Restore the atomic workaround that was wrongly removed when bumping to version 3.4.9 in commit f6fb2cae0691d25b034b12a16261ee26096db7d1 as it seems that opencv3 still needs help to detect atomic library Fixes: - http://autobuild.buildroot.org/results/9162b29725f8d9b891eb74fcb8078f211140a841 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
-rw-r--r--package/opencv3/opencv3.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/package/opencv3/opencv3.mk b/package/opencv3/opencv3.mk
index de89aebca4..648cc66af3 100644
--- a/package/opencv3/opencv3.mk
+++ b/package/opencv3/opencv3.mk
@@ -13,6 +13,11 @@ OPENCV3_SUPPORTS_IN_SOURCE_BUILD = NO
OPENCV3_CXXFLAGS = $(TARGET_CXXFLAGS)
+# Uses __atomic_fetch_add_4
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+OPENCV3_CXXFLAGS += -latomic
+endif
+
# Fix c++11 build with missing std::exception_ptr
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_64735),y)
OPENCV3_CXXFLAGS += -DCV__EXCEPTION_PTR=0