[PATCH] D34848: Driver: Don't mix system tools with devtoolset tools on RHEL
Tom Stellard via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 29 16:59:26 PDT 2017
tstellar created this revision.
On RHEL, devtoolset provides a more up-to-date toolchain than the base
install, and we want to make sure all the tools use are from the same
toolchain.
https://reviews.llvm.org/D34848
Files:
lib/Driver/ToolChains/Linux.cpp
Index: lib/Driver/ToolChains/Linux.cpp
===================================================================
--- lib/Driver/ToolChains/Linux.cpp
+++ lib/Driver/ToolChains/Linux.cpp
@@ -210,6 +210,15 @@
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");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34848.104779.patch
Type: text/x-patch
Size: 746 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170629/04f952b5/attachment.bin>
More information about the cfe-commits
mailing list