--- toolchain.eclass.old 2009-03-23 19:53:45.000000000 +0100 +++ toolchain.eclass 2009-03-23 20:28:41.000000000 +0100 @@ -1344,7 +1344,11 @@ *-klibc) needed_libc=klibc;; *-uclibc*) needed_libc=uclibc;; *-cygwin) needed_libc=cygwin;; - mingw*|*-mingw*) needed_libc=mingw-runtime;; + mingw*|*-mingw*) needed_libc=mingw-runtime + # Bug #156767: Need mingw system include path before + # gcc include path due to Windows-specific + # that has to be included first. + confgcc="${confgcc} --with-local-prefix=\"/mingw\"" ;; avr) confgcc="${confgcc} --enable-shared --disable-threads";; esac if [[ -n ${needed_libc} ]] ; then