This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc 4.0.2

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 


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.



Sent from the gcc - Dev forum at

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]