Chinaunix首页 | 论坛 | 博客
  • 博客访问: 36123
  • 博文数量: 12
  • 博客积分: 682
  • 博客等级: 上士
  • 技术积分: 130
  • 用 户 组: 普通用户
  • 注册时间: 2009-01-12 10:42
文章分类
文章存档

2010年(1)

2009年(11)

最近访客

分类: LINUX

2009-11-25 15:27:36


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.
阅读(941) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~