Bug 5944

Summary: Cross compiling testsuite needs improvement for mingw targets
Product: binutils Reporter: nightstrike <nightstrike>
Component: binutilsAssignee: unassigned
Status: RESOLVED FIXED    
Severity: enhancement CC: bug-binutils, ktietz
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target: *-*-mingw*
Build: Last reconfirmed:

Description nightstrike 2008-03-16 13:34:23 UTC
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.
Comment 1 Kai Tietz 2012-02-10 17:37:27 UTC
This issue seems to me being resolved.  So I close this bug