--- configure
+++ configure
@@ -12387,6 +12387,8 @@
     ;;
   esac
 
+  link_all_deplibs=yes # necessary because of uClibc-pthread bug
+
   ld_shlibs=yes
 
   # On some targets, GNU ld is compatible enough with the native linker
@@ -23628,7 +23630,7 @@
       { $as_echo "$as_me:${as_lineno-$LINENO}: detected CyaSSL" >&5
 $as_echo "$as_me: detected CyaSSL" >&6;}
 
-      LIBS="-lcyassl -lm $LIBS"
+      LIBS="-lcyassl -lpthread -lm $LIBS"
 
       if test -n "$cyassllib"; then
                                         if test "x$cross_compiling" != "xyes"; then
