forked from OSchip/llvm-project
[clang] Add gcc-toolset-10 support (RHEL/CentOS 8)
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. Reviewed By: stephan.dollberg Differential Revision: https://reviews.llvm.org/D108908
This commit is contained in:
parent
af2920ec6f
commit
a5791badde
|
@ -2052,7 +2052,8 @@ 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 devtoolsets.
|
||||
// Yet, still look for RHEL/CentOS devtoolsets and gcc-toolsets.
|
||||
Prefixes.push_back("/opt/rh/gcc-toolset-10/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");
|
||||
|
|
|
@ -206,8 +206,7 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
|
|||
ExtraOpts.push_back("max-page-size=4096");
|
||||
}
|
||||
|
||||
if (GCCInstallation.getParentLibPath().find("opt/rh/devtoolset") !=
|
||||
StringRef::npos)
|
||||
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
|
||||
// we want to use other tools from devtoolset (e.g. ld) instead of the
|
||||
|
|
Loading…
Reference in New Issue