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

相关推荐
Ciderw12 天前
LLVM编译器简介
c++·golang·编译·编译器·gcc·llvm·基础设施
瞌睡不来15 天前
(学习总结25)Linux工具:vim 编辑器 和 gcc/g++ 编译器
linux·学习·编辑器·vim·编译器·gcc/g++
HyperAI超神经1 个月前
【TVM教程】为 ARM CPU 自动调优卷积网络
arm开发·人工智能·python·深度学习·机器学习·tvm·编译器
BIT祝威1 个月前
拥有自己的解析器(C#实现LALR(1)语法解析器和miniDFA词法分析器的生成器)
markdown·面向对象·编译器·compiler
唐诺2 个月前
几种广泛使用的 C++ 编译器
c++·编译器
luoganttcc3 个月前
【编译器】传统编译器和AI/ML编译器总结
人工智能·编译器
编程重生之路4 个月前
今年2024的1024文章
ai·ai编程·编译器·cursor·1024程序员节
Thanks_ks4 个月前
【第五章·选择控制结构】第一节:生活中与计算机中的问题求解方法
算法·编译器·机器语言·分治策略·c 语言程序设计·计算机程序·程序设计语言
Eloudy5 个月前
函数地址对齐 __attribute__((aligned(64))) 编译器选项 -falign-functions=4
算法·编译器