All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Hunleth <fhunleth@troodon-software.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] fwup: link in pthreads for static builds
Date: Wed, 10 Aug 2016 18:35:46 -0400	[thread overview]
Message-ID: <1470868546-8237-2-git-send-email-fhunleth@troodon-software.com> (raw)
In-Reply-To: <1470868546-8237-1-git-send-email-fhunleth@troodon-software.com>

Both libconfuse (via libintl) and libarchive have references to pthreads
but do not specify pthreads in their pkg-config descriptions. This
change adds pthreads to the fwup linker options so that the link step
succeeds.

Fixes autobuilder failures:

http://autobuild.buildroot.net/results/ce3793c79d5dc4e296d645c75f22e121f35030d3/
http://autobuild.buildroot.net/results/0c5ffec5438f766dade951a64ebfa1b734a3c0aa/
http://autobuild.buildroot.net/results/802/802b6d77e1b77b7c8fcb8f3b394cdabfd406de7a/

Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
---
 package/fwup/fwup.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/fwup/fwup.mk b/package/fwup/fwup.mk
index 3d3e3be..c5accc6 100644
--- a/package/fwup/fwup.mk
+++ b/package/fwup/fwup.mk
@@ -13,5 +13,13 @@ HOST_FWUP_DEPENDENCIES = host-libconfuse host-libarchive host-libsodium
 FWUP_AUTORECONF = YES
 FWUP_CONF_ENV = ac_cv_path_HELP2MAN=""
 
+# The following is needed to fix link errors in static configurations
+# due to libconfuse requiring pthreads via libintl and libarchive
+# using pthread_mutex_*. Neither list pthreads in their pkg-config
+# description.
+ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_HAS_THREADS),yy)
+FWUP_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -pthread"
+endif
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
-- 
2.7.4

  reply	other threads:[~2016-08-10 22:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-10 22:35 [Buildroot] [PATCH 1/2] fwup: bump version to v0.8.2 Frank Hunleth
2016-08-10 22:35 ` Frank Hunleth [this message]
2016-08-11 22:06   ` [Buildroot] [PATCH 2/2] fwup: link in pthreads for static builds Thomas Petazzoni
2016-08-12  2:32     ` Frank Hunleth
2016-08-12  4:54     ` Khem Raj
2016-08-12 13:51       ` Thomas Petazzoni
2016-08-12 15:05         ` Khem Raj
2016-10-16 14:32   ` Thomas Petazzoni
2016-10-16 15:02     ` Frank Hunleth
2016-08-20 13:04 ` [Buildroot] [PATCH 1/2] fwup: bump version to v0.8.2 Thomas Petazzoni

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=1470868546-8237-2-git-send-email-fhunleth@troodon-software.com \
    --to=fhunleth@troodon-software.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.