Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

GCC and gcc-toolset versions in RHEL: An explainer

April 16, 2025
Benjamin Blasco
Related topics:
CompilersDeveloper toolsLinuxSecurity
Related products:
Developer ToolsetRed Hat Enterprise Linux

    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

    • Red Hat Enterprise Linux 10.2 and 9.8: Top features for developers

    • What GPU kernels mean for your distributed inference

    • Debugging image mode with Red Hat OpenShift 4.20: A practical guide

    • EvalHub: Because "looks good to me" isn't a benchmark

    • SQL Server HA on RHEL: Meet Pacemaker HA Agent v2 (tech preview)

    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

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    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
    © 2026 Red Hat

    Red Hat legal and privacy links

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

    Chat Support

    Please log in with your Red Hat account to access chat support.