Skip to contentSkip to conversation

libqrencode: link with pthread to avoid build failure

PATCH New Danomi Manchego 2 participants 3 messages Sep 14, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 libqrencode: link with pthread to avoid build failure

---
 package/libqrencode/libqrencode.mk | 2 ++
 1 file changed, 2 insertions(+)
package/libqrencode/libqrencode.mk +2 -0
index d445763..085d0ae 100644
@@ -11,6 +11,8 @@ LIBQRENCODE_INSTALL_STAGING = YES
 LIBQRENCODE_LICENSE = LGPLv2.1+
 LIBQRENCODE_LICENSE_FILES = COPYING
 
+LIBQRENCODE_CONF_OPT = LIBS='-pthread'
+
 ifeq ($(BR2_PACKAGE_LIBQRENCODE_TOOLS),y)
 LIBQRENCODE_CONF_OPT += --with-tools=yes
 LIBQRENCODE_DEPENDENCIES += libpng
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 libqrencode: needs thread support

---
 package/libqrencode/Config.in | 4 ++++
 1 file changed, 4 insertions(+)
package/libqrencode/Config.in +4 -0
index b866626..2888113 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_LIBQRENCODE
 	bool "libqrencode"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
 	help
 	  libqrencode is a C library for encoding data in a QR Code
 	  symbol, a kind of 2D symbology that can be scanned by handy
@@ -18,3 +19,6 @@ config BR2_PACKAGE_LIBQRENCODE_TOOLS
 	  Build command-line tools
 
 endif #BR2_PACKAGE_LIBQRENCODE
+
+comment "libqrencode needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/2 libqrencode: link with pthread to avoid build failure

In reply to Danomi Manchego
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Danomi" == Danomi Manchego <[email protected]> writes:

---
 package/libqrencode/libqrencode.mk | 2 ++
 1 file changed, 2 insertions(+)
package/libqrencode/libqrencode.mk +0 -0
index d445763..085d0ae 100644

package/libqrencode/libqrencode.mk LIBQRENCODE_INSTALL_STAGING = YES · line 15

Quoted 5 lines
package/libqrencode/libqrencode.mk +2 -0
@@ -11,6 +11,8 @@ LIBQRENCODE_INSTALL_STAGING = YES
 LIBQRENCODE_LICENSE = LGPLv2.1+
 LIBQRENCODE_LICENSE_FILES = COPYING
 
+LIBQRENCODE_CONF_OPT = LIBS='-pthread'
+

Looking at configure.ac I see that pthread support is optional, so this should only be done if BR2_TOOLCHAIN_HAS_THREADS, otherwise we need to pass --disable-thread-safety.

Committed with that fixed, thanks. The 2nd patch then doesn't make any sense, so I've dropped that one.

Signature · 1 line
Bye, Peter Korsgaard