当前位置:网站首页>GCC版本升级到指定版本
GCC版本升级到指定版本
2022-08-02 12:49:00 【哭哭啼】
首先需要安装gcc,可以参考我另一篇文章centos8安装gcc
在gdb_build 找到configure文件
/app/gdb/gdb-12.1/configure
执行 make 指令编译整个 GDB 源码文件,此过程可能会花费很长时间,读者耐心等待即可:
注意,如果编译过程中出现错误,极有可能是所用的 GCC 编译器版本过低导致的,可尝试升级 GCC 版本后再重新执行 make 命令。
升级gcc版本
下载地址,gcc-12.1.0.tar.gz
,首先确保安装了gcc和g++,因为我的gdb是最新版12.1,所以gcc也用12.1
上传并解压
tar -zxvf gcc-12.1.0.tar.gz
新建文件
mkdir /app/gcc_build
进入文件
cd /app/gcc_build/
进入GCC源目录中运行此脚本
cd /app/gcc/gcc-12.1.0
下载依赖
./contrib/download_prerequisites
进入gcc_build
cd /app/gcc_build/
创建makefile 文件执行
/app/gcc/gcc-12.1.0/configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
有关 configure 后跟的各个参数的含义,读者仅需要了解 --enable-languages 用于设定 GCC 编译器支持编译的编程语言的类别,例如 c、c++、java、objc、obj-c++、go 等
执行make命令
注意,编译过程是非常耗时的(我是下班之前一个小时执行的,下班挂机继续执行),因此如果读者选用此方式安装 GCC,则在执行 make 命令时一定要安排合适的时间。
最后,执行如下命令安装 gcc
输入make install
重启
查询gcc版本 gcc -v
升级完成。
边栏推荐
- 第十四章 手动创建 REST 服务(二)
- ssm访问数据库数据报错
- 企业用直播平台能实现什么
- An example of type3 voltage loop compensator taking Boost as an example
- zabbix automated monitoring script
- FreeRTOS experiment--one function creates multiple tasks
- 分享一个Chrome控制台数据获取的例子
- Interpretation of new features | MySQL 8.0 GIPK invisible primary key
- 无线振弦采集仪远程修改参数方式
- SQL Server 数据库之导入导出数据
猜你喜欢
np.nan, np.isnan, None, pd.isnull, pd.isna 整理与小结
js semi-circle loading progress animation js special effects
FreeRTOS creation tasks - dynamic creation, static creation
SQL Server2019安装步骤及脱机安装Microsoft机器学习组件下一步不能继续的问题
【第六届强网杯CTF-Wp】
SQL Server database generation and execution of SQL scripts
#夏日挑战赛#【FFH】OpenHarmony设备开发基础(三)编译依赖
Technology sharing | Description of the electronic fence function in the integrated dispatching system
软件成分分析:手握5大能力守护软件供应链安全
simulink PID auto-tuning
随机推荐
A powerful js pop-up alert plugin
photo-sphere-viewer中文文档
Pod调度策略:亲和性、污点与污点容忍
js源码跳转的几种方式,在当前页面跳转,在空白页跳转
Seneor Exposure Basics
np.nan, np.isnan, None, pd.isnull, pd.isna 整理与小结
Openlayers 快速上手教程
numpy&pands 中的unique
SQL Server 2014 installation tutorial (nanny-level graphic tutorial)
如何关闭开启硬件加速[通俗易懂]
30 lines of code to realize serverless real-time health code recognition -- operation manual
How to turn off hardware acceleration [easy to understand]
An example of type3 voltage loop compensator taking Boost as an example
SQL Server 数据库之生成与执行 SQL 脚本
一款强大的js弹出alert插件
ThinkPHP 5.1反序列化分析和poc
php - the first of three solid foundations
Intelligent Image Analysis-Intelligent Home Appliance Image Target Detection Statistical Counting Detection and Recognition-iCREDIT
php——三篇夯实根基第一篇
String concatenation in SQL