The stat call on mingw fails when a trailing slash is included in the pathname. Hence, trailing slashes need to be stripped from include directory pathnames, lest gcc thinks these paths do not exist.
A patch is here: http://gcc.gnu.org/ml/gcc-patches/2006-03/msg00598.html -- Summary: Need to strip trailing slashes on include pathnames Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: preprocessor AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: amylaar at gcc dot gnu dot org GCC host triplet: *mingw* OtherBugsDependingO 29842 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29851