Skip to contentSkip to conversation

strongswan: needs __atomic operations

PATCH New Thomas Petazzoni 2 participants 2 messages May 24, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 strongswan: needs __atomic operations

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/

---
 package/strongswan/Config.in     | 2 ++
 package/strongswan/strongswan.mk | 4 ++++
 2 files changed, 6 insertions(+)
package/strongswan/Config.in +2 -0
index cada78b..b49435c 100644
@@ -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
package/strongswan/strongswan.mk +4 -0
index e7606c0..36b5148 100644
@@ -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 \
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 strongswan: needs __atomic operations

Quoted 9 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> 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/

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard