Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] libarchive: fix build error when linking with lzma
@ 2016-07-21 12:20 Sergio Prado
  2016-07-21 13:42 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Sergio Prado @ 2016-07-21 12:20 UTC (permalink / raw)
  To: buildroot

Build fails when linking with liblzma compiled without threads support.

./.libs/libarchive.so: undefined reference to `lzma_cputhreads'
./.libs/libarchive.so: undefined reference to `lzma_stream_encoder_mt'

So let's enable LZMA only when toolchain has threads support.

Fixes:
http://autobuild.buildroot.org/results/2cb7f8a056982d0b894d0e2531ef357e74c8b796
http://autobuild.buildroot.org/results/d12954fbd460d396f255158fa127f39ff9d2be8d
http://autobuild.buildroot.org/results/abe10c70f38423a212ab27d7d27e22174eaa5aab
Many more...

Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
---
 package/libarchive/libarchive.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/libarchive/libarchive.mk b/package/libarchive/libarchive.mk
index 6e9c0a1e867b..6d24258a6195 100644
--- a/package/libarchive/libarchive.mk
+++ b/package/libarchive/libarchive.mk
@@ -92,7 +92,8 @@ else
 LIBARCHIVE_CONF_OPTS += --without-zlib
 endif
 
-ifeq ($(BR2_PACKAGE_XZ),y)
+# libarchive requires LZMA with thread support in the toolchain
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),$(BR2_PACKAGE_XZ),yy)
 LIBARCHIVE_DEPENDENCIES += xz
 LIBARCHIVE_CONF_OPTS += --with-lzma
 else
-- 
1.9.1

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

end of thread, other threads:[~2016-07-21 13:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-21 12:20 [Buildroot] [PATCH] libarchive: fix build error when linking with lzma Sergio Prado
2016-07-21 13:42 ` Thomas Petazzoni

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