diff options
author | Tom Stellard <tstellar@redhat.com> | 2017-05-31 09:58:34 +0000 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2017-05-31 09:58:34 +0000 |
commit | 5273e95db70e6db6d2e181deb66582e920045b3a (patch) | |
tree | b250cf256346c399d8a82b1fc9af9880d4c5bb76 | |
parent | Driver: Update devtoolset usage for RHEL (diff) | |
download | llvm-project-5273e95db70e6db6d2e181deb66582e920045b3a.tar.gz llvm-project-5273e95db70e6db6d2e181deb66582e920045b3a.tar.bz2 llvm-project-5273e95db70e6db6d2e181deb66582e920045b3a.zip |
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.
llvm-svn: 304293
-rw-r--r-- | clang/lib/Driver/ToolChains.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp index 5ddc32bfc627..1dd34ae70a70 100644 --- a/clang/lib/Driver/ToolChains.cpp +++ b/clang/lib/Driver/ToolChains.cpp @@ -4111,6 +4111,15 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args) 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"); |