Installing GCC 12 on CentOS 7: A Comprehensive Guide from Dependency Preparation to Compilation Verification

Installing GCC 12 on CentOS 7: A Comprehensive Guide from Dependency Preparation to Compilation Verification As a “compilation tool” in Linux systems, GCC (GNU Compiler Collection) is a core tool for developing programs in C, C++, and more. However, the default GCC version that comes with CentOS 7 is relatively low (usually 4.8.5), which cannot … Read more

CentOS 7 GCC Upgrade Tutorial (Using GCC 9 as an Example)

1. Tutorial Background The default pre-installed version of GCC in CentOS 7 is 4.8.5 (released in 2015). In modern development scenarios, many software packages (such as higher versions of Python, TensorFlow, C++ 11+ projects, etc.) have higher requirements for the GCC version (needs 5.4+ and above). Therefore, it is necessary to upgrade GCC, but directly … Read more

KASAN (4) – Inline Instrumentation Analysis

Technical experience sharing, welcome to follow and provide guidance. In “KASAN (1) – Simple Practice”, we did not explain the configuration CONFIG_KASAN_INLINE in detail, but simply explained it based on the kernel documentation. Here, we will provide a detailed introduction to the inline detection process of KASAN based on practical analysis. What is INLINE Mode … Read more

The Challenging Journey of Compiling and Installing GCC 14 from Source on CentOS 7

Download Dependencies tar zxvf gcc-releases-gcc-14.2.0.tar.gz cd gcc-releases-gcc-14.2.0 contrib/download_prerequisites Older versions of GCC require manual installation of dependencies, while the new version does not; a script automates the process. Note: <span>contrib/download_prerequisites</span> must be executed in the root directory of the installation (<span>gcc-releases-gcc-14.2.0/</span>), and there will be no output on the screen when this command is executed. … Read more

Guide to Compiling and Installing GCC 7.5.0 from Source

This article is generated by Tencent Yuanbao, with content outline and verification provided by @Xiao Hui~ In certain Linux environments, the system’s default GCC version is relatively low (e.g., 4.8.5), which cannot meet the compilation requirements of new software, and it is not possible to install a newer version of GCC directly through the package … Read more

Detailed Explanation and Example Guide of Common GCC Compilation Options

This article is generated by Tencent Yuanbao, with content outline and verification provided by @Xiao Hui~ gcc [-c|-S|-E] [-std=standard] [-g] [-pg] [-Olevel] [-Wwarn…] [-Wpedantic] [-Idir…] [-Ldir…] [-Dmacro[=defn]…] [-Umacro] [-foption…] [-mmachine-option…] [-o outfile] [@file] infile… 1 Directory Options 1.1 Specifying Header File Search Path (-I) When header files are not in standard directories (such as <span>/usr/include</span>), … Read more

GCC Firmware Analysis: Mastering Map Files and Memory Optimization Techniques

GCC Firmware Analysis Complete Guide: Mastering Map Files and Memory Optimization Techniques In daily embedded development, optimizing firmware size and memory usage is a crucial skill. This article will detail how to use the GCC toolchain to analyze firmware usage, helping developers accurately grasp the usage of FLASH and RAM. 1. Why is Firmware Analysis … Read more

In-Depth Analysis of the GCC Compilation Process: From Preprocessing to Linking

This article is generated by Tencent Yuanbao, with content outline and verification provided by @Xiao Hui~ The compilation process of GCC (GNU Compiler Collection) is a complex multi-stage process that converts human-readable source code into machine-executable object code. This process mainly includes preprocessing, compilation (which can be further divided into five sub-stages), assembly, and linking. … Read more

Essential for Linux Developers: An Introduction to GCC and Quick Start Guide

This article is generated by Tencent Yuanbao, with content outline and verification provided by @Xiao Hui~ GCC (GNU Compiler Collection) is a powerful open-source compiler suite that supports multiple programming languages, such as C, C++, Fortran, and more. It is not only the de facto standard compiler on Linux systems but is also widely used … Read more

Compiling Software from Source Code

1. Core Purpose & Concepts Core Purpose: Understanding the ultimate charm of open-source software—by obtaining the program’s source code, we can personally modify, compile, and install a unique version tailored to our preferences. This is a transformation from “user” to “participant”. Core Terminology: Source Code: A human-readable text file containing program instructions written in high-level … Read more