* [Buildroot] [PATCH v2,1/1] wampcc: needs atomic
@ 2018-07-10 18:27 Fabrice Fontaine
2018-07-16 14:30 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2018-07-10 18:27 UTC (permalink / raw)
To: buildroot
Fixes:
- http://autobuild.buildroot.net/results/2f994762d4e01a904c50cf2728a4103e6e79da2a
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
Changes v1 -> v2 (after review of Thomas Petazzoni):
- Add BR2_TOOLCHAIN_HAS_ATOMIC in Config.in
package/wampcc/Config.in | 3 +++
package/wampcc/wampcc.mk | 5 +++++
2 files changed, 8 insertions(+)
diff --git a/package/wampcc/Config.in b/package/wampcc/Config.in
index 9cf7d99dfe..92abc9cb25 100644
--- a/package/wampcc/Config.in
+++ b/package/wampcc/Config.in
@@ -4,6 +4,7 @@ config BR2_PACKAGE_WAMPCC
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # libuv
depends on BR2_USE_MMU # libuv
depends on !BR2_STATIC_LIBS # libuv
+ depends on BR2_TOOLCHAIN_HAS_ATOMIC
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libuv
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::shared_future
select BR2_PACKAGE_LIBUV
@@ -17,11 +18,13 @@ config BR2_PACKAGE_WAMPCC
comment "wampcc needs a toolchain w/ C++, NPTL, dynamic library"
depends on BR2_USE_MMU
+ depends on BR2_TOOLCHAIN_HAS_ATOMIC
depends on BR2_TOOLCHAIN_HAS_SYNC_4
depends on !BR2_INSTALL_LIBSTDCPP || \
!BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
comment "wampcc needs a toolchain not affected by GCC bug 64735"
depends on BR2_USE_MMU
+ depends on BR2_TOOLCHAIN_HAS_ATOMIC
depends on BR2_TOOLCHAIN_HAS_SYNC_4
depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
diff --git a/package/wampcc/wampcc.mk b/package/wampcc/wampcc.mk
index d8e093f679..dcd65f49d5 100644
--- a/package/wampcc/wampcc.mk
+++ b/package/wampcc/wampcc.mk
@@ -11,4 +11,9 @@ WAMPCC_INSTALL_STAGING = YES
WAMPCC_LICENSE = MIT
WAMPCC_LICENSE_FILES = LICENSE
+# Uses __atomic_fetch_add_8
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+WAMPCC_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -latomic"
+endif
+
$(eval $(cmake-package))
--
2.14.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH v2,1/1] wampcc: needs atomic
2018-07-10 18:27 [Buildroot] [PATCH v2,1/1] wampcc: needs atomic Fabrice Fontaine
@ 2018-07-16 14:30 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2018-07-16 14:30 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 10 Jul 2018 20:27:40 +0200, Fabrice Fontaine wrote:
> Fixes:
> - http://autobuild.buildroot.net/results/2f994762d4e01a904c50cf2728a4103e6e79da2a
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> Changes v1 -> v2 (after review of Thomas Petazzoni):
> - Add BR2_TOOLCHAIN_HAS_ATOMIC in Config.in
Applied to master, thanks. I believe there's probably quite a few
packages that link with -latomic if BR2_TOOLCHAIN_HAS_LIBATOMIC=y, but
don't depend on BR2_TOOLCHAIN_HAS_ATOMIC. However, it's not as simple
as adding "depends on BR2_TOOLCHAIN_HAS_ATOMIC" to all packages that
link with -latomic, because some packages can use either __sync or
__atomic built-ins.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-16 14:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-10 18:27 [Buildroot] [PATCH v2,1/1] wampcc: needs atomic Fabrice Fontaine
2018-07-16 14:30 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox