Currently, testing the cross compiler does not work "out of the box". Most of
this was found due to testing the x86_64-pc-mingw32 compiler, which is not
part of "winsup/w32api".
There are several issues that Kai and I have found that would make this much
more robust. First is the ability for the windres tests to find the target
system headers. The --with-sysroot option that configure accepts is not used,
and instead the path is hardcoded in windres.exp
to "$(srcdir)/../../winsup/w32api/include". What would make this more
complete would be to have make set $sysroot in site.exp, and then for
windres.exp to use $sysroot/mingw/include or some other (perhaps more)
appropriate path relative to sysroot, like $sysroot/$target/include, etc.
Second, windres uses the build system compiler (gcc). This is ok, I suppose,
since the cross compiler may not be yet built. However, this means that for
the mingw targets, _WIN32 and WIN32 will not be guaranteed to be defined.
This requires that windres also accept the options "-DWIN32 -D_WIN32".
These two changes could be done alongside the current method of doing things,
and the hack that hard codes in $src/../../winsup/...." doesn't have to be
necessairily removed. However, adding this support would make things a
heckuva lot easier for targets like x86_64-pc-mingw32.
This issue seems to me being resolved. So I close this bug