Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/1] package/libarchive: fix static linking against libpthread
@ 2016-08-28 10:21 Bernd Kuhls
  2016-10-16 14:33 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2016-08-28 10:21 UTC (permalink / raw)
  To: buildroot

Fixes
http://autobuild.buildroot.net/results/e94/e943ee5abc06b1812d7b34976e3a807859958935/

This commit also fixes fwup:
http://autobuild.buildroot.net/results/36b/36b0c6b68209ddd1b0f2db8449392af36876411f/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v2: Changed LIBARCHIVE_CONF_ENV from using LDFLAGS to using LIBS, this
    way -lpthread is included in libarchive.pc fixing linking problems
    in other packages using libarchive
    This patch follows the advice from Khem Raj:
    http://lists.busybox.net/pipermail/buildroot/2016-August/169712.html

 package/libarchive/libarchive.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/libarchive/libarchive.mk b/package/libarchive/libarchive.mk
index bcf92f9..d007f49 100644
--- a/package/libarchive/libarchive.mk
+++ b/package/libarchive/libarchive.mk
@@ -110,6 +110,12 @@ else
 LIBARCHIVE_CONF_OPTS += --without-lzma
 endif
 
+ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_HAS_THREADS),yy)
+# libarchive uses pthreads if available, but forgets to link with it
+# breaking static builds
+LIBARCHIVE_CONF_ENV = LIBS="-lpthread"
+endif
+
 # The only user of host-libarchive needs zlib support
 HOST_LIBARCHIVE_DEPENDENCIES = host-zlib
 HOST_LIBARCHIVE_CONF_OPTS = \
-- 
2.9.3

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

* [Buildroot] [PATCH v2 1/1] package/libarchive: fix static linking against libpthread
  2016-08-28 10:21 [Buildroot] [PATCH v2 1/1] package/libarchive: fix static linking against libpthread Bernd Kuhls
@ 2016-10-16 14:33 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-10-16 14:33 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 28 Aug 2016 12:21:21 +0200, Bernd Kuhls wrote:
> Fixes
> http://autobuild.buildroot.net/results/e94/e943ee5abc06b1812d7b34976e3a807859958935/
> 
> This commit also fixes fwup:
> http://autobuild.buildroot.net/results/36b/36b0c6b68209ddd1b0f2db8449392af36876411f/
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> v2: Changed LIBARCHIVE_CONF_ENV from using LDFLAGS to using LIBS, this
>     way -lpthread is included in libarchive.pc fixing linking problems
>     in other packages using libarchive
>     This patch follows the advice from Khem Raj:
>     http://lists.busybox.net/pipermail/buildroot/2016-August/169712.html

With the recent change in uClibc-ng merging libpthread in libc, this
patch is no longer needed, so I've marked it as rejected in patchwork.
I tested with fwup, and the problem is indeed fixed.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2016-10-16 14:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-28 10:21 [Buildroot] [PATCH v2 1/1] package/libarchive: fix static linking against libpthread Bernd Kuhls
2016-10-16 14:33 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox