Index: src/binutils/testsuite/binutils-all/windres/windres.exp =================================================================== --- src.orig/binutils/testsuite/binutils-all/windres/windres.exp +++ src/binutils/testsuite/binutils-all/windres/windres.exp @@ -33,10 +33,19 @@ if {[which $WINDRES] == 0} then { set wr "$WINDRES --include-dir $srcdir/$subdir" -if [file exists "$srcdir/../../winsup/w32api/include"] { - set wr "$wr --include-dir $srcdir/../../winsup/w32api/include" +# For none winsup using targets use the target gcc compiler +if {[istarget "x86_64-*-mingw*"] } { + if {[which $CC] == 0} then { + send_log "\nWarning: Assuming windres can find the correct gcc\n\n" + } else { + set wr "$wr --preprocessor $CC" + } } else { - send_log "\nWarning: Assuming windres can find the win32 headers\n\n" + if [file exists "$srcdir/../../winsup/w32api/include"] { + set wr "$wr --include-dir $srcdir/../../winsup/w32api/include" + } else { + send_log "\nWarning: Assuming windres can find the win32 headers\n\n" + } } set res_list [lsort [glob -nocomplain $srcdir/$subdir/*.rc]] =