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,检查

相关推荐
Erishen19 小时前
Lume C11编译器内部架构:从树形解释器到双LLVM后端的设计之旅
架构·开源·编译器
智嵌研习社7 天前
从 `.c` 到 `.elf`:GHS 编译器下 RH850 C 文件完整编译流程深度拆解
编译器·rh850·链接器·编译流程·汇编器·ghs
晓蛋21 天前
c语言指的是什么意思
c语言·编译器·编程开发·集成开发环境·程序实例
程序员Better23 天前
我终于遇到一台懂 AI 编程的专业编程显示器!
人工智能·openai·编译器
_JoeZoe1 个月前
阿里云开发者社区用户服务协议
c语言·编译器·历史·应用领域·unix操作系统
whi1 个月前
编译器到底在干嘛?从字符流到机器码,顺手拆一下 V 编译器的流水线
编译原理·编译器
sickworm陈浩1 个月前
日常修改,3秒生效:腾讯音乐 Android 秒编方案 Jugg 开源
android·编译原理·编译器
DLite1 个月前
开源一个静态类型语言——NLang
c++·编译器·nlang
Patrick_Wilson2 个月前
sccache 用在 Rust 上为什么常「不省编译」:原理、限制与 Windows 接入
ci/cd·rust·编译器
ZZH_AI项目交付2 个月前
Apple Silicon 模拟器遇到旧版 MLKit:一次完整的依赖排查
ios·app·编译器