Trying to build 7.6.3-x86_64-unknown-linux under cygwin.

$ ./configure
checking for path to top of build tree... ./configure: line 2121: utils/ghc-pwd/dist-install/build/tmp/ghc-pwd: cannot execute binary file
configure: error: cannot determine current directory


Not sure it is a libgmp issue, because linking doesn't help:

$ ln -s /usr/lib/libgmp.dll.a /usr/lib/libgmp.so.3

Any ideas what is going on and how to fix this?