手工安装gcc-13.3.0

wget https://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.2.1.tar.bz2
wget https://gcc.gnu.org/pub/gcc/infrastructure/mpfr-4.1.0.tar.bz
wget https://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.2.1.tar.bz2

安装GMP:
./configure --prefix=/usr/local/gmp-6.2.
make -j$(nproc)
make install

安装MPFR​ (需指定GMP路径):
./configure --prefix=/usr/local/mpc-1.2.1 --with-gmp=/usr/local/gmp-6.2.1 --with-mpfr=/usr/local/mpfr-4.1.0
make -j$(nproc)
make install

安装MPC​ (需指定GMP和MPFR路径):
./configure --prefix=/usr/local/mpc-1.2.1 --with-gmp=/usr/local/gmp-6.2.1 --with-mpfr=/usr/local/mpfr-4.1.0
make -j$(nproc)
make install

下载gcc源码:https://ftp.gnu.org/gnu/gcc
./configure --disable-multilib --enable-languages=c,c++ --with-gmp=/usr/local/gmp-6.2.1 --with-mpfr=/usr/local/mpfr-4.1.0 --with-mpc=/usr/local/mpc-1.2.1
make -j$(nproc)
make install

posted on 2025-11-12 20:10  万里驰骋  阅读(1)  评论(0)    收藏  举报

导航