summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-10-04 21:22:42 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-10-04 21:22:42 +0000
commite683a189705065a94b83460d7b0c596d6084b58c (patch)
tree3b7eacedded9f2621760a4d3684e0b565ce98555 /clang/lib/Driver
parent531f1ff78cd5547677ebe38bfe448fce9df6859a (diff)
downloadbcm5719-llvm-e683a189705065a94b83460d7b0c596d6084b58c.tar.gz
bcm5719-llvm-e683a189705065a94b83460d7b0c596d6084b58c.zip
Now that multiple prefixes are much cheaper to search for GCC
installations, support them when installed directly under the system root ('/lib/gcc/...' essentially). With this, Clang can correctly detect and use a cross-compiling GCC installation within a system root and use it. Again, test cases will be coming in later commits, as I'm going to write a few test cases that exercise nearly all of this logic. llvm-svn: 141121
Diffstat (limited to 'clang/lib/Driver')
-rw-r--r--clang/lib/Driver/ToolChains.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp
index ec11e73a185..14ac85ecb51 100644
--- a/clang/lib/Driver/ToolChains.cpp
+++ b/clang/lib/Driver/ToolChains.cpp
@@ -1639,6 +1639,7 @@ public:
// Compute the set of prefixes for our search.
SmallVector<std::string, 8> Prefixes(D.PrefixDirs.begin(),
D.PrefixDirs.end());
+ Prefixes.push_back(D.SysRoot);
Prefixes.push_back(D.SysRoot + "/usr");
// Loop over the various components which exist and select the best GCC
OpenPOWER on IntegriCloud