diff mbox

package/ctorrent: fix static builds with threads

Message ID 1476616447-11298-1-git-send-email-razzor@kopf-tisch.de
State Rejected
Headers show

Commit Message

Olaf Rempel Oct. 16, 2016, 11:14 a.m. UTC
Fix static linking with enabled threads for some toolchains

./arm-buildroot-uclinux-uclibcgnueabi/lib/libstdc++.a(guard.o): In function `(anonymous namespace)::get_static_cond()':
guard.cc:(.text._ZN12_GLOBAL__N_115get_static_condEv+0x6): undefined reference to `pthread_once'

Fixes: http://autobuild.buildroot.net/results/138/138569071d0514a0301aa5568bc86706e692d5e9/

Signed-off-by: Olaf Rempel <razzor@kopf-tisch.de>
---
 package/ctorrent/ctorrent.mk | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Peter Korsgaard Oct. 16, 2016, 1:08 p.m. UTC | #1
>>>>> "Olaf" == Olaf Rempel <razzor@kopf-tisch.de> writes:

 > Fix static linking with enabled threads for some toolchains
 > ./arm-buildroot-uclinux-uclibcgnueabi/lib/libstdc++.a(guard.o): In
 > function `(anonymous namespace)::get_static_cond()':
 > guard.cc:(.text._ZN12_GLOBAL__N_115get_static_condEv+0x6): undefined reference to `pthread_once'

 > Fixes: http://autobuild.buildroot.net/results/138/138569071d0514a0301aa5568bc86706e692d5e9/

 > Signed-off-by: Olaf Rempel <razzor@kopf-tisch.de>

Thanks, but this is really a toolchain error with uClibc as ctorrent
doesn't use pthread. With the recently released uClibc-ng 1.0.18 this is
now fixed, so this is now fixed and I've marked this patch as rejected.
diff mbox

Patch

diff --git a/package/ctorrent/ctorrent.mk b/package/ctorrent/ctorrent.mk
index 55fc95e..a3564c5 100644
--- a/package/ctorrent/ctorrent.mk
+++ b/package/ctorrent/ctorrent.mk
@@ -16,4 +16,8 @@  else
 CTORRENT_CONF_OPTS += --with-ssl=no
 endif
 
+ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_HAS_THREADS),yy)
+CTORRENT_CONF_OPTS += LIBS=-pthread
+endif
+
 $(eval $(autotools-package))