GCC-4.8.5 编译安装
- https://stackoverflow.com/questions/61945439/how-to-install-compiler-g-4-8-5-in-ubuntu-20-04
- https://www.icode9.com/content-3-1202280.html
- https://www.frank.fyi/archives/336_gcc-compile-error/
参考第一篇:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2
tar -zxvf gcc-4.8.5.tar.bz2
sed -i -e 's/__attribute__/\/\/__attribute__/g' gcc-4.8.5/gcc/cp/cfns.h sed -i 's/struct ucontext/ucontext_t/g' gcc-4.8.5/libgcc/config/i386/linux-unwind.h
gcc-4.8.5/contrib/download_prerequisites
sudo apt install make wget git gcc g++ lhasa libgmp-dev libmpfr-dev libmpc-dev flex bison gettext texinfo ncurses-dev autoconf rsync
mkdir gcc-4.8.5-build cd gcc-4.8.5-build
$PWD/../gcc-4.8.5/configure --enable-languages=c,c++ --prefix=/usr/local/gcc-4.8.5 --enable-shared --enable-plugin --program-suffix=-4.8.5 --disable-multilib make MAKEINFO="makeinfo --force" -j
sudo make install
|
编译的过程中会出现一些问题,主要参考了第二篇文章和第三篇文章。