+ -
当前位置:首页 → 问答吧 → MDK10.1下重用gcc-3.3.2

MDK10.1下重用gcc-3.3.2

时间:2004-12-16

来源:互联网

或许这种做法的确不可取,而且有点是“斩脚趾避沙虫”的做法。但改用回gcc-3.3.2(MDK 10.0 Official)以后,编译很多东西都跟原来一样正常了。想知道大家对这种做法有什么看法?:o

作者: csyfek   发布时间: 2004-12-16

可以Downgrade。

作者: fundawang   发布时间: 2004-12-16

fundawang兄也是夜猫子!呵呵~~

作者: csyfek   发布时间: 2004-12-16

具体怎么做的?能解释一下吗?

作者: dns   发布时间: 2004-12-16

可以,我已经把每一个步骤都记在本子上了,明天整理之后就贴上来。现在夜深了,打字太多声音太大,爸惊醒后会骂我“怎么还没有睡觉!!!”

作者: csyfek   发布时间: 2004-12-16

libgcc也换成3.3了吗?

作者: dns   发布时间: 2004-12-16

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/blfs...cludes-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.

作者: 6692975   发布时间: 2004-12-16

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这些包也一并卸载喔!!!)

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

3) 顺利安装完以后,使用gcc -v命令,应看到的 gcc 版本为 3.3.2 。

作者: csyfek   发布时间: 2004-12-16

要普通用户了解这些东西是很可笑的

作者: Jwangk   发布时间: 2004-12-16

世上没有白吃的饭,也没有坐着等死的人。

作者: csyfek   发布时间: 2004-12-16

这个不错,试一下吧。

作者: cnzxy   发布时间: 2004-12-17

热门下载

更多