*** ltmain.sh	2018-11-16 03:33:03.000000000 +0200
--- /home/dimpase/sage/upstream/ntl-11.3.2/src/libtool-origin/ltmain.sh	2019-08-29 00:25:12.246418715 +0300
***************
*** 5664,5669 ****
--- 5664,5679 ----
  	    *" $arg "*) ;;
  	    * ) func_append new_inherited_linker_flags " $arg" ;;
  	esac
+ 
+        # As we are forced to pass -nostdlib to g++ during linking, the option
+        # -pthread{,s} is not in effect;  add the -lpthread to $deplist
+        # explicitly to link correctly.
+        if test "$tagname" = CXX -a x"$with_gcc" = xyes; then
+          case "$arg" in
+            -pthread*) func_append deplibs " -lpthread" ;;
+          esac
+        fi
+ 
  	continue
  	;;
  
