[clang] [Clang][Driver] Add gcc-14 & gcc-15 toolset path on RHEL (PR #178459)

Etienne Malaboeuf via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 23 01:32:04 PDT 2026


https://github.com/etiennemlb updated https://github.com/llvm/llvm-project/pull/178459

>From 2cfa4e3a0ebb8ce1d76a18efbdd28ea6fe1c0ebe Mon Sep 17 00:00:00 2001
From: Etienne Malaboeuf <eti.malaboeuf at gmail.com>
Date: Wed, 28 Jan 2026 17:08:57 +0100
Subject: [PATCH] [Clang][Driver] Add gcc-14 & gcc-15 toolset path on RHEL

Adding these additional paths to mitigate tidious environment hoops
(config, flags injection in wrappers) in RHEL-based distros with GCC 14
& 15 toolset.
---
 clang/lib/Driver/ToolChains/Gnu.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
index ac31a45b557f1..50e70e6d71e1b 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2298,6 +2298,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
       D.getVFS().exists("/opt/rh")) {
     // TODO: We may want to remove this, since the functionality
     //   can be achieved using config files.
+    Prefixes.push_back("/opt/rh/gcc-toolset-15/root/usr");
+    Prefixes.push_back("/opt/rh/gcc-toolset-14/root/usr");
     Prefixes.push_back("/opt/rh/gcc-toolset-13/root/usr");
     Prefixes.push_back("/opt/rh/gcc-toolset-12/root/usr");
     Prefixes.push_back("/opt/rh/gcc-toolset-11/root/usr");



More information about the cfe-commits mailing list