LinuxSir.cn,穿越时空的Linuxsir!

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

MDK10.1下重用gcc-3.3.2

[复制链接]
发表于 2004-12-16 00:43:28 | 显示全部楼层 |阅读模式
或许这种做法的确不可取,而且有点是“斩脚趾避沙虫”的做法。但改用回gcc-3.3.2(MDK 10.0 Official)以后,编译很多东西都跟原来一样正常了。想知道大家对这种做法有什么看法?
发表于 2004-12-16 00:48:10 | 显示全部楼层
可以Downgrade。
 楼主| 发表于 2004-12-16 01:17:44 | 显示全部楼层
fundawang兄也是夜猫子!呵呵~~
发表于 2004-12-16 01:20:08 | 显示全部楼层
具体怎么做的?能解释一下吗?
 楼主| 发表于 2004-12-16 01:25:54 | 显示全部楼层
可以,我已经把每一个步骤都记在本子上了,明天整理之后就贴上来。现在夜深了,打字太多声音太大,爸惊醒后会骂我“怎么还没有睡觉!!!”:mad:
发表于 2004-12-16 01:30:12 | 显示全部楼层
libgcc也换成3.3了吗?
发表于 2004-12-16 03:14:38 | 显示全部楼层
GCC-3.3.3


Introduction to GCC-3.3.3


The reason for installing GCC-3.3.3 is that some BLFS packages (such as compiled Java) have not been updated to be compilable by GCC-3.4.1.


Package information


Download (HTTP): http://ftp.gnu.org/gnu/gcc/gcc-3.3.3.tar.gz


Download (FTP): ftp://ftp.gnu.org/gnu/gcc/gcc-3.3.3.tar.gz


Download size: 22.7 MB


Estimated Disk space required: 289 MB


Estimated build time: 2.60 SBU


Additional downloads


Required Patch: http://www.linuxfromscratch.org/ ... fixincludes-1.patch


Installation of GCC


Apply the patches:

patch -Np1 -i ../gcc-3.3.3-no_fixincludes-1.patch

The GCC development team recommends building in a separate directory.

mkdir ../gcc-build &&
cd ../gcc-build

Configure GCC to build the C and C++ compilers and enable the related C++ options.

../gcc-3.3.3/configure \
    --prefix=/opt/gcc-3.3.3 \
    --enable-shared --enable-languages=c,c++ \
    --enable-threads=posix

Compile and install GCC:

make bootstrap &&
make install

Move the C++ libraries to the standard lib directory to avoid having to add /opt/gcc-3.3.3/lib to /etc/ld.so.conf.

mv /opt/gcc-3.3.3/lib/libstdc++.so.5* /usr/lib

Configuring GCC


Configuration Information


As with most libraries, there is no configuration to do, save that the library directory i.e., /opt/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.


If you only need the GCC-3.3.3 libraries, you may delete /opt/gcc-3.3.3.


Whenever you need to use GCC-3.3.3 instead of your system installed compiler, add /opt/gcc-3.3.3/bin to the front of your PATH or (preferably) set the CC environment variable before compiling the concerned package.


Contents


The GCC-3.3.3 package contains the gcc-3.3.3 C and C++ compilers and GCC-3.3.3 libstdc++.so that is required by some commercial and pre-compiled packages.
 楼主| 发表于 2004-12-16 11:53:55 | 显示全部楼层
6692975兄提出了一套完整的升级gcc-3.3.3的方法,我这里还有一套更懒的,不过若按上贴提示,gcc-3.3.2就应该没有添加到那个patch文件吧。(不过MDK怪怪的,经常喜欢把一些正在开发的新特性都添进来。不信?看看那个gtk+2.4.13的源码包就知道了。)

重新安装gcc3.3.2的方法:
1) 卸载gcc-c++,libstdc++5-devel,libstdc++5,gcc,gcc-cpp 这几个包。卸载的具体依赖性请按提示解决,我卸载的顺序就按如上次序。如果其他出现非gcc类编译工具程序的依赖(我就看到有一个叫做rpmbuild的包依赖于gcc-c++),忽略掉吧,并强行卸载gcc-c++。你重新安装之后的包会解决它原来的依赖性的。(并不是要你把rpmbuild这些包也一并卸载喔!!!):p

2) 找出你的 MDK 10.0 Official  光盘,依次按上面顺序的逆次序安装。若有提示你缺少某些包(非以上列出的5个),请务必把他们安装上(此时需要的是 MDK 10.1 Official   版本的!)。

3) 顺利安装完以后,使用gcc -v命令,应看到的 gcc 版本为 3.3.2
发表于 2004-12-16 17:14:14 | 显示全部楼层
要普通用户了解这些东西是很可笑的
 楼主| 发表于 2004-12-16 18:18:41 | 显示全部楼层
世上没有白吃的饭,也没有坐着等死的人。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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