All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] strongswan: needs __atomic operations
Date: Tue, 24 May 2016 17:29:53 +0200	[thread overview]
Message-ID: <1464103793-13228-1-git-send-email-thomas.petazzoni@free-electrons.com> (raw)

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

             reply	other threads:[~2016-05-24 15:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24 15:29 Thomas Petazzoni [this message]
2016-05-24 19:49 ` [Buildroot] [PATCH] strongswan: needs __atomic operations Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1464103793-13228-1-git-send-email-thomas.petazzoni@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.