Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/opencv3: use BR2_TOOLCHAIN_HAS_LIBATOMIC
@ 2016-09-05 21:00 Bernd Kuhls
  2016-09-05 21:20 ` Samuel Martin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Bernd Kuhls @ 2016-09-05 21:00 UTC (permalink / raw)
  To: buildroot

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 <bernd.kuhls@t-online.de>
---
 package/opencv3/Config.in  | 2 ++
 package/opencv3/opencv3.mk | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/package/opencv3/Config.in b/package/opencv3/Config.in
index 2f4aa7a..4c00bf1 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 91cdfe6..2529de9 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 \
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-09-06 19:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-05 21:00 [Buildroot] [PATCH 1/1] package/opencv3: use BR2_TOOLCHAIN_HAS_LIBATOMIC Bernd Kuhls
2016-09-05 21:20 ` Samuel Martin
2016-09-05 21:25   ` Thomas Petazzoni
2016-09-05 21:40     ` Samuel Martin
2016-09-05 21:39 ` Thomas Petazzoni
2016-09-05 21:49   ` Samuel Martin
2016-09-06 19:36 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox