build gcc

1,下载源码

wget https://gcc.gnu.org/pub/gcc/infrastructure/mpfr-4.1.0.tar.bz2

wget https://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2

wget https://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.2.1.tar.gz

git clone --mirror https://github.com/gcc-mirror/gcc.git

cd ./ex/

git clone ../gcc.git

cd gcc

git checkout releases/gcc-12.2.0

2,编译

cd gmp-6.1.0 && \

./configure --prefix=/home/hanmeimei/ex_gcc/tmp1/local/gmp-6.1.0 && \

make -j && sudo make install && \

cd ..

cd mpfr-4.1.0 && \

./configure --prefix=/home/hanmeimei/ex_gcc/tmp1/local/mpfr-4.1.0 --with-gmp=/home/hanmeimei/ex_gcc/tmp1/local/gmp-6.1.0 && \

make -j && sudo make install && \

cd ..

cd mpc-1.2.1 && \

./configure --prefix=/home/hanmeimei/ex_gcc/tmp1/local/mpc-1.2.1 --with-gmp=/home/hanmeimei/ex_gcc/tmp1/local/gmp-6.1.0 --with-mpfr=/home/hanmeimei/ex_gcc/tmp1/local/mpfr-4.1.0 && \

make -j && sudo make install && \

cd ..

cd gcc && \

./configure --prefix=/home/hanmeimei/ex_gcc/tmp1/local/gcc-12.2.0 --enable-checking=release --disable-multilib --with-gmp=/home/hanmeimei/ex_gcc/tmp1/local/gmp-6.1.0 --with-mpfr=/home/hanmeimei/ex_gcc/tmp1/local/mpfr-4.1.0 --with-mpc=/home/hanmeimei/ex_gcc/tmp1/local/mpc-1.2.1 && \

make -j &&sudo make install

3,检查

相关推荐
程序员Better1 天前
我终于遇到一台懂 AI 编程的专业编程显示器!
人工智能·openai·编译器
_JoeZoe8 天前
阿里云开发者社区用户服务协议
c语言·编译器·历史·应用领域·unix操作系统
whi11 天前
编译器到底在干嘛?从字符流到机器码,顺手拆一下 V 编译器的流水线
编译原理·编译器
sickworm陈浩18 天前
日常修改,3秒生效:腾讯音乐 Android 秒编方案 Jugg 开源
android·编译原理·编译器
DLite21 天前
开源一个静态类型语言——NLang
c++·编译器·nlang
Patrick_Wilson1 个月前
sccache 用在 Rust 上为什么常「不省编译」:原理、限制与 Windows 接入
ci/cd·rust·编译器
ZZH_AI项目交付1 个月前
Apple Silicon 模拟器遇到旧版 MLKit:一次完整的依赖排查
ios·app·编译器
whi2 个月前
V 编译器 v3 ownership 模式:编译与使用指南
后端·编译器
DogDaoDao2 个月前
【GitHub】 LLVM Project 深度解析:现代编译器基础设施的基石
java·c++·python·程序员·github·编译器·llvm
2601_951645743 个月前
C语言环境搭建指南
c语言·编译器·开发环境·helloworld·集成开发环境