Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • View All Red Hat Products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat Developer Sandbox

      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Secure Development & Architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • Product Documentation
    • API Catalog
    • Legacy Documentation
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

GCC and gcc-toolset versions in RHEL: An explainer

April 16, 2025
Benjamin Blasco
Related topics:
CompilersDeveloper ToolsLinuxSecurity
Related products:
Developer ToolsRed Hat Enterprise Linux

Share:

    The GNU Compiler Collection, commonly abbreviated as GCC, is a portable compiler suite with support for a wide selection of programming languages.

    Red Hat Enterprise Linux (RHEL) offers the flexibility of choosing from many different versions of GCC, depending on your needs. These different versions have different support life cycles and intended uses. This article breaks down how these work and explains the rationale behind Red Hat's approach.

    System GCC (built-in version)

    The system version of GCC (packaged as the gcc RPM) is the compiler that ships with RHEL at General Availability (GA) of a major release (e.g. RHEL 8, RHEL 9) and is used to build the operating system itself. This compiler receives full support for the entire life cycle of the major version of RHEL:

    • RHEL 8: GCC 8
    • RHEL 9: GCC 11
    • RHEL 10 Beta: GCC 14

    Even though the upstream GCC project might no longer support these versions (such as GCC 8), Red Hat takes responsibility for maintaining them throughout RHEL’s life cycle. This includes backporting security fixes and bug fixes as needed. 

    For example, GCC 8 in RHEL 8 received a backported fix for CVE-2020-11023, demonstrating our commitment to maintaining these older GCC versions. It is worth noting that many of the top contributors to GCC are in fact Red Hat employees, equipped with the experience and skills to perform this important maintenance work.

    Read more about Red Hat’s approach to security here: Red Hat Enterprise Linux security

    gcc-toolset (Application Streams versions)

    Red Hat also provides newer versions of GCC and associated development tools via the gcc-toolset Application Streams, giving flexibility to application developers who might not want to remain bound to the system GCC version.

    Key differences from the system GCC include:

    • Shorter support life cycle: gcc-toolset versions are supported for only about 2 years from release, following the Application Streams life cycle.
    • More frequent updates: New gcc-toolset versions are released more often, typically starting 6 months after a major version of RHEL is released, providing access to newer GCC features.
    • Package dependencies: gcc-toolset installs a full suite of dependent packages (e.g., gcc-toolset-9-*), while the built-in gcc does not force installation of these additional packages.

    For example, gcc-toolset-12 is available in RHEL 9, but its support ended in November 2024 (after two years) as part of the Application Streams life cycle.

    Choosing between system GCC and gcc-toolset

    Red Hat's guidance is straightforward:

    • For long-term stability and support: Use the built-in system GCC (8.x in RHEL 8) if you need a compiler that's supported for the entire RHEL life cycle.
    • For newer features: Use gcc-toolset if you need access to the latest GCC features, but be aware of the shorter 2-year support window.

    Note that you can install gcc and multiple versions of gcc-toolset (e.g., gcc-toolset-12 and gcc-toolset-14) concurrently on the same system, as they install to different paths. For example:

    • gcc binaries live in /usr/bin
    • gcc-toolset-12 binaries live in /opt/rh/gcc-toolset-12/root/usr/bin
    • gcc-toolset-14 binaries live in /opt/rh/gcc-toolset-14/root/usr/bin

    The logic behind this approach

    Red Hat's approach balances stability with access to newer features:

    • Stability for the core OS: The system GCC provides long-term stability for the operating system itself and for applications that need consistent behavior over many years.
    • Flexibility for developers: gcc-toolset provides access to newer compiler features for developers who need them, without disrupting the stability of the core system.

    This approach aligns with Red Hat's Red Hat Enterprise Linux Application Compatibility Policies, which aim to provide both stability and innovation within the same platform.

    Conclusion

    GCC is an essential component of both the build of Red Hat Enterprise Linux and for developers building applications on Red Hat Enterprise Linux. The long life cycle RHEL provides introduces a need to ensure stability for vendor-provided and in-house developed workloads without preventing developers from accessing the features that newer GCC versions enable. This capability is part of the core promise of Red Hat Enterprise Linux and a key reason why enterprises worldwide choose RHEL. 

    Happy coding! 

    Explore ways to try RHEL on the Red Hat Enterprise Linux product page.

    Related Posts

    • 6 usability improvements in GCC 15

    • How to implement C23 #embed in GCC 15

    • The GDB developer's GNU Debugger tutorial, Part 1: Getting started with the debugger

    • Improvements to static analysis in the GCC 14 compiler

    • Use compiler flags for stack protection in GCC and Clang

    • Install GCC and build a Hello World application on RHEL 9

    Recent Posts

    • Run Qwen3-Next on vLLM with Red Hat AI: A step-by-step guide

    • How to implement observability with Python and Llama Stack

    • Deploy a lightweight AI model with AI Inference Server containerization

    • vLLM Semantic Router: Improving efficiency in AI reasoning

    • Declaratively assigning DNS records to virtual machines

    What’s up next?

    This cheat sheet covers basic dnf commands and introduces the Subscription Manager and Application Streams features for developers in RHEL 8.

    Get the cheat sheet
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue