LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1209|回复: 3

一般编译安装GCC需要多长时间?

[复制链接]
发表于 2008-12-20 09:05:26 | 显示全部楼层 |阅读模式
make快3小时了,还没完。。。

配置如下:
[root@bogon ~]# gcc -v
使用内建 specs。
目标:i386-redhat-linux
配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
线程模型:posix
gcc 版本 4.1.2 20080704 (Red Hat 4.1.2-44)
[root@bogon ~]# mkdir gcc-build
[root@bogon ~]# cd gcc-build
[root@bogon gcc-build]# ../gcc-4.3-20081218/configure --prefix=/usr \
> --enable-shared \
> --enable-threads=posix \
> --disable-checking \
> --with-system-zlib \
> --enable-__cxa_atexit \
> --disable-libunwind-exceptions \
> --enable-libgcj-multifile \
> --enable-languages=c,c++,objc,obj-c++,java,fortran,ada \
> --enable-java-awt=gtk \
> --disable-dssi \
> --enable-plugin \
> --with-cpu=generic
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... gnatbind
checking for gnatmake... gnatmake
checking whether compiler driver understands Ada... yes
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... buggy but acceptable
The following languages will be built: c,ada,c++,fortran,java,objc,obj-c++
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... expect
checking for runtest... runtest
checking for ar... ar
checking for as... as
checking for dlltool... no
checking for ld... ld
checking for lipo... no
checking for nm... nm
checking for ranlib... ranlib
checking for strip... strip
checking for windres... no
checking for windmc... no
checking for objcopy... objcopy
checking for objdump... objdump
checking for cc... cc
checking for c++... c++
checking for gcc... gcc
checking for gcj... gcj
checking for gfortran... gfortran
checking for ar... no
checking for ar... ar
checking for as... no
checking for as... as
checking for dlltool... no
checking for dlltool... no
checking for ld... no
checking for ld... ld
checking for lipo... no
checking for lipo... no
checking for nm... no
checking for nm... nm
checking for objdump... no
checking for objdump... objdump
checking for ranlib... no
checking for ranlib... ranlib
checking for strip... no
checking for strip... strip
checking for windres... no
checking for windres... no
checking for windmc... no
checking for windmc... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... just compiled
checking where to find the target c++... just compiled
checking where to find the target c++ for libstdc++... just compiled
checking where to find the target dlltool... host tool
checking where to find the target gcc... just compiled
checking where to find the target gcj... just compiled
checking where to find the target gfortran... just compiled
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether -fkeep-inline-functions is supported... yes
configure: creating ./config.status
config.status: creating Makefile
[root@bogon gcc-build]#
发表于 2008-12-20 09:23:03 | 显示全部楼层
你把所有语言支持都选进去了当然要很久,4.2以上版本在不进行交叉编译的情况下会自动bootstrap,会占用更长时间
回复 支持 反对

使用道具 举报

发表于 2008-12-20 13:02:59 | 显示全部楼层
LFS手册上已经介绍过大多数包编译所大致需要花的时间。

另外告诉楼主:对于 make -j2 表示使用双进程同时编译,make -j4 表示使用4进程编译,如果你有四核CPU,是可以大大提高编译速度的。

不过要注意的是,并非所有代码都能在 make -j 参数下正常编译,大多数可以并行编译,但少数程序这样编译会编译不过。如果你编译不过,那么就不加 -j 参数编译吧。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-12-20 13:19:26 | 显示全部楼层
make完了,现在开始make -k check

睡觉去了,起来再看
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表