[llvm-branch-commits] [cfe-branch] r304293 - Driver: Don't mix system tools with devtoolset tools on RHEL

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed May 31 02:58:34 PDT 2017


Author: tstellar
Date: Wed May 31 04:58:34 2017
New Revision: 304293

URL: http://llvm.org/viewvc/llvm-project?rev=304293&view=rev
Log:
Driver: Don't mix system tools with devtoolset tools on RHEL

For example, we don't want to mix a devtoolset gcc with system ld, because
they don't always work together.

Modified:
    cfe/branches/release_40/lib/Driver/ToolChains.cpp

Modified: cfe/branches/release_40/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_40/lib/Driver/ToolChains.cpp?rev=304293&r1=304292&r2=304293&view=diff
==============================================================================
--- cfe/branches/release_40/lib/Driver/ToolChains.cpp (original)
+++ cfe/branches/release_40/lib/Driver/ToolChains.cpp Wed May 31 04:58:34 2017
@@ -4111,6 +4111,15 @@ Linux::Linux(const Driver &D, const llvm
 
   Distro Distro(D.getVFS());
 
+  if (Distro.IsRedhat()) {
+    // 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 standard system
+    // tools.
+    PPaths.push_back(Twine(GCCInstallation.getParentLibPath() +
+                     "/../bin").str());
+  }
+
   if (Distro.IsOpenSUSE() || Distro.IsUbuntu()) {
     ExtraOpts.push_back("-z");
     ExtraOpts.push_back("relro");




More information about the llvm-branch-commits mailing list