All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] strongswan: needs __atomic operations
@ 2016-05-24 15:29 Thomas Petazzoni
  2016-05-24 19:49 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni @ 2016-05-24 15:29 UTC (permalink / raw)
  To: buildroot

strongswan uses the __atomic_*() intrinsics, so we make it depend on
BR2_TOOLCHAIN_HAS_ATOMIC and link with libatomic when available. This
allows to fix the build on SPARC, therefore fixing:

  http://autobuild.buildroot.org/results/7e090237801874fb889c76f84863dc4c2ca20450/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 package/strongswan/Config.in     | 2 ++
 package/strongswan/strongswan.mk | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/package/strongswan/Config.in b/package/strongswan/Config.in
index cada78b..b49435c 100644
--- a/package/strongswan/Config.in
+++ b/package/strongswan/Config.in
@@ -1,11 +1,13 @@
 comment "strongswan needs a toolchain w/ threads, dynamic library"
 	depends on BR2_USE_MMU
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC
 	depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
 
 menuconfig BR2_PACKAGE_STRONGSWAN
 	bool "strongswan"
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_HAS_ATOMIC
 	depends on !BR2_STATIC_LIBS
 	help
 	  strongSwan is an OpenSource IPsec implementation for the
diff --git a/package/strongswan/strongswan.mk b/package/strongswan/strongswan.mk
index e7606c0..36b5148 100644
--- a/package/strongswan/strongswan.mk
+++ b/package/strongswan/strongswan.mk
@@ -35,6 +35,10 @@ STRONGSWAN_CONF_OPTS += \
 	--enable-vici=$(if $(BR2_PACKAGE_STRONGSWAN_VICI),yes,no) \
 	--enable-swanctl=$(if $(BR2_PACKAGE_STRONGSWAN_VICI),yes,no)
 
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+STRONGSWAN_CONF_ENV += LIBS='-latomic'
+endif
+
 ifeq ($(BR2_PACKAGE_STRONGSWAN_EAP),y)
 STRONGSWAN_CONF_OPTS += \
 	--enable-eap-sim \
-- 
2.7.4

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

* [Buildroot] [PATCH] strongswan: needs __atomic operations
  2016-05-24 15:29 [Buildroot] [PATCH] strongswan: needs __atomic operations Thomas Petazzoni
@ 2016-05-24 19:49 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2016-05-24 19:49 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > strongswan uses the __atomic_*() intrinsics, so we make it depend on
 > BR2_TOOLCHAIN_HAS_ATOMIC and link with libatomic when available. This
 > allows to fix the build on SPARC, therefore fixing:

 >   http://autobuild.buildroot.org/results/7e090237801874fb889c76f84863dc4c2ca20450/

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2016-05-24 19:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-24 15:29 [Buildroot] [PATCH] strongswan: needs __atomic operations Thomas Petazzoni
2016-05-24 19:49 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.