参考网上的方法编译,gcc的config如下
../configure --prefix=/usr/local/gcc --with-mpc=/usr/local/mpc --with-gmp=/usr/local/gmp --with-mpfr=/usr/local/mpfr -enable-checking=release -enable-languages=c,c++ -disable-multilib
编译出来make install以后gcc有800多M,请问一下怎么编译才能小呢,我见红帽9.3的RPM安装后才30多M,主要是cc1 cc1plus lto1差的比较多
[root@ceppas local]# du -sh *
12M bin
0 etc
0 games
852M gcc
[root@ceppas gcc]# du -sh *
32M bin
12M include
24M lib
183M lib64
588M libexec
15M share
[root@ceppas 9.5.0]# ls -lrth
总用量 587M
-rwxr-xr-x 1 root root 1002 6月 21 15:21 liblto_plugin.la
-rwxr-xr-x 1 root root 192M 6月 21 15:21 cc1
-rwxr-xr-x 1 root root 202M 6月 21 15:21 cc1plus
-rwxr-xr-x 1 root root 183M 6月 21 15:21 lto1
-rwxr-xr-x 1 root root 4.3M 6月 21 15:21 collect2
drwxr-xr-x 2 root root 76 6月 21 15:21 install-tools
-rwxr-xr-x 1 root root 5.5M 6月 21 15:21 lto-wrapper
drwxr-xr-x 2 root root 22 6月 21 15:21 plugin