I managed to build gcc-4.0.2 using MinGW 5.0.0 candidate gcc 3.4.4 with flag --enable-languages=c,c++ in MSys together with msysDTK 1.0.1 and upgraded autoconf(2.59), automake(1.82) and libtool(1.5) on a WinXP system. Since lack of test tools, testing is skipped, while the compilers work indeed :)
Now the output from MSys in the objdir directory: $ ../gcc-4.0.2/config.guess i686-pc-mingw32 $ gcc -v Using built-in specs. Target: i686-pc-mingw32 Configured with: ../gcc-4.0.2/configure --prefix=/mingw --enable-languages=c,c++ --disable-nls --enable-threads Thread model: win32 gcc version 4.0.2 $ uname MINGW32_NT-5.1