一、背景
因最近学习hit-os编译linux 0.11版本内核,需要使用到gcc 3.4,故此记录。
二、安装
# 下载deb包
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/cpp-3.4_3.4.6-6ubuntu3_amd64.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/g++-3.4_3.4.6-6ubuntu3_amd64.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/gcc-3.4-base_3.4.6-6ubuntu3_amd64.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/gcc-3.4_3.4.6-6ubuntu3_amd64.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gcc-3.4/libstdc++6-dev_3.4.6-6ubuntu3_amd64.deb
# 安装
sudo dpkg -i *.deb
# 检查版本
ls /usr/bin/gcc*
ls /usr/bin/g++*
三、总结
对应不同版本的内核或者应用,编译工具链会有差别,在使用过程中也应注意。