Configure cannot execute built binary when cross compiling.
The patch skips the test and assumes "no".
This is how it is done in version 2.0.14's configure script.

--- a/configure	2017-09-15 11:14:54.427295947 +0200
+++ b/configure	2017-09-15 14:11:07.253528181 +0200
@@ -19802,6 +19802,7 @@
 $as_echo_n "checking whether pthread_attr_getstack works for the main thread... " >&6; }
 old_CFLAGS="$CFLAGS"
 CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
+if test "$cross_compiling" = no; then
 if test "$cross_compiling" = yes; then :
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -19849,6 +19850,10 @@
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
+else
+  works="assuming it doesn't"
+fi
+
 CFLAGS="$old_CFLAGS"
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
 $as_echo "$works" >&6; }
