Enabling the detection of devtoolset-11 toolchain.
authorKamau Bridgeman <kamau.bridgeman.ibm@gmail.com>
Thu, 12 May 2022 20:02:00 +0000 (15:02 -0500)
committerKamau Bridgeman <kamau.bridgeman.ibm@gmail.com>
Tue, 17 May 2022 12:57:45 +0000 (07:57 -0500)
This patch allows systems to build the llvm-project with the devtoolset-11
toolchain.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D125499

clang/lib/Driver/ToolChains/Gnu.cpp

index 183828d..003a97e 100644 (file)
@@ -2150,7 +2150,9 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
   // Non-Solaris is much simpler - most systems just go with "/usr".
   if (SysRoot.empty() && TargetTriple.getOS() == llvm::Triple::Linux) {
     // Yet, still look for RHEL/CentOS devtoolsets and gcc-toolsets.
+    Prefixes.push_back("/opt/rh/gcc-toolset-11/root/usr");
     Prefixes.push_back("/opt/rh/gcc-toolset-10/root/usr");
+    Prefixes.push_back("/opt/rh/devtoolset-11/root/usr");
     Prefixes.push_back("/opt/rh/devtoolset-10/root/usr");
     Prefixes.push_back("/opt/rh/devtoolset-9/root/usr");
     Prefixes.push_back("/opt/rh/devtoolset-8/root/usr");