1. download the tarball of GCC version 4.4.2 and extract it
2. some tools and packages are required before installing GCC, such as MPFR, GMP, download the tarball and extract the source in the subdirectory of GCC named "mpfr" and "gmp" respectively.
3. make the directory for build, from now on, i use "srcdir" to refer to the toplevel source directory and "objdir" to refer to the toplevel build directory
4. enter the "objdir", and configure GCC as follows
cd objdir;
srcdir/configure --program-suffix=-4.4.2 --enable-language=c,c++ --enable-stage1-language=c,c++
at first, i just run the configure as "srcdir/configure", and then "make", only to get some errors such as "XXX is already defined",
i guess maybe i have too much language to compiled and some of the headers are conflicted with each other,
therefore, i run the configure command with options above and try again, fortunately , it works.
5. "make" and "make install"
6. now i have 2 gcc in my system, and i rename the previous one and make a symbolic link to the newer one.
阅读(975) | 评论(0) | 转发(0) |