[PATCH] D108908: [clang] Add gcc-toolset-10 support (RHEL/CentOS 8)
Simon Moll via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 30 02:16:11 PDT 2021
simoll created this revision.
simoll added a project: clang.
simoll requested review of this revision.
Herald added a subscriber: cfe-commits.
Clang only adds GCC paths for RHEL <= 7 'devtoolset-<N>' Software Collections (SCL). This generalizes this support to also include the 'gcc-toolset-10' SCL in RHEL/CentOS 8.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D108908
Files:
clang/lib/Driver/ToolChains/Gnu.cpp
clang/lib/Driver/ToolChains/Linux.cpp
Index: clang/lib/Driver/ToolChains/Linux.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Linux.cpp
+++ clang/lib/Driver/ToolChains/Linux.cpp
@@ -206,7 +206,7 @@
ExtraOpts.push_back("max-page-size=4096");
}
- if (GCCInstallation.getParentLibPath().find("opt/rh/devtoolset") !=
+ if (GCCInstallation.getParentLibPath().find("opt/rh/") !=
StringRef::npos)
// With devtoolset on RHEL, we want to add a bin directory that is relative
// to the detected gcc install, because if we are using devtoolset gcc then
Index: clang/lib/Driver/ToolChains/Gnu.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Gnu.cpp
+++ clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2052,6 +2052,9 @@
// Non-Solaris is much simpler - most systems just go with "/usr".
if (SysRoot.empty() && TargetTriple.getOS() == llvm::Triple::Linux) {
+ // CentOS 8
+ Prefixes.push_back("/opt/rh/gcc-toolset-10/root/usr");
+
// Yet, still look for RHEL devtoolsets.
Prefixes.push_back("/opt/rh/devtoolset-10/root/usr");
Prefixes.push_back("/opt/rh/devtoolset-9/root/usr");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108908.369399.patch
Type: text/x-patch
Size: 1190 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210830/04b1d767/attachment.bin>
More information about the cfe-commits
mailing list