* [Buildroot] [PATCH v2,1/1] package/opencv3: fix build with atomic
@ 2020-10-17 13:46 Fabrice Fontaine
2020-10-17 16:26 ` [Buildroot] [PATCH v2, 1/1] " Yann E. MORIN
2020-10-29 15:04 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2020-10-17 13:46 UTC (permalink / raw)
To: buildroot
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>
---
Changes v1 -> v2 (after review of Yann E. Morin):
- Restore workaround instead of setting -DHAVE_CXX_ATOMICS_WITHOUT_LIB
package/opencv3/opencv3.mk | 5 +++++
1 file changed, 5 insertions(+)
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
--
2.28.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2, 1/1] package/opencv3: fix build with atomic
2020-10-17 13:46 [Buildroot] [PATCH v2,1/1] package/opencv3: fix build with atomic Fabrice Fontaine
@ 2020-10-17 16:26 ` Yann E. MORIN
2020-10-29 15:04 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2020-10-17 16:26 UTC (permalink / raw)
To: buildroot
On 2020-10-17 15:46 +0200, Fabrice Fontaine spake thusly:
> 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>
Applied to master, after tweaking the commit title to match the other
related commits 'link with libatomic if needed'. Thanks!
Regards,
Yann E. MORIN.
> ---
> Changes v1 -> v2 (after review of Yann E. Morin):
> - Restore workaround instead of setting -DHAVE_CXX_ATOMICS_WITHOUT_LIB
>
> package/opencv3/opencv3.mk | 5 +++++
> 1 file changed, 5 insertions(+)
>
> 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
> --
> 2.28.0
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH v2, 1/1] package/opencv3: fix build with atomic
2020-10-17 13:46 [Buildroot] [PATCH v2,1/1] package/opencv3: fix build with atomic Fabrice Fontaine
2020-10-17 16:26 ` [Buildroot] [PATCH v2, 1/1] " Yann E. MORIN
@ 2020-10-29 15:04 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2020-10-29 15:04 UTC (permalink / raw)
To: buildroot
>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
> 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>
> ---
> Changes v1 -> v2 (after review of Yann E. Morin):
> - Restore workaround instead of setting -DHAVE_CXX_ATOMICS_WITHOUT_LIB
Committed to 2020.02.x and 2020.08.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-29 15:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-17 13:46 [Buildroot] [PATCH v2,1/1] package/opencv3: fix build with atomic Fabrice Fontaine
2020-10-17 16:26 ` [Buildroot] [PATCH v2, 1/1] " Yann E. MORIN
2020-10-29 15:04 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox