I took what I had learned from building jcmvbkbc/crosstool-NG, namely:
1) Turn off precompiled headers
2) Turn off TUI in gdb
3) Errors but finishes when building gcc 4.8.5
4) No errors when building gcc 5.2.0
and tried to carry them over to pfalcon/esp-open-sdk. I made the changes and tried to build with gcc 4.8.5. I got the same xgcc:spawn File not found... errors when building but crosstool-NG finished. It then choked on SDK 2.0.0 and I found out that Espressif have changed and moved the SDK2 file. The new SDK name and location is:
VENDOR_SDK_ZIP_2.0.0 = ESP8266_NONOS_SDK_V2.0.0_16_08_10.zip
VENDOR_SDK_DIR_2.0.0 = ESP8266_NONOS_SDK_V2.0.0_16_08_10
.
.
.
ESP8266_NONOS_SDK_V2.0.0_16_08_10.zip:
wget --content-disposition "http://bbs.espressif.com/download/file.php?id=1690"
So I fixed that and built again and this time I got through to building libhal and my xtensa cross-gcc would not compile the library. It had problems looking for liblto_plugin.so - but this is strange because I am building on Cygwin64 so the dynamic library should be cyglto_plugin-0.dll!!
After looking at everything I found the reason for the xgcc:spawn error was the same thing - it could not find liblto_plugin.so and so some things did not build. I looked more and found that there was no entry for Cygwin64 in gcc/config.hosts, only Cygwin32.
SO I have made a patch file and added it to the project, and tomorrow I will try to build clean again. This time I think I will be close!!!
Here is the patch file if anybody wants it - I should submit it to esp-open-sdk or even crosstool-NG but I am not sure how.
--------- 1200-cygwin64.patch ------------
diff -durN a/gcc/config.host b/gcc/config.host
--- a/gcc/config.host 2016-10-04 18:01:56.180731000 +1100
+++ b/gcc/config.host 2016-10-04 17:50:36.127000000 +1100
@@ -221,6 +221,13 @@
host_exeext=.exe
host_lto_plugin_soname=cyglto_plugin-0.dll
;;
+ x86_64-*-cygwin*)
+ host_xm_file=i386/xm-cygwin.h
+ out_host_hook_obj=host-cygwin.o
+ host_xmake_file="${host_xmake_file} i386/x-cygwin"
+ host_exeext=.exe
+ host_lto_plugin_soname=cyglto_plugin-0.dll
+ ;;
i[34567]86-*-mingw32*)
host_xm_file=i386/xm-mingw32.h
host_xmake_file="${host_xmake_file} i386/x-mingw32"