strongswan: needs __atomic operations
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 24 May 2016 15:29:53 +0000 (17:29 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 24 May 2016 19:49:33 +0000 (21:49 +0200)
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>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/strongswan/Config.in
package/strongswan/strongswan.mk

index cada78bb70d6b56671416421e8b40c83bbce9105..b49435c8c7935dd2a7b34476abd0a26a96ce4481 100644 (file)
@@ -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
index e7606c008ffe1b5f3bc7d6db6b0db9a8beb70097..36b51485359239dc3469de53e4a309335dbee427 100644 (file)
@@ -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 \