Anatoly Krivitsky wrote: > > Have you tried to build gcc 4.0.2 from the source on > Windows XP Pro? >
I recently built gcc-4.1 snapshot successfully on Windows XP. I will list down the steps I followed, they should work with the 4.0.2 version also. Note that gcc build instructions discourage building in the same directory where the gcc source code is exploded. Use a directory outside of that directory to build. 1) Start cmd.exe 2) cd E:\msys\1.0\home\ 3) md gcc 4) cd gcc 5) tar -xvzf gcc-4.1-20051223.tar.gz 6) mkdir gcc-obj 7) cd gcc-obj 8) set PATH=E:\mingw\bin;E:\msys\1.0\bin;%PATH%; 9) sh ../gcc-4.1-20051223/configure --host=mingw32 --build=mingw32 -- target=mingw32 --enable-threads --disable-nls --enable-optimize --enable-languag es=c,c++ --prefix=e:/mingw4 10) make Make will fail with an error - Makefile:1277 : target pattern contains no %. Stop. Edit E:\msys\1.0\home\gcc\gcc-obj\gcc\Makefile and change the line ORIGINAL_LD_FOR_TARGET = ./E:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../mingw32/bin/ld.exe to ORIGINAL_LD_FOR_TARGET = /mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../mingw32/bin/ld.exe Restart make and after build completes do a make install. You will have a gcc install in configured prefix. You then need to gunzip/untar the mingw-runtime, w32api etc. packages in the prefixed directory. Obviously, change paths in the above commands to reflect the actual paths and drives you are using. HTH Parag -- Sent from the gcc - Dev forum at Nabble.com: http://www.nabble.com/gcc-4.0.2-t837679.html#a2172990